firefly.data_reader.SimpleFIREreader
- class firefly.data_reader.SimpleFIREreader(path_to_snapshot, decimation_factor=10, JSONdir=None, write_to_disk=True, com=False, **kwargs)[source]
Bases:
firefly.data_reader.FIREreader.FIREreader
- __init__(path_to_snapshot, decimation_factor=10, JSONdir=None, write_to_disk=True, com=False, **kwargs)[source]
- A wrapper to
firefly.data_reader.FIREreader
that will open FIRE collaboration formatted data with minimal interaction from the user and use a “standard” firefly setup with:
ptypes = [0,4]
UInames = ['gas','stars']
fields = ['AgeGyr','Temperature','GCRadius']
- along with some “standard” settings with:
settings['color']['gas'] = [1,0,0,1]
settings['color']['stars'] = [0,0,1,1]
settings['sizeMult']['gas'] = 1
settings['sizeMult']['stars'] = 1
settings['camera'] = [0,0,-15]
- Parameters
path_to_snapshot (str) – path to .hdf5 file(s; can be a directory)
decimation_factor (int, optional) – factor by which to reduce the data randomly i.e.
data=data[::decimation_factor]
, defaults to 10JSONdir (str, optional) – the sub-directory that will contain your JSON files, relative to your
$HOME directory
. , defaults to$HOME/<JSON_prefix>
write_to_disk (bool, optional) – flag that controls whether data is saved to disk (
True
) or only converted to a string and stored inself.JSON
(False
), defaults to Truecom (bool, optional) – flag to offset all coordinates by the COM of the snapshot, defaults to False
- Raises
ValueError – if a snapnum cannot be inferred from the path_to_snapshot
- A wrapper to