openmc.MuFilter

class openmc.MuFilter(bins)[source]

Bins tally events based on particle scattering angle.

Parameters:

bins (Iterable of Real or Integral) – A grid of scattering angles which events will binned into. Values represent the cosine of the scattering angle. If an Iterable is given, the values will be used explicitly as grid points. If a single Integral is given, the range [-1, 1] will be divided up equally into that number of bins.

Variables:
  • bins (Integral) – A grid of scattering angles which events will binned into. Values represent the cosine of the scattering angle. If an Iterable is given, the values will be used explicitly as grid points. If a single Integral is given, the range [-1, 1] will be divided up equally into that number of bins.
  • num_bins (Integral) – The number of filter bins
  • stride (Integral) – The number of filter, nuclide and score bins within each of this filter’s bins.
check_bins(bins)[source]

Make sure given bins are valid for this filter.

Raises:
get_pandas_dataframe(data_size, **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:data_size (Integral) – The total number of bins in the tally corresponding to this filter
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:pandas.DataFrame
Raises:ImportError – When Pandas is not installed

See also

Tally.get_pandas_dataframe(), CrossFilter.get_pandas_dataframe()