Work with Simulation Directories¶
This module provides easy access to CACTUS data files.
A simulation directory is represented by an instance of the
SimDir
class, which provides access to all supported
data types.
- class postcactus.simdir.SimDir(path, max_depth=8)¶
This class represents a CACTUS simulation directory.
Data is searched recursively in all subfolders. No particular folder structure (e.g. SimFactory style) is assumed. The following attributes allow access to the supported data types:
- Variables
path – Top level path of simulation directory.
dirs – All directories in which data is searched.
parfiles – The locations of all parameter files.
initial_params – Simulation parameters, see
Parfile
.logfiles – The locations of all log files (.out).
errfiles – The location of all error log files (.err).
ts – Scalar data of various type, see
ScalarsDir
grid – Access to grid function data, see
GridOmniDir
.gwmoncrief – GW signal obtained using Moncrief formalism, see
CactusGWMoncrief
.gwpsi4mp – GW signal from the Weyl scalar multipole decomposition, see
CactusGWPsi4MP
.ahoriz – Apparent horizon information, see
CactusAH
.multipoles – Multipole components, see
CactusMultipoleDir
.metadata – This allows augmenting the simulation folder with metadata, see
MetaDataFolder
.timertree – Access TimerTree data, see
TimerTree
.bns_track – NS trajectories, see
CactusBNSTrack
.hist1d – 1D histograms, see
Hist1DDataDir
.
Constructor.
- Parameters
path (string) – Path to simulation directory.
max_depth (int) – Maximum recursion depth for subfolders.
Folders named ‘SIMFACTORY’, ‘report’, ‘movies’, ‘tmp’, and ‘temp’ and links to folders are excluded from the search for data files. Parfiles (*.par) will be searched in all data directories and the top-level SIMFACTORY/par folder, if it exists. The parfile in the latter folder, if available, or else the oldest parfile in any of the data directories, will be used to extract the simulation parameters. Logfiles (*.out) and errorfiles (*.err) will be searched for in all data directories.