openmc.EnergyFilter¶
-
class
openmc.
EnergyFilter
(bins, filter_id=None)[source]¶ Bins tally events based on incident particle energy.
Parameters: - bins (Iterable of Real) – A grid of energy values in eV.
- filter_id (int) – Unique identifier for the filter
Variables: -
get_bin_index
(filter_bin)[source]¶ Returns the index in the Filter for some bin.
Parameters: filter_bin (Integral or tuple) – The bin is the integer ID for ‘material’, ‘surface’, ‘cell’, ‘cellborn’, and ‘universe’ Filters. The bin is an integer for the cell instance ID for ‘distribcell’ Filters. The bin is a 2-tuple of floats for ‘energy’ and ‘energyout’ filters corresponding to the energy boundaries of the bin of interest. The bin is an (x,y,z) 3-tuple for ‘mesh’ filters corresponding to the mesh cell of interest. Returns: filter_index – The index in the Tally data array for this filter bin. Return type: Integral See also
-
get_pandas_dataframe
(data_size, stride, **kwargs)[source]¶ Builds a Pandas DataFrame for the Filter’s bins.
This method constructs a Pandas DataFrame object for the filter with columns annotated by filter bin information. This is a helper method for
Tally.get_pandas_dataframe()
.Parameters: Returns: A Pandas DataFrame with one column of the lower energy bound and one column of upper energy bound for each filter bin. The number of rows in the DataFrame is the same as the total number of bins in the corresponding tally, with the filter bin appropriately tiled to map to the corresponding tally bins.
Return type: See also
Tally.get_pandas_dataframe()
,CrossFilter.get_pandas_dataframe()