mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Updated docstring for Tally.diagonalize_filter(...) routine
This commit is contained in:
parent
dd50063e87
commit
352c0e919f
8 changed files with 405 additions and 148 deletions
|
|
@ -385,7 +385,7 @@
|
|||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC\nAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAxQTFRF\n////chIS6YCRTb/E6kGE+wAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAPZSURB\nVGje7Zs7buMwEIZ9iey50gyNjQpXKTYudIScgkdQYTfut1idwkdQkQNsYQO2Qj0sPiVK+mlQDmwg\nwIcgg8Cc4fCTSK5W4OeFkM8rHv+2I/rgxPZEPZgR7XtQxKdXYuUXJSUnBQ/9WCgo4vOSJ+WFUvF7\nE08mlia+rn7VcKXP8sRszFX8b2MdX2y6v1Tw6MZUw4H4ojfIjD8mvn/qRL5p4+vvlMqvp2EhR8WB\nzfiz20hXORmP9fi/bM9EeUFvV5H/0yRkeSbiGRfFJErxD9ENdz7Mbhig/h89fvtFdMiI/ePUIXV4\nlXju8K3DKv9NThOZ3q2KmUy6grxFES8rjeyic+FFQav+ncg3fXjH+Ts+/iibztFqOiZuZP/Z3Oaf\nPX40NGgST2r+uvQkXXp6cKvmr+r0e1Eef5um3+JHP3IFF1D/seNZJgaDmvY0Gav1s+2f1fqpIcub\nlfKGt6apotG/NVx3SInWtLX+7Vg/Pv1YqOsnun6JSVdOXT/X7vk75f938QP+8OmSBs0fXtymMhJb\nf8qlPynYmpKCh7OB1fzNalOj1sl0ZAruHLiA+RM73pDe/VjMVP89+aTXwjyc/x5n+u991895/utr\nJTy8/06TXh0r/5JOa2JmYmqi4r/vUm/H4wLm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nT+R49P0b+v4PfP/4E/wX\nfP8Mvf9G37/D/ovuP8SeP7Hj0f0vdP8tqP9O339cyv7p3P1fdP8Z3v9G999j13/seMax8x/o+ZN7\n+O+E8zdP/8XOf8Hnz9Dzb7HnT+x49PxlCp7/BM+fOv13wvnXBfivt2lMvD8TyH/Hnb+Gz3+j589j\nz5/Y8ej9h4D+W7qQmf57efqv239n3T+C7z+h969i13/seMax+3/o/cMcu/8Y2H9n3p+J6r98pv8m\n4fwXuH+M3n+OO3++AX9clR+4PhbRAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE1LTEwLTAzVDAxOjE0\nOjM0LTA0OjAwS1fWPgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNS0xMC0wM1QwMToxNDozNC0wNDow\nMDoKboIAAAAASUVORK5CYII=\n",
|
||||
"text/plain": [
|
||||
"<IPython.core.display.Image object>"
|
||||
]
|
||||
|
|
@ -576,7 +576,7 @@
|
|||
" License: http://mit-crpg.github.io/openmc/license.html\n",
|
||||
" Version: 0.7.0\n",
|
||||
" Git SHA1: e0c2aace2e73367536fa03e153b67a2d038cd2b3\n",
|
||||
" Date/Time: 2015-10-03 01:03:41\n",
|
||||
" Date/Time: 2015-10-03 01:14:34\n",
|
||||
" MPI Processes: 1\n",
|
||||
"\n",
|
||||
" ===========================================================================\n",
|
||||
|
|
@ -644,20 +644,20 @@
|
|||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 7.5300E-01 seconds\n",
|
||||
" Reading cross sections = 1.6900E-01 seconds\n",
|
||||
" Total time in simulation = 2.0057E+01 seconds\n",
|
||||
" Time in transport only = 1.9977E+01 seconds\n",
|
||||
" Time in inactive batches = 2.1180E+00 seconds\n",
|
||||
" Time in active batches = 1.7939E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 4.0000E-03 seconds\n",
|
||||
" Total time for initialization = 1.2000E+00 seconds\n",
|
||||
" Reading cross sections = 2.5000E-01 seconds\n",
|
||||
" Total time in simulation = 1.8967E+01 seconds\n",
|
||||
" Time in transport only = 1.8921E+01 seconds\n",
|
||||
" Time in inactive batches = 2.8760E+00 seconds\n",
|
||||
" Time in active batches = 1.6091E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 3.0000E-03 seconds\n",
|
||||
" Sampling source sites = 3.0000E-03 seconds\n",
|
||||
" SEND/RECV source sites = 1.0000E-03 seconds\n",
|
||||
" Time accumulating tallies = 0.0000E+00 seconds\n",
|
||||
" SEND/RECV source sites = 0.0000E+00 seconds\n",
|
||||
" Time accumulating tallies = 1.0000E-03 seconds\n",
|
||||
" Total time for finalization = 0.0000E+00 seconds\n",
|
||||
" Total time elapsed = 2.0825E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 5901.79 neutrons/second\n",
|
||||
" Calculation Rate (active) = 2090.42 neutrons/second\n",
|
||||
" Total time elapsed = 2.0192E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 4346.31 neutrons/second\n",
|
||||
" Calculation Rate (active) = 2330.50 neutrons/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -369,7 +369,7 @@
|
|||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC\nAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAxQTFRF\n////chIS6YCRTb/E6kGE+wAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAALKSURB\nVGje7dpLcqQwDAbgHHE2YeEj+D4cwQucBUfo+3CEXoSp8OhuhF70T4qpKXmdr21LogK2Pj7A8QmN\nP+HDhw8fPnz48Kf6VH9G+66vy+je8k19jnf8C5dXIPv86ms56lPdjvaYbyodx3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4P4/tP8Q7n9E+y/h/k+0/xTu\nf4X7b+H+X7T/+BPuf3aM8OHDhw8fPnz4w/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIw\nMTUtMTAtMDNUMDE6MTQ6MjctMDQ6MDC2Fcw9AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTEwLTAz\nVDAxOjE0OjI3LTA0OjAwx0h0gQAAAABJRU5ErkJggg==\n",
|
||||
"text/plain": [
|
||||
"<IPython.core.display.Image object>"
|
||||
]
|
||||
|
|
@ -580,7 +580,7 @@
|
|||
" License: http://mit-crpg.github.io/openmc/license.html\n",
|
||||
" Version: 0.7.0\n",
|
||||
" Git SHA1: e0c2aace2e73367536fa03e153b67a2d038cd2b3\n",
|
||||
" Date/Time: 2015-10-03 01:03:29\n",
|
||||
" Date/Time: 2015-10-03 01:14:27\n",
|
||||
" MPI Processes: 1\n",
|
||||
"\n",
|
||||
" ===========================================================================\n",
|
||||
|
|
@ -636,20 +636,20 @@
|
|||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 4.1300E-01 seconds\n",
|
||||
" Reading cross sections = 9.0000E-02 seconds\n",
|
||||
" Total time in simulation = 2.1398E+01 seconds\n",
|
||||
" Time in transport only = 2.1378E+01 seconds\n",
|
||||
" Time in inactive batches = 2.0260E+00 seconds\n",
|
||||
" Time in active batches = 1.9372E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 2.0000E-03 seconds\n",
|
||||
" Sampling source sites = 0.0000E+00 seconds\n",
|
||||
" SEND/RECV source sites = 1.0000E-03 seconds\n",
|
||||
" Time accumulating tallies = 1.0000E-03 seconds\n",
|
||||
" Total time for finalization = 3.0000E-03 seconds\n",
|
||||
" Total time elapsed = 2.1823E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 6169.79 neutrons/second\n",
|
||||
" Calculation Rate (active) = 1935.78 neutrons/second\n",
|
||||
" Total time for initialization = 6.7400E-01 seconds\n",
|
||||
" Reading cross sections = 1.5200E-01 seconds\n",
|
||||
" Total time in simulation = 2.4330E+01 seconds\n",
|
||||
" Time in transport only = 2.4308E+01 seconds\n",
|
||||
" Time in inactive batches = 2.4220E+00 seconds\n",
|
||||
" Time in active batches = 2.1908E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 1.0000E-03 seconds\n",
|
||||
" Sampling source sites = 1.0000E-03 seconds\n",
|
||||
" SEND/RECV source sites = 0.0000E+00 seconds\n",
|
||||
" Time accumulating tallies = 0.0000E+00 seconds\n",
|
||||
" Total time for finalization = 1.0000E-03 seconds\n",
|
||||
" Total time elapsed = 2.5018E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 5161.02 neutrons/second\n",
|
||||
" Calculation Rate (active) = 1711.70 neutrons/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
|
|
|
|||
|
|
@ -417,7 +417,6 @@ class CrossFilter(object):
|
|||
----------
|
||||
data_size : Integral
|
||||
The total number of bins in the tally corresponding to this filter
|
||||
|
||||
summary : None or Summary
|
||||
An optional Summary object to be used to construct columns for
|
||||
distribcell tally filters (default is None). The geometric
|
||||
|
|
|
|||
|
|
@ -476,7 +476,6 @@ class Filter(object):
|
|||
----------
|
||||
data_size : Integral
|
||||
The total number of bins in the tally corresponding to this filter
|
||||
|
||||
summary : None or Summary
|
||||
An optional Summary object to be used to construct columns for
|
||||
distribcell tally filters (default is None). The geometric
|
||||
|
|
|
|||
|
|
@ -326,13 +326,10 @@ class MultiGroupXS(object):
|
|||
----------
|
||||
scores : Iterable of str
|
||||
Scores for each tally
|
||||
|
||||
filters : Iterable of tuple of Filter
|
||||
Tuples of non-spatial domain filters for each tally
|
||||
|
||||
keys : Iterable of str
|
||||
Key string used to store each tally in the tallies dictionary
|
||||
|
||||
estimator : {'analog' or 'tracklength'}
|
||||
Type of estimator to use for each tally
|
||||
|
||||
|
|
@ -450,23 +447,18 @@ class MultiGroupXS(object):
|
|||
----------
|
||||
groups : Iterable of Integral or 'all'
|
||||
Energy groups of interest
|
||||
|
||||
subdomains : Iterable of Integral or 'all'
|
||||
Subdomain IDs of interest
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
|
||||
special string 'all' (default) will return the cross sections for
|
||||
all nuclides in the spatial domain. The special string 'sum' will
|
||||
return the cross section summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
order_groups: {'increasing', 'decreasing'}
|
||||
Return the cross section indexed according to increasing (default)
|
||||
or decreasing energy groups (decreasing or increasing energies)
|
||||
|
||||
value : str
|
||||
A string for the type of value to return - 'mean' (default),
|
||||
'std_dev' or 'rel_err' are accepted
|
||||
|
|
@ -721,14 +713,12 @@ class MultiGroupXS(object):
|
|||
----------
|
||||
subdomains : Iterable of Integral or 'all'
|
||||
The subdomain IDs of the cross sections to include in the report
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
The nuclides of the cross-sections to include in the report. This
|
||||
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
|
||||
The special string 'all' (default) will report the cross sections
|
||||
for all nuclides in the spatial domain. The special string 'sum'
|
||||
will report the cross sections summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
|
|
@ -820,13 +810,10 @@ class MultiGroupXS(object):
|
|||
----------
|
||||
filename : str
|
||||
Filename for the HDF5 file (default is 'mgxs')
|
||||
|
||||
directory : str
|
||||
Directory for the HDF5 file (default is 'mgxs')
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Store the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
append : boolean
|
||||
If true, appends to an existing HDF5 file with the same filename
|
||||
directory (if one exists)
|
||||
|
|
@ -940,16 +927,12 @@ class MultiGroupXS(object):
|
|||
----------
|
||||
filename : str
|
||||
Filename for the exported file (default is 'mgxs')
|
||||
|
||||
directory : str
|
||||
Directory for the exported file (default is 'mgxs')
|
||||
|
||||
format : {'csv', 'excel', 'pickle', 'latex'}
|
||||
The format for the exported data file
|
||||
|
||||
groups : Iterable of Integral or 'all'
|
||||
Energy groups of interest
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Store the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
|
|
@ -1014,17 +997,14 @@ class MultiGroupXS(object):
|
|||
----------
|
||||
groups : Iterable of Integral or 'all'
|
||||
Energy groups of interest
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
The nuclides of the cross-sections to include in the dataframe. This
|
||||
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
|
||||
The special string 'all' (default) will include the cross sections
|
||||
for all nuclides in the spatial domain. The special string 'sum'
|
||||
will include the cross sections summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
summary : None or Summary
|
||||
An optional Summary object to be used to construct columns for
|
||||
distribcell tally filters (default is None). The geometric
|
||||
|
|
@ -1443,25 +1423,19 @@ class ScatterMatrixXS(MultiGroupXS):
|
|||
----------
|
||||
in_groups : Iterable of Integral or 'all'
|
||||
Incoming energy groups of interest
|
||||
|
||||
out_groups : Iterable of Integral or 'all'
|
||||
Outgoing energy groups of interest
|
||||
|
||||
subdomains : Iterable of Integral or 'all'
|
||||
Subdomain IDs of interest
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
|
||||
special string 'all' (default) will return the cross sections for
|
||||
all nuclides in the spatial domain. The special string 'sum' will
|
||||
return the cross section summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
value : str
|
||||
A string for the type of value to return - 'mean' (default),
|
||||
'std_dev' or 'rel_err' are accepted
|
||||
|
|
@ -1576,14 +1550,12 @@ class ScatterMatrixXS(MultiGroupXS):
|
|||
----------
|
||||
subdomains : Iterable of Integral or 'all'
|
||||
The subdomain IDs of the cross sections to include in the report
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
The nuclides of the cross-sections to include in the report. This
|
||||
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
|
||||
The special string 'all' (default) will report the cross sections
|
||||
for all nuclides in the spatial domain. The special string 'sum'
|
||||
will report the cross sections summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
|
|
@ -1756,23 +1728,18 @@ class Chi(MultiGroupXS):
|
|||
----------
|
||||
groups : Iterable of Integral or 'all'
|
||||
Energy groups of interest
|
||||
|
||||
subdomains : Iterable of Integral or 'all'
|
||||
Subdomain IDs of interest
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
|
||||
special string 'all' (default) will return the cross sections for
|
||||
all nuclides in the spatial domain. The special string 'sum' will
|
||||
return the cross section summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return the macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
This parameter is not relevant for chi but is included here to
|
||||
mirror the parent MultiGroupXS.get_xs(...) class method
|
||||
|
||||
value : str
|
||||
A string for the type of value to return - 'mean' (default),
|
||||
'std_dev' or 'rel_err' are accepted
|
||||
|
|
@ -1888,17 +1855,14 @@ class Chi(MultiGroupXS):
|
|||
----------
|
||||
groups : Iterable of Integral or 'all'
|
||||
Energy groups of interest
|
||||
|
||||
nuclides : Iterable of str or 'all' or 'sum'
|
||||
The nuclides of the cross-sections to include in the dataframe. This
|
||||
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
|
||||
The special string 'all' (default) will include the cross sections
|
||||
for all nuclides in the spatial domain. The special string 'sum'
|
||||
will include the cross sections summed over all nuclides.
|
||||
|
||||
xs_type: {'macro' or 'micro'}
|
||||
Return macro or micro cross section in units of cm^-1 or barns
|
||||
|
||||
summary : None or Summary
|
||||
An optional Summary object to be used to construct columns for
|
||||
distribcell tally filters (default is None). The geometric
|
||||
|
|
|
|||
|
|
@ -742,7 +742,6 @@ class Tally(object):
|
|||
----------
|
||||
filter_type : str
|
||||
The type of Filter (e.g., 'cell', 'energy', etc.)
|
||||
|
||||
filter_bin : Integral or tuple
|
||||
The bin is an integer ID for 'material', 'surface', 'cell',
|
||||
'cellborn', and 'universe' Filters. The bin is an integer for the
|
||||
|
|
@ -854,7 +853,6 @@ class Tally(object):
|
|||
filters : list of str
|
||||
A list of filter type strings
|
||||
(e.g., ['mesh', 'energy']; default is [])
|
||||
|
||||
filter_bins : list of Iterables
|
||||
A list of the filter bins corresponding to the filter_types
|
||||
parameter (e.g., [(1,), (0., 0.625e-6)]; default is []). Each bin
|
||||
|
|
@ -1018,11 +1016,9 @@ class Tally(object):
|
|||
scores : list of str
|
||||
A list of one or more score strings
|
||||
(e.g., ['absorption', 'nu-fission']; default is [])
|
||||
|
||||
filters : list of str
|
||||
A list of filter type strings
|
||||
(e.g., ['mesh', 'energy']; default is [])
|
||||
|
||||
filter_bins : list of Iterables
|
||||
A list of the filter bins corresponding to the filter_types
|
||||
parameter (e.g., [(1,), (0., 0.625e-6)]; default is []). Each bin
|
||||
|
|
@ -1034,11 +1030,9 @@ class Tally(object):
|
|||
3-tuple for 'mesh' filters corresponding to the mesh cell of
|
||||
interest. The order of the bins in the list must correspond to the
|
||||
filter_types parameter.
|
||||
|
||||
nuclides : list of str
|
||||
A list of nuclide name strings
|
||||
(e.g., ['U-235', 'U-238']; default is [])
|
||||
|
||||
value : str
|
||||
A string for the type of value to return - 'mean' (default),
|
||||
'std_dev', 'rel_err', 'sum', or 'sum_sq' are accepted
|
||||
|
|
@ -1112,13 +1106,10 @@ class Tally(object):
|
|||
----------
|
||||
filters : bool
|
||||
Include columns with filter bin information (default is True).
|
||||
|
||||
nuclides : bool
|
||||
Include columns with nuclide bin information (default is True).
|
||||
|
||||
scores : bool
|
||||
Include columns with score bin information (default is True).
|
||||
|
||||
summary : None or Summary
|
||||
An optional Summary object to be used to construct columns for
|
||||
distribcell tally filters (default is None). The geometric
|
||||
|
|
@ -1283,14 +1274,11 @@ class Tally(object):
|
|||
----------
|
||||
filename : str
|
||||
The name of the file for the results (default is 'tally-results')
|
||||
|
||||
directory : str
|
||||
The name of the directory for the results (default is '.')
|
||||
|
||||
format : str
|
||||
The format for the exported file - HDF5 ('hdf5', default) and
|
||||
Python pickle ('pkl') files are supported
|
||||
|
||||
append : bool
|
||||
Whether or not to append the results to the file (default is True)
|
||||
|
||||
|
|
@ -2274,14 +2262,12 @@ class Tally(object):
|
|||
|
||||
Parameters
|
||||
----------
|
||||
scores : list
|
||||
scores : list of str
|
||||
A list of one or more score strings
|
||||
(e.g., ['absorption', 'nu-fission']; default is [])
|
||||
|
||||
filters : list
|
||||
filters : list of str
|
||||
A list of filter type strings
|
||||
(e.g., ['mesh', 'energy']; default is [])
|
||||
|
||||
filter_bins : list of Iterables
|
||||
A list of the filter bins corresponding to the filter_types
|
||||
parameter (e.g., [(1,), (0., 0.625e-6)]; default is []). Each bin
|
||||
|
|
@ -2293,8 +2279,7 @@ class Tally(object):
|
|||
3-tuple for 'mesh' filters corresponding to the mesh cell of
|
||||
interest. The order of the bins in the list must correspond to the
|
||||
filter_types parameter.
|
||||
|
||||
nuclides : list
|
||||
nuclides : list of str
|
||||
A list of nuclide name strings
|
||||
(e.g., ['U-235', 'U-238']; default is [])
|
||||
|
||||
|
|
@ -2398,25 +2383,24 @@ class Tally(object):
|
|||
|
||||
def summation(self, scores=[], filter_type=None,
|
||||
filter_bins=[], nuclides=[]):
|
||||
"""Build a sliced tally for the specified filter bins, nuclides, scores.
|
||||
"""Vectorized sum of tally data across scores, filter bins and/or
|
||||
nuclides using tally addition.
|
||||
|
||||
This method constructs a new tally to encapsulate a subset of the data
|
||||
represented by this tally. The subset of data to include in the tally
|
||||
slice is determined by the scores, filter bins and nuclides specified
|
||||
This method constructs a new tally to encapsulate the sum of the data
|
||||
represented by the summation of the data in this tally. The tally data
|
||||
sum is determined by the scores, filter bins and nuclides specified
|
||||
in the input parameters.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
scores : list
|
||||
scores : list of str
|
||||
A list of one or more score strings to sum across
|
||||
(e.g., ['absorption', 'nu-fission']; default is [])
|
||||
|
||||
filter_type : str
|
||||
A filter type string (e.g., 'cell', 'energy') corresponding to the
|
||||
filter bins to sum across
|
||||
|
||||
filter_bins : Iterable of Integral or tuple
|
||||
A list of the filter bins corresponding to the filters parameter
|
||||
A list of the filter bins corresponding to the filter_type parameter
|
||||
Each bin in the list is the integer ID for 'material', 'surface',
|
||||
'cell', 'cellborn', and 'universe' Filters. Each bin is an integer
|
||||
for the cell instance ID for 'distribcell Filters. Each bin is a
|
||||
|
|
@ -2424,8 +2408,7 @@ class Tally(object):
|
|||
to the energy boundaries of the bin of interest. Each bin is an
|
||||
(x,y,z) 3-tuple for 'mesh' filters corresponding to the mesh cell of
|
||||
interest.
|
||||
|
||||
nuclides : list
|
||||
nuclides : list of str
|
||||
A list of nuclide name strings to sum across
|
||||
(e.g., ['U-235', 'U-238']; default is [])
|
||||
|
||||
|
|
@ -2476,6 +2459,7 @@ class Tally(object):
|
|||
# Accumulate this Tally slice into the Tally sum
|
||||
tally_sum += tally_slice
|
||||
|
||||
# Add back the filter(s) which were summed across to derived tally
|
||||
for filter_type in summed_filters:
|
||||
filters = summed_filters[filter_type]
|
||||
for i in range(1, len(filters)):
|
||||
|
|
@ -2485,24 +2469,25 @@ class Tally(object):
|
|||
return tally_sum
|
||||
|
||||
def diagonalize_filter(self, new_filter):
|
||||
"""Combines filters, scores and nuclides with another tally.
|
||||
"""Diagonalize the tally data array along a new axis of filter bins.
|
||||
|
||||
This is a helper method for the tally arithmetic methods. The filters,
|
||||
scores and nuclides from both tallies are enumerated into all possible
|
||||
combinations and expressed as CrossFilter, CrossScore and
|
||||
CrossNuclide objects in the new derived tally.
|
||||
This is a helper method for the tally arithmetic methods. This routine
|
||||
adds the new filter to a derived tally constructed copied from this one.
|
||||
The data in the derived tally arrays is "diagonalized" along the bins in
|
||||
the new filter. This functionality is used by the openmc.mgxs module; to
|
||||
transport-correct scattering matrices by subtracting a 'scatter-P1'
|
||||
reaction rate tally with an energy filter from an 'scatter' reaction
|
||||
rate tally with both energy and energyout filters.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
other : Tally
|
||||
The tally on the right hand side of the outer product
|
||||
binary_op : {'+', '-', '*', '/', '^'}
|
||||
The binary operation in the outer product
|
||||
new_filter : Filter
|
||||
The filter along which to diagonalize the data in the new
|
||||
|
||||
Returns
|
||||
-------
|
||||
Tally
|
||||
A new Tally outer that is the outer product with this one.
|
||||
A new derived Tally with data diagaonalized along the new filter.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -2513,35 +2498,42 @@ class Tally(object):
|
|||
'contains a "{1}" filter'.format(self.id, new_filter.type)
|
||||
raise ValueError(msg)
|
||||
|
||||
# Add the new filter to a copy of this Tally
|
||||
new_tally = copy.deepcopy(self)
|
||||
new_tally.add_filter(new_filter)
|
||||
|
||||
# Determine the shape of data in the new diagonalized Tally
|
||||
num_filter_bins = new_tally.num_filter_bins
|
||||
num_nuclides = new_tally.num_nuclides
|
||||
num_score_bins = new_tally.num_score_bins
|
||||
new_shape = (num_filter_bins, num_nuclides, num_score_bins)
|
||||
|
||||
diag_factor = self.num_filter_bins / new_filter.num_bins
|
||||
# Determine "base" indices along the new "diagonal", and the factor
|
||||
# by which the "base" indices should be repeated to account for all
|
||||
# other filter bins in the diagonalized tally
|
||||
indices = np.arange(0, new_filter.num_bins**2, new_filter.num_bins+1)
|
||||
diag_factor = self.num_filter_bins / new_filter.num_bins
|
||||
diag_indices = np.zeros(self.num_filter_bins, dtype=np.int)
|
||||
|
||||
# Determine the filter indices along the new "diagonal"
|
||||
for i in range(diag_factor):
|
||||
start = i * new_filter.num_bins
|
||||
end = (i+1) * new_filter.num_bins
|
||||
diag_indices[start:end] = indices + (i * new_filter.num_bins**2)
|
||||
|
||||
# Inject this Tally's data along the diagonal of the diagonalized Tally
|
||||
if self.sum is not None:
|
||||
new_tally._sum = np.zeros(new_shape, dtype=np.float64)
|
||||
new_tally._sum[diag_indices, :self.num_nuclides, :self.num_scores] = self.sum
|
||||
new_tally._sum[diag_indices, :, :] = self.sum
|
||||
if self.sum_sq is not None:
|
||||
new_tally._sum_sq = np.zeros(new_shape, dtype=np.float64)
|
||||
new_tally._sum_sq[diag_indices, :self.num_nuclides, :self.num_scores] = self.sum_sq
|
||||
new_tally._sum_sq[diag_indices, :, :] = self.sum_sq
|
||||
if self.mean is not None:
|
||||
new_tally._mean = np.zeros(new_shape, dtype=np.float64)
|
||||
new_tally._mean[diag_indices, :self.num_nuclides, :self.num_scores] = self.mean
|
||||
new_tally._mean[diag_indices, :, :] = self.mean
|
||||
if self.std_dev is not None:
|
||||
new_tally._std_dev = np.zeros(new_shape, dtype=np.float64)
|
||||
new_tally._std_dev[diag_indices, :self.num_nuclides, :self.num_scores] = self.std_dev
|
||||
new_tally._std_dev[diag_indices, :, :] = self.std_dev
|
||||
|
||||
# Correct each Filter's stride
|
||||
stride = new_tally.num_nuclides * new_tally.num_score_bins
|
||||
|
|
@ -2579,6 +2571,7 @@ class TalliesFile(object):
|
|||
----------
|
||||
tally : Tally
|
||||
Tally to add to file
|
||||
|
||||
merge : bool
|
||||
Indicate whether the tally should be merged with an existing tally,
|
||||
if possible. Defaults to False.
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
from checkvalue import *
|
||||
from checkvalue import _isinstance
|
||||
|
||||
import numpy as np
|
||||
|
||||
zs = np.zeros((2,))
|
||||
|
||||
print _isinstance(zs[0], Integral)
|
||||
print _isinstance(zs[0], Real)
|
||||
print _isinstance(zs[0], (Integral, Real))
|
||||
|
||||
print check_iterable_type('thing', zs, (Real, Integral))
|
||||
Loading…
Add table
Add a link
Reference in a new issue