Vdisp class¶
To calculate velocity dispersions and rotation curves for the post-merger remnant of MW-M31.
-
class
galaxy.remvdisp.Vdisp(snap=801, ptype=(2, 3), r_lim=60)[source]¶ A class to work with rotation and velocity dispersion of the MW-M31 post-merger remant.
- Args:
- snap (int):
- Snap number, equivalent to time elapsed. Defaults to the last timepoint.
- usesql (bool):
- If True, data will be taken from a PostgreSQL database instead of text files.
- ptype (int or iterable of int):
- Particle type: 1, 2, 3 or a combination of these
-
calc_centered()[source]¶ Sets the CoM position and velocity, plus particle coordinates centered on the CoM.
No args, no return value.
-
rotate(r_lim)[source]¶ Creates transformed coordinates with the angular momentum vector along z.
- Arg:
- r_lim (float):
- Only consider particles within this radius when computing L-hat. Implicit kpc, no units.
-
calc_v_sigma(pos_index, v_index)[source]¶ Calculate mean radial velocities and dispersions for bins along an axis.
- Args:
- pos_index, v_index (integers in (0,1,2)):
- Axis numbers for binning and for radial velocity. x=0, y=1, z=2
- Returns:
- Binned v_radial and dispersions, v_max and central dispersion. All implicit km/s, no units.
-
set_xbins(xbins)[source]¶ Sets new x-boundaries for binning, invalidates any previous calculations.
- Args:
- xbins (array of float):
- Distances from CoM along chosen axis (signed, not just radius)