sarracen.read_gasoline
- sarracen.read_gasoline(filename: str, outtype: str = 'sarracen') Tuple[SarracenDataFrame, SarracenDataFrame, SarracenDataFrame] | Tuple[dict, dict, dict, dict] | int
Read data from a Gasoline tipsy file.
Particles are separated into three data structures – one for SPH gas particles, one for dark matter particles, and one for star particles.
Global values stored in the dump file are stored within the SarracenDataFrames in the dictionary
params. If the output type is Python dictionaries, then an additional dictionary is returned with the global variables.- Parameters:
filename (str) – Name of the file to be loaded.
outtype ({'sarracen', 'dict'}, default='sarracen') – Whether to return data in SarracenDataFrames or Python dictionaries.
- Return type:
list of SarracenDataFrames or Python dictionaries
Notes
Adapted from PyTipsy.
Examples
Particles are separated into gas, dark matter, and star particles.
>>> sdf_g, sdf_dm, sdf_star = sarracen.read_gasoline('dumpfile')
The outtype parameter can be used to change the return type to Python dictionaries. This will return global variables in a separate dictionary.
>>> header, catg, catd, cats = sarracen.read_gasoline('dumpfile', outtype='dict')