Galaxies angular momentum

Code author: Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>

Functions and classes related to angular momenta of galaxies.

class galaxy.angularMomentum.PhotoMomentum(z: Union[int, float], image: numpy.ndarray, xc: Union[int, float], yc: Union[int, float], inc: Union[int, float, astropy.units.quantity.Quantity], PA: Union[int, float, astropy.units.quantity.Quantity], pscale: Union[int, float] = 0.03)[source]

Class which computes the angular momentum from photometry given a rotation curve. In the unnormalised case

\[J_z = \sum_i R_i \Sigma (\vec x_i) V(R_i) \Delta S,\]

where \(\Sigma(\vec x_i)\) is the surface brightness profile measured in the photometry at position \(\vec x_i\), \(R_i\) is the radial distance of a pixel i and \(\Delta S\) is the surface of a pixel.

In the normalised case we have instead

\[j = \sum_i R-i \Sigma (\vec x_i) V(R_i) / \sum_i \Sigma (\vec x_i).\]
Parameters
  • z (int or float) – redshift

  • image (ndarary) – image to compute the angular momentum from

  • xc (int or float) – centre x position in pixel units

  • yc (int or float) – centre y position in pixel units

  • inc (int, float or an Astropy Quantity) – inclination in degrees if not an Astropy Quantity between 0° (face on) and 90° (edge-on)

  • PA (int, float or an Astropy Quantity) – position angle with respect to the North (angles are counted similarly as Galfit) in degrees if not an Astropy Quantity

  • pscale (int or float) – (Optional) pixel scale in arcsec/pixel. Default is 0.03 arcsec/pixel.

Raises

ValueError – if

  • xc < 0 or yc < 0

  • inc < 0° or inc > 90°

  • PA < -180° or PA > 180°

R

Radial grid in pixel unit

R_kpc

Radial grid in kpc

custom_rotation_curve(rotation_curve: Callable[[...], Union[int, float]], r: Union[int, float], normalise: bool = True, r_norm: Union[int, float] = inf, norm: Optional[numpy.ndarray] = None, args: List = []) float[source]

Compute the angular momentum using a custom rotation curve up to radius r.

Parameters
  • rotation_curve (func) – function representing the total rotation curve used to compute the angular momentum. Its first parameter must always be the radial distance r.

  • r (int or float) – distance up to which to compute the angular momentum (must be in kpc)

  • normalise (bool) – (Optional) whether to normalise. If norm is None, the norm is calculated from the photometry within r_norm. Default is True.

  • r_norm (int or float) – (Optional) radius where to compute the normalisation. Only used if normalise is True and norm is None. Default is inifinity.

  • norm (ndarray) – (Optional) custom normalisation to apply

  • args – (Optional) arguments to pass to the rotation curve function. Default is no argument (empty list).

Returns

central angular momentum along the vertical axis using the custom rotation curve. When normalised the unit is similar to r * rotation_curve

Return type

int or float

Raises
  • TypeError – if rotation_curve is not a callable function

  • ValueError – if r < 0

im

Photometry

norm(r: Union[int, float] = inf) Union[int, float][source]

Compute the normalisation factor from the photometry.

Parameters

r (int or float) – (Optional) radius where the normalisation is computedin kpc. By default the normalisation is computed at infinity.

Returns

normalisation factor

Return type

int or float

pscale

Pixel scale in arcsec

pscale_kpc

Pixel scale in kpc

psurface

Pixel surface in kpc^2

z

Galaxy redshift

class galaxy.angularMomentum.SersicMomentum(n: Union[int, float] = 1, Re: Union[int, float] = 10, Ie: Union[int, float] = 10)[source]

Class which computes the angular momentum for a single Sérsic profile in the unnormalised case

\[J_z = 2\pi \int_0^\infty dR~R^2 \Sigma (R) V(R),\]

and, in the normalised case

\[j = \frac{\int_0^\infty dR~R^2 \Sigma (R) V(R)}{\int_0^\infty dR~R \Sigma (R)},\]

where \(\Sigma(R) = Ie \times e^{-b_n \left [ (R/R_e)^{1/n} - 1 \right ]}\).

Parameters
  • n (int or float) – (Optional) Sérsic index

  • Re (int or float) – (Optional) effective radius

  • Ie (int or float) – (Optional) Surface brightness at Re

Raises

ValueError – if

  • n < 0

  • Re <= 0

  • Ie < 0

custom_rotation_curve(rotation_curve: Callable[[...], Union[int, float]], r: Union[int, float], normalise: bool = True, r_norm: Union[int, float] = inf, args: List = []) Tuple[float, float][source]

Compute the angular momentum using a custom rotation curve up to radius r.

Parameters
  • rotation_curve (func) – function representing the total rotation curve used to compute the angular momentum. Its first parameter must always be the radial distance r.

  • r (int or float) – distance up to which to compute the angular momentum

  • normalise (bool) – (Optional) whether to normalise by the first order moment of the light distribution. Default is True.

  • r_norm – (Optional) radius where to compute the normalisation. Only used if normalise is True. Default is inifinity.

  • args – (Optional) arguments to pass to the rotation curve function. Default is not argument (empty list).

Returns

central angular momentum along the vertical axis using the custom rotation curve and its error. When normalised the unit is similar to r * rotation_curve

Return type

tuple of int or float

Raises
  • TypeError – if rotation_curve is not a callable function

  • ValueError – if r < 0

linear_ramp(r: Union[int, float], rt: Union[int, float], vt: Union[int, float], normalise: bool = True, r_norm: Union[int, float] = inf) Union[int, float][source]

Compute the angular momentum using a linear ramp model up to radius r whose rotation curve is

\[V(R) = V_t \times R/r_t \ \ {\rm{if}}\ \ R \leq r_t\ \ {\rm{else}}\ \ V_t\]
Parameters
  • r (int or float) – radius where the angular momentum is computed

  • rt (int or float) – kinematical transition radius. Must be of the same unit as Re.

  • vt (int or float) – kinematical plateau velocity (must be positive)

  • normalise (bool) – (Optional) whether to normalise by the first order moment of the light distribution. Default is True.

  • r_norm – (Optional) radius where to compute the normalisation. Only used if normalise is True. Default is inifinity.

Returns

central angular momentum along the vertical axis. When normalised, the unit is that of rt*vt.

Return type

int or float

Raises

ValueError – if

  • r < 0

  • rt <= 0

  • vt <= 0

norm(r: Union[int, float] = inf) Union[int, float][source]

Compute the normalisation factor for the angular momentum up to radius r.

Parameters

r (int or float) – (Optional) radius where the normalisation is computed. By default the normalisation is computed at infinity.

Returns

normalisation factor

Return type

int or float

galaxy.angularMomentum.momentum(rt, vt, n=1, Re=10, Ie=10, normalise=True)[source]

Compute the analytical angular momentum for a single Sérsic profile and a ramp model rotation curve in the unnormalised case

\[J_z = 2\pi \int_0^\infty dR~R^2 \Sigma (R) V(R),\]

and, in the normalised case

\[j = \frac{\int_0^\infty dR~R^2 \Sigma (R) V(R)}{\int_0^\infty dR~R \Sigma (R)},\]

where

\[\begin{split}\Sigma(R) &= Ie \times e^{-b_n \left [ (R/R_e)^{1/n} - 1 \right ]} \\ V(R) &= V_t \times R/r_t \ \ {\rm{if}}\ \ R \leq r_t \ \ {\rm{else}} \ \ V_t\end{split}\]
Parameters
  • rt (int or float) – kinematical transition radius

  • vt (int or float) – kinematical plateau velocity (must be positive)

  • Ie (int or float) – (Optional) flux at Re

  • n (int or float) – (Optional) Sérsic index

  • normalise (bool) – (Optional) whether to normalise by the first order moment of the light distribution. Default is True

  • Re (int or float) – (Optional) effective radius. Must have the same unit as rt. Default is 10.

Returns

central angular momentum along the vertical axis. When normalised, the unit is that of rt*vt.

Return type

int or float

Raises

ValueError – if

  • rt <= 0

  • vt <= 0

galaxy.angularMomentum.sersic_kthMoment(k: Union[int, float], vmin: Union[int, float], vmax: Union[int, float], n: Union[int, float] = 1, Re: Union[int, float] = 10, Ie: Union[int, float] = 10) Union[int, float][source]

Compute the kth radial moment for a Sérsic profile

\[\int_{v_{\rm{min}}}^{v_{\rm{max}}} dr~r^k \Sigma(r)\]
Parameters
  • k (int or float) – order of the moment

  • vmin (int or float) – lower bound to compute the kth moment. Must be greater than 0 and less than vmax. Should be the same unit as Re.

  • vmax (int or float) – upper bound to compute the kth moment. Must be greater than 0 and more than vmin. Should be the same unit as Re.

  • Ie (int or float) – (Optional) flux at Re

  • n (int or float) – (Optional) Sérsic index

  • Re (int or float) – (Optional) effective radius

Returns

kth order moment

Return type

int or float

Raises

ValueError – if vmin<0 or vmin >= vmax