openmc.Tracks
- class openmc.Tracks(filepath='tracks.h5')[source]
Collection of particle tracks
This class behaves like a list and can be indexed using the normal subscript notation. Each element in the list is a
openmc.Trackobject.Added in version 0.13.1.
- Parameters:
filepath (str or pathlib.Path) – Path of file to load
- static combine(track_files, path='tracks.h5')[source]
Combine multiple track files into a single track file
- Parameters:
track_files (list of path-like) – Paths to track files to combine
path (path-like) – Path of combined track file to create
- filter(particle=None, state_filter=None)[source]
Filter tracks by given criteria
- Parameters:
particle ({'neutron', 'photon', 'electron', 'positron'}) – Matching particle type
state_filter (function) – Function that takes a state (structured datatype) and returns a bool depending on some criteria.
- Returns:
List of
openmc.Trackobjects- Return type:
See also