yt.frontends.enzo.simulation_handling.EnzoSimulation

class yt.frontends.enzo.simulation_handling.EnzoSimulation(parameter_filename, find_outputs=False)[source]

Initialize an Enzo Simulation object.

Upon creation, the parameter file is parsed and the time and redshift are calculated and stored in all_outputs. A time units dictionary is instantiated to allow for time outputs to be requested with physical time units. The get_time_series can be used to generate a DatasetSeries object.

parameter_filename : str
The simulation parameter file.
find_outputs : bool
If True, subdirectories within the GlobalDir directory are searched one by one for datasets. Time and redshift information are gathered by temporarily instantiating each dataset. This can be used when simulation data was created in a non-standard way, making it difficult to guess the corresponding time and redshift information. Default: False.

Examples

>>> import yt
>>> es = yt.simulation("my_simulation.par", "Enzo")
>>> es.get_time_series()
>>> for ds in es:
...     print ds.current_time

Methods