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)
set_yx()[source]

Convenience method to call calc_v_sigma() with y-axis and x-velocities

set_zx()[source]

Convenience method to call calc_v_sigma() with z-axis and x-velocities

plot_yx(particles='Stellar', xlim=(-40, 40), ylim1=(-120, 120), ylim2=(0, 200), xbins=None, pngout=False, fname=None)[source]

Wrapper for Plots.plot_v-sigma()

plot_zx(particles='Stellar', xlim=(-40, 40), ylim1=(-120, 120), ylim2=(0, 200), xbins=None, pngout=False, fname=None)[source]

Wrapper for Plots.plot_v-sigma()