serpentTools.objects.BranchContainer¶
-
class
serpentTools.objects.
BranchContainer
(filePath, branchID, branchNames, stateData)¶ Class that stores data for a single branch.
This container acts like a dictionary, mapping
UnivTuple
toHomogUniv
corresponding to a specific branch state. As such, there is no need for theuniverses
dictionary that previously served this purpose. However, it is provided for compatibility but will be removed after 0.9.0The
BranchingReader
stores branch variables and branched group constant data inside these container objects. These are used in turn to createHomogUniv
objects for storing group constant data.- Parameters
-
universes
¶ Deprecated since version 0.8.0: Treat this object as the universes dictionary instead
- Type
-
__contains__
()¶ True if D has a key k, else False.
-
__getitem__
()¶ x.__getitem__(y) <==> x[y]
-
__iter__
()¶ Implement iter(self).
-
__len__
()¶ Return len(self).
-
__setitem__
(key, value)¶ Set self[key] to value.
-
clear
() → None. Remove all items from D.¶
-
copy
() → a shallow copy of D¶
-
fromkeys
()¶ Returns a new dict with keys from iterable and values equal to value.
-
get
(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
-
getUniv
(univID, burnup=None, index=None, days=None)¶ Return a specific universe given the ID and time of interest
- Parameters
- Returns
Requested universe
- Return type
- Raises
KeyError – If the requested universe could not be found
serpentTools.SerpentToolsException – If neither burnup nor index are given
-
items
() → a set-like object providing a view on D's items¶
-
keys
() → a set-like object providing a view on D's keys¶
-
property
orderedUniv
¶ Universe keys sorted by ID and by burnup
-
pop
(k[, d]) → v, remove specified key and return the corresponding value.¶ If key is not found, d is returned if given, otherwise KeyError is raised
-
popitem
() → (k, v), remove and return some (key, value) pair as a¶ 2-tuple; but raise KeyError if D is empty.
-
setdefault
(k[, d]) → D.get(k,d), also set D[k]=d if k not in D¶
-
update
(other)¶ Update with contents of another BranchContainer
-
values
() → an object providing a view on D's values¶