Family¶
A Family object is a collection of objects of type
Zone,
Boundary, and
Family.
- class antares.api.Family.Family(*args, **kwargs)¶
Family class.
Methods
add_attr(item, value[, deep])Add an attribute to all the elements of the family.
Build a copy of the Family with only Family subtrees and attrs.
clear()copy()deserialized(pickable_family, parent)Build a Family from its representation.
fromkeys(iterable[, value])get(k[,d])get_extractor([name, extractor_keys])Create an extractor for the CFD computation based on the family definition.
items()keys()Return keys as a list and not KeysView nor dict_keys.
pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem()as a 2-tuple; but raise KeyError if D is empty.
serialized([data])Build a pickable representation of the family.
set_superblock(zone_name)Set a family to the list of zones that are all connected by joins to the zone given.
setdefault(k[,d])update([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
update_reduced_copy(reduced_family, data, ...)Updates a copy of the Family to add reduced data.
values()Attributes
- add_attr(item, value, deep=False)¶
Add an attribute to all the elements of the family.
- Parameters:
item (str) – attribute name
value – attribute to be added
- build_reduced_copy()¶
Build a copy of the Family with only Family subtrees and attrs.
If self is:
Family -+-> 'f1': Family +-> 'f2': Family +-> 'z1': Zone +-> 'z2': Zone
Then this operator gives:
Family -+-> 'f1': Family +-> 'f2': Family
This operator is useful combined with update_reduced_copy, to rebuild families after reduction treatments (e.g. cut).
- Returns:
a copy of the Family with only Family subtrees and attrs
- Return type:
- classmethod deserialized(pickable_family, parent)¶
Build a Family from its representation.
- get_extractor(name='extractor_antares', extractor_keys=None)¶
Create an extractor for the CFD computation based on the family definition.
- Parameters:
name (str) – name to give to the extractor
extractor_keys (dict) – keys to be setted to the extractor
- Returns:
the extractor
- Return type:
str
- serialized(data=True)¶
Build a pickable representation of the family.
- set_superblock(zone_name)¶
Set a family to the list of zones that are all connected by joins to the zone given.
- Parameters:
zone_name (str) – name of the starting zone
- update_reduced_copy(reduced_family, data, reduced_data)¶
Updates a copy of the Family to add reduced data.
If self is:
Family -+-> 'f1': Family +-> 'f2': Family +-> 'z1': Zone (`data`) +-> 'z2': ZoneThen this operator updates the reduced_family as shown here:
Family -+-> 'f1': Family +-> 'f2': Family +-> 'z1': Zone (`reduced_data`)This operator is useful when combined with build_reduced_copy, to rebuild families after reduction treatments (e.g. cut).
- Parameters:
reduced_family (
Family) – the reduced Family copy to update. This Family must have the same Family subtrees than self.data – the data that has been reduced as reduced_data.
reduced_data – data after reduction operation.
- property attrs¶
Get the attributes of the Family.
- Return type:
Dictionary
antares.core.AttrsManagement.AttrsManagement
