mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Fixed indentation and added error message for unlinked Summary file with distribcell paths in DataFrame
This commit is contained in:
parent
2ca61564e2
commit
dfe7a0026a
2 changed files with 11 additions and 3 deletions
|
|
@ -629,6 +629,12 @@ class Filter(object):
|
|||
# Create Pandas Multi-index columns for each level in CSG tree
|
||||
if distribcell_paths:
|
||||
|
||||
# Distribcell paths require linked metadata from the Summary
|
||||
if self.distribcell_paths is None:
|
||||
msg = 'Unable to construct distribcell paths since '
|
||||
'the Summary is not linked to the StatePoint'
|
||||
raise ValueError(msg)
|
||||
|
||||
# Make copy of array of distribcell paths to use in
|
||||
# Pandas Multi-index column construction
|
||||
distribcell_paths = copy.deepcopy(self.distribcell_paths)
|
||||
|
|
|
|||
|
|
@ -2576,9 +2576,11 @@ class Chi(MGXS):
|
|||
xs_type: {'macro', 'micro'}
|
||||
Return macro or micro cross section in units of cm^-1 or barns.
|
||||
Defaults to 'macro'.
|
||||
distribcell_paths : list of str
|
||||
The paths traversed through the CSG tree to reach each distribcell
|
||||
instance (for 'distribcell' filters only)
|
||||
distribcell_paths : bool, optional
|
||||
Construct columns for distribcell tally filters (default is True).
|
||||
The geometric information in the Summary object is embedded into
|
||||
a Multi-index column with a geometric "path" to each distribcell
|
||||
instance.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue