Approaches class¶
Convenience class to get concatenated data for all galaxies. Mainly used when they are in close proximity and can appear on the same plot.
-
class
galaxy.approaches.Approaches(snap=801, datadir=None, usesql=False, stride=1, ptype='lum')[source]¶ A class to work with all 3 galaxies when in close proximity.
- Args:
- snap (int):
- Snap number, equivalent to time elapsed. Defaults to the last timepoint.
- datadir (str):
- Directory to search first for the required file. Optional, and a default list of locations will be searched.
- usesql (bool):
- If True, data will be taken from a PostgreSQL database instead of text files.
- stride (int):
- Optional. For stride=n, get every nth row in the table. Only valid with usesql=True.
- ptype (str):
- can be ‘lum’ for disk+bulge, ‘dm’ for halo
- Class attributes:
- data (np.ndarray):
- type, mass, position_xyz, velocity_xyz for each particle