openmc.MeshSurfaceFilter

class openmc.MeshSurfaceFilter(mesh, filter_id=None)[source]

Filter events by surface crossings on a regular, rectangular mesh.

Parameters:
  • mesh (openmc.MeshBase) – The mesh object that events will be tallied onto
  • filter_id (int) – Unique identifier for the filter
Variables:
  • bins (list of tuple) – The mesh ID
  • mesh (openmc.MeshBase) – The mesh object that events will be tallied onto
  • id (int) – Unique identifier for the filter
  • bins – A list of mesh indices / surfaces for each filter bin, e.g. [(1, 1, ‘x-min out’), (1, 1, ‘x-min in’), …]
  • num_bins (Integral) – The number of filter bins
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:
  • 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 three columns describing the x,y,z mesh cell indices corresponding to 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

See also

Tally.get_pandas_dataframe(), CrossFilter.get_pandas_dataframe()