openmc.AzimuthalFilter

class openmc.AzimuthalFilter(bins, filter_id=None)[source]

Bins tally events based on the incident particle’s direction.

Parameters:
  • bins (Iterable of Real or Integral) – A grid of azimuthal angles which events will binned into. Values represent an angle in radians relative to the x-axis and perpendicular to the z-axis. If an Iterable is given, the values will be used explicitly as grid points. If a single Integral is given, the range [-pi, pi) will be divided up equally into that number of bins.
  • filter_id (int) – Unique identifier for the filter
Variables:
  • bins (Iterable of Real or Integral) – A grid of azimuthal angles which events will binned into. Values represent an angle in radians relative to the x-axis and perpendicular to the z-axis. If an Iterable is given, the values will be used explicitly as grid points. If a single Integral is given, the range [-pi, pi) will be divided up equally into that number of bins.
  • id (int) – Unique identifier for the filter
  • num_bins (Integral) – The number of filter bins
check_bins(bins)[source]

Make sure given bins are valid for this filter.

Raises:
get_pandas_dataframe(data_size, stride, paths=True)[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 (int) – The total number of bins in the tally corresponding to this filter
  • stride (int) – Stride in memory for the filter
Returns:

A Pandas DataFrame with a column corresponding to the lower azimuthal angle bound for each of the filter’s bins. 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

See also

Tally.get_pandas_dataframe(), CrossFilter.get_pandas_dataframe()