KinematicOptions

class dysmalpy.models.KinematicOptions(adiabatic_contract=False, pressure_support=False, pressure_support_type=1, pressure_support_re=None, pressure_support_n=None)[source]

Bases: object

Object for storing and applying kinematic corrections

Parameters:
  • adiabatic_contract (bool) – If True, apply adiabatic contraction when deriving the rotational velocity

  • pressure_support (bool) – If True, apply asymmetric drift correction when deriving the rotational velocity

  • pressure_support_type ({1, 2, 3}) – Type of asymmetric drift correction. Default is 1 (following Burkert et al. 2010).

  • pressure_support_re (float) – Effective radius in kpc to use for asymmetric drift calculation

  • pressure_support_n (float) – Sersic index to use for asymmetric drift calculation

Notes

Adiabatic contraction is applied following Burkert et al (2010) [1]. The recipe involves numerically solving these two implicit equations:

\[ \begin{align}\begin{aligned}v^2_{\rm circ}(r) = v^2_{\rm disk}(r) + v^2_{\rm DM}(r^{\prime})\\r^{\prime} = r\left(1 + \frac{rv^2_{\rm disk}(r)}{r^{\prime} v^2_{\rm DM}(r^{\prime})}\right)\end{aligned}\end{align} \]

Adiabatic contraction then can only be applied if there is a halo and baryon component in the ModelSet.

Pressure support (i.e., asymmetric drift) can be calculated in three different ways.

By default (pressure_support_type=1), the asymmetric drift derivation from Burkert et al. (2010) [1], Equation (11) is applied (assuming an exponential disk, with \(R_e=1.678r_d\)):

\[v^2_{\rm rot}(r) = v^2_{\rm circ} - 3.36 \sigma_0^2 \left(\frac{r}{R_e}\right)\]

Alternatively, for pressure_support_type=2, the Sersic index can be taken into account beginning from Eq (9) of Burkert et al. (2010), so the asymmetric drift is then:

\[v^2_{\rm rot}(r) = v^2_{\rm circ} - 2 \sigma_0^2 \frac{b_n}{n} \left(\frac{r}{R_e}\right)^{1/n}\]

Finally, for pressure_support_type=3, the asymmetric drift is determined using the pressure gradient (assuming constant veloctiy dispersion \(\sigma_0\)). This approach allows for explicitly incorporating different gradients \(d\ln{}\rho(r)/d\ln{}r\) for different components (versus applying the disk geometry inherent in the in the later parts of the Burkert et al. derivation). For pressure_support_type=3, we follow Eq (3) of Burkert et al. (2010):

\[v^2_{\rm rot}(r) = v^2_{\rm circ} + \sigma_0^2 \frac{d \ln \rho(r)}{d \ln r}\]

Warning

Adiabatic contraction can significantly increase the computation time for a ModelSet to simulate a cube.

References

Methods Summary

apply_adiabatic_contract(model, r, ...[, ...])

Function that applies adiabatic contraction to a ModelSet

apply_pressure_support(r, model, vel_sq[, ...])

Function to apply asymmetric drift correction

correct_for_pressure_support(r, model, vel_sq)

Remove asymmetric drift effect from input velocities

get_asymm_drift_profile(r, model[, tracer])

Calculate the asymmetric drift correction

get_pressure_support_param(model[, param])

Return model parameters needed for asymmetric drift calculation

Methods Documentation

apply_adiabatic_contract(model, r, vbaryon_sq, vhalo_sq, compute_dm=False, return_vsq=False, step1d=0.2)[source]

Function that applies adiabatic contraction to a ModelSet

Parameters:
  • model (ModelSet) – ModelSet that adiabatic contraction will be applied to

  • r (array) – Radii in kpc

  • vbaryon_sq (array) – Square of baryonic component circular velocities in km^2/s^2

  • vhalo_sq (array) – Square of dark matter halo circular velocities in km^2/s^2

  • compute_dm (bool) – If True, will return the adiabatically contracted halo velocities.

  • return_vsq (bool) – If True, return square velocities instead of taking sqrt.

  • step1d (float) – Step size in kpc to use during adiabatic contraction calculation

Returns:

  • vel (array) – Total circular velocity corrected for adiabatic contraction in km/s

  • vhalo_adi (array) – Dark matter halo circular velocities corrected for adiabatic contraction. Only returned if compute_dm = True

apply_pressure_support(r, model, vel_sq, tracer=None)[source]

Function to apply asymmetric drift correction

Parameters:
  • r (float or array) – Radius or radii at which to apply the correction

  • model (ModelSet) – ModelSet for which the correction is applied to

  • vel_sq (float or array) – Square of circular velocity in km^2/s^2

  • tracer (string) – Name of the dynamical tracer (used to determine which is the appropriate dispersion profile).

Returns:

vel_sq – Square of rotational velocity with asymmetric drift applied, in km^2/s^2

Return type:

float or array

correct_for_pressure_support(r, model, vel_sq, tracer=None)[source]

Remove asymmetric drift effect from input velocities

Parameters:
  • r (float or array) – Radius or radii in kpc

  • model (ModelSet) – ModelSet the correction is applied to

  • vel_sq (float or array) – Square of rotational velocities in km^2/s^2 from which to remove asymmetric drift

  • tracer (string) – Name of the dynamical tracer (used to determine which is the appropriate dispersion profile).

Returns:

vel_sq – Square of circular velocity after asymmetric drift is removed, in km^2/s^2

Return type:

float or array

get_asymm_drift_profile(r, model, tracer=None)[source]

Calculate the asymmetric drift correction

Parameters:
  • r (float or array) – Radius or radii in kpc

  • model (ModelSet) – ModelSet the correction is applied to

  • tracer (string) – Name of the dynamical tracer (used to determine which is the appropriate dispersion profile).

Returns:

vel_asymm_drift_sq – Square velocity correction in km^2/s^2 associated with asymmetric drift

Return type:

float or array

get_pressure_support_param(model, param=None)[source]

Return model parameters needed for asymmetric drift calculation

Parameters:
  • model (ModelSet) – ModelSet the correction is applied to

  • param ({'n', 're'}) – Which parameter value to retrieve. Either the effective radius or Sersic index

Returns:

p_val – Parameter value

Return type:

float