EnzoSimulation.
from_filenames
(filenames, parallel=True, setup_function=None, **kwargs)¶Create a time series from either a filename pattern or a list of filenames.
This method provides an easy way to create a
DatasetSeries
, given a set of
filenames or a pattern that matches them. Additionally, it can set the
parallelism strategy.
Parameters: | filenames : list or pattern
parallel : True, False or int
setup_function : callable, accepts a ds
|
---|
Examples
>>> def print_time(ds):
... print ds.current_time
...
>>> ts = DatasetSeries.from_filenames(
... "GasSloshingLowRes/sloshing_low_res_hdf5_plt_cnt_0[0-6][0-9]0",
... setup_function = print_time)
...
>>> for ds in ts:
... SlicePlot(ds, "x", "Density").save()