Public Methods

The following methods are part of our publicly exported API.

Stellar-Mass-Halo-Mass Relation

AstroScalingRelations.flumFunction
flum(Mh::Real, mdef::String="vir")

Analytic approximations to the fraction of halos with mass definition mdef of mass Mh (in solar masses) that are luminous, based on Fig. 3 and 12 of Dooley 2017b. If mdef="late z", then it is most similar to the purple dashed or solid green models in Figure 12. This was Annika's code. mdef="200c" is most similar to the Barber (blue) model in Figure 3. mdef="vir" is most similar to the yellow model in Figure 3. mdef="350c" is most similar to the red model in Figure 3. If mdef="const", then just return 1; e.g. 100% luminous fraction at all halo masses.

Examples

julia> flum(1e10, "late z") ≈ 0.9999938558253978
true

julia> flum(1e10, "200c") ≈ 0.9994793959258891
true

julia> flum(1e10, "vir") ≈ 0.9878715650157257
true

julia> flum(1e10, "350c") ≈ 0.9933071490757152
true

julia> flum(1e10, "const") ≈ 1.0
true
source
AstroScalingRelations.Moster2013Function
Moster2013(Mh, z, M10=11.59, M11=1.195, N10=0.0351, N11=-0.0247, B10=1.376, B11=-0.826, gamma10=0.608, gamma11=0.329)

Given a halo mass Mh (M200c in solar masses) and a redshift z, return the median stellar mass from the Moster et al. 2013 empirical model. If Mh is a Unitful.Mass, will return a Unitful.Mass.

Examples

julia> Moster2013( 1e12, 0.0 ) ≈ 3.427515185606664e10
true

julia> Moster2013( 1e12 * UnitfulAstro.Msun, 0.0 ) ≈ 3.427515185606664e10 * UnitfulAstro.Msun
true

Notes

Moster et al. 2013 utilized the Millennium simulation (Springel et al. 2005) for high-mass halos and the Millennium-II simulation (Boylan-Kolchin et al. 2009) for low-mass halos. At low redshift, they use the stellar mass function of Li & White 2009 derived from SDSS DR7, ranging from stellar masses of 10^8.3 to 10^11.7 solar masses. This is supplemented by the low-mass stellar mass function from Baldry et al. 2008 for stellar masses between 10^7.4 to 10^8.3 solar masses. The high-redshift galaxy sample covers redshifts 0 < z < 4, using data from Perez-Gonzalez et al. 2008 for high-mass galaxies and Santini et al. 2012 for low-mass galaxies. See Figure 6 in Moster et al. 2013 for a visualization of the adopted stellar mass functions.

source
AstroScalingRelations.Behroozi2013Function
Behroozi2013(Mh, z)

Given a halo mass Mh (specifically the peak virial halo mass in solar masses, as defined in Bryan & Norman 1998) and a redshift z, return the median stellar mass from the Behroozi et al. 2013 empirical model. If Mh is a Unitful.Mass, will return a Unitful.Mass.

Examples

julia> Behroozi2013( 1e12, 0.0 ) ≈ 2.6798246456860065e10
true

julia> Behroozi2013( 1e12 * UnitfulAstro.Msun, 0.0 ) ≈ 2.6798246456860065e10 * UnitfulAstro.Msun
true
source
AstroScalingRelations.GK14Function
GK14(Mh, z)

Given a halo mass Mh (specifically the peak virial halo mass in solar masses, as defined in Bryan & Norman 1998) and a redshift z, return the median stellar mass from the Garrison-Kimmel et al. 2014 empirical model. If Mh is a Unitful.Mass, will return a Unitful.Mass. This is the same model as Behroozi2013, but with a shallower low-mass slope (α). See Figures 9 and 10.

Examples

julia> GK14( 1e12, 0.0 ) ≈ 2.894144183405201e10
true

julia> GK14( 1e12 * UnitfulAstro.Msun, 0.0 ) ≈ 2.894144183405201e10 * UnitfulAstro.Msun
true
source
AstroScalingRelations.GK17_fieldFunction
GK17_field(Mh, z, nu=-0.2)

Given a halo mass Mh (specifically the peak virial halo mass in solar masses, as defined in Bryan & Norman 1998) and a redshift z, return the median stellar mass for field galaxies from the Garrison-Kimmel et al. 2017 empirical model. If Mh is a Unitful.Mass, will return a Unitful.Mass. This uses the model of Behroozi2013 at high masses, but has a variable low-mass slope (α) and scatter (σν). The argument nu is the slope of the scatter in the SMHM relation (ν in their Equation 3). The default is -0.2 as in Dooley et al. 2017 "An Observers Guide ...".

Examples

julia> GK17_field( 1e12, 0.0, -0.2 ) ≈ 2.9300795754861504e10
true

julia> GK17_field( 1e12 * UnitfulAstro.Msun, 0.0, -0.2 ) ≈ 2.9300795754861504e10 * UnitfulAstro.Msun
true
source
AstroScalingRelations.GK17_satFunction
GK17_sat(Mh, z, nu=-0.2)

Given a halo mass Mh (specifically the peak virial halo mass in solar masses, as defined in Bryan & Norman 1998) and a redshift z, return the median stellar mass for satellite galaxies from the Garrison-Kimmel et al. 2017 empirical model. If Mh is a Unitful.Mass, will return a Unitful.Mass. This uses the model of Behroozi2013 at high masses, but has a variable low-mass slope (α) and scatter (σν). The argument nu is the slope of the scatter in the SMHM relation (ν in their Equation 3). The default is -0.2 as in Dooley et al. 2017 "An Observers Guide ...".

Examples

julia> GK17_sat( 1e12, 0.0, -0.2 ) ≈ 2.860110341918958e10
true

julia> GK17_sat( 1e12 * UnitfulAstro.Msun, 0.0, -0.2 ) ≈ 2.860110341918958e10 * UnitfulAstro.Msun
true
source

Gas Outflow Models (Mass-Loading Factors)

AstroScalingRelations.Muratov2015Function
Muratov2015(Mstar)
Muratov2015(Vvir, z)

The model for the galaxy-scale mass-loading factor η from Muratov et al. 2015, based on FIRE-1 simulations. Two parameterizations are allowed; one which is based on the galaxy's stellar mass (Mstar) in solar masses and one which is based on the circular velocity at the virial radius (Vvir) of the galaxy's dark matter halo in km/s and the redshift of evaluation (z). Both parameterizations can be Unitful quantities. See also Pandya2021.

Examples

julia> Muratov2015( 1e10 ) ≈ 3.6
true

julia> Muratov2015( 1e10 * UnitfulAstro.Msun ) ≈ 3.6
true

julia> Muratov2015( 40, 1 ) ≈ 26.135392171726632
true

julia> Muratov2015( 40 * Unitful.km / Unitful.s, 1 ) ≈ 26.135392171726632
true
source
AstroScalingRelations.Christensen2016Function
Christensen2016(Vvir)

The model for the halo-scale mass-loading factor η from Christensen et al. 2016, based on simulations run with the GASOLINE hydrodynamical model. The model requires the circular velocity at the virial radius (Vvir) of the galaxy's dark matter halo in km/s. Vvir can be a Unitful.Velocity. Note that the normalization of the relation is not given explicitly in the paper, only the scaling is; the prefactor here was estimated from their Figure 11.

Examples

julia> Christensen2016( 40 ) ≈ 3.0028111668298063
true

julia> Christensen2016( 40 * Unitful.km / Unitful.s ) ≈ 3.0028111668298063
true
source
AstroScalingRelations.Pandya2021Function
Pandya2021(Mstar)
Pandya2021(Vvir, z)

The model for the galaxy-scale mass-loading factor η from Pandya et al. 2021, based on FIRE-2 simulations. Two parameterizations are allowed; one which is based on the galaxy's stellar mass (Mstar) in solar masses and one which is based on the circular velocity at the virial radius (Vvir) of the galaxy's dark matter halo in km/s and the redshift of evaluation (z). Originally calculated for redshift $0 ≤ z ≤ 4$ but will extrapolate outside this range. Both parameterizations can be Unitful quantities. This work finds that halo-scale mass-loading factors are larger than galaxy-scale mass-loading factors due to entrainment of additional CGM gas (see Section 5 and Figure 14).

Examples

julia> isapprox( Pandya2021( 1e10 ), 0.6309573444801929; rtol=1e-7 )
true

julia> isapprox( Pandya2021( 1e10 * UnitfulAstro.Msun ), 0.6309573444801929; rtol=1e-7 )
true

julia> all( isapprox.( Pandya2021.( 40, (0.0, 1.0, 3.0) ), (12.977828436995544, 21.609465380663718, 24.88169815959356); rtol=1e-7 ) )
true

julia> isapprox( Pandya2021( 40 * Unitful.km / Unitful.s, 1 ), 21.609465380663718; rtol=1e-7 )
true
source

Gas Mass / Profile Relations

AstroScalingRelations.Papastergis2012Function
Papastergis2012(Mstar)

Returns the mean neutral hydrogen gas mass of a galaxy with stellar mass Mstar in solar masses; this is the black line in Figure 19 of Papastergis et al. 2012. Based on a crossmatch between SDSS galaxies and sources detected in the blind ALFALFA α.40 survey. If Mstar is a Unitful.Mass, will return a Unitful.Mass.

Examples

julia> Papastergis2012(1e8) ≈ 2.0417379446695232e8
true

julia> Papastergis2012(1e8 * UnitfulAstro.Msun) ≈ 2.0417379446695232e8 * UnitfulAstro.Msun
true
source
AstroScalingRelations.Bradford2015Function
Bradford2015(Mstar)

Returns the median neutral hydrogen gas mass of an isolated galaxy with stellar mass Mstar in solar masses according to Equation in Bradford et al. 2015. Uses coefficients from the first two rows of Table 3. These are derived for galaxies selected from SDSS DR8 with stellar masses between exp10(7) and exp10(9.5).

Examples

julia> Bradford2015(1e8) ≈ 4.487453899331332e8
true

julia> Bradford2015(1e8 * UnitfulAstro.Msun) ≈ 4.487453899331332e8 * UnitfulAstro.Msun
true
source
AstroScalingRelations.Scoville2017Function
Scoville2017(Mstar [, z])

Returns the median neutral hydrogen gas mass of a galaxy with stellar mass Mstar in solar masses at redshift z according to Equation 6 in Scoville et al. 2017. This does not include the specfic star formation rate dependence. These are derived from ALMA dust continuum emission (see Section 4) for well-studied galaxies in the COSMOS field between redshifts 0.3 and 4.5. If Mstar is a Unitful.Mass, will return a Unitful.Mass.

Examples

julia> Scoville2017(1e8) ≈ 1.7759037070772731e9
true

julia> Scoville2017(1e8 * UnitfulAstro.Msun) ≈  1.7759037070772731e9 * UnitfulAstro.Msun
true

julia> Scoville2017(1e8, 1.0) ≈ 6.357913365552342e9
true

julia> Scoville2017(1e8 * UnitfulAstro.Msun, 1.0) ≈ 6.357913365552342e9 * UnitfulAstro.Msun
true
source
AstroScalingRelations.Wang2016_DHIFunction
Wang2016_DHI(MHI)

Returns the HI diameter, defined as the diameter at which the HI surface density equals 1 Msun/pc^2, in kiloparsecs given an HI mass follwing Equation 2 in Wang et al. 2016. If Mstar is a Unitful.Mass, will return a Unitful.Length.

Examples

julia> Wang2016_DHI(1e8) ≈ 5.688529308438413
true

julia> Wang2016_DHI(1e8 * UnitfulAstro.Msun) ≈ 5.688529308438413 * UnitfulAstro.kpc
true
source
AstroScalingRelations.Wang2016_rho_rsFunction
(Σ₀, rs) = Wang2016_rho_rs(MHI)

Returns the central surface density Σ₀ in Msun/pc^2 and the scale radius rs in parsecs that defines the surface density profile $Σ(r) = Σ₀ \exp (-r/rs)$ for a galaxy with an HI disk mass of MHI in solar masses, using the Wang et al. 2016 relation between HI mass and HI disk diameter.

Examples

julia> all( Wang2016_rho_rs(1e6) .≈ (4.009796759878976, 199.2273166291845) )
true

julia> all( Wang2016_rho_rs(1e12) .≈ (7.045959041825033, 150293.43437081948) )
true
source

Mass-Metallicity Relations

AstroScalingRelations.MoustakasMZRType
MoustakasMZR(OH0::Real, M_to::Real, γ::Real)

General form for the asymptotic logarithmic MZR suggested by Moustakas et al. 2011, given by

\[12 + \log(\text{O} / \text{H}) = \text{OH0} - \log \left( 1 + \left( \frac{M_\text{to}}{M_*} \right)^\gamma \right)\]

where OH0 is the asymptotic metallicity, M_to is the turnover mass, and γ is the power-law slope of the MZR at low stellar masses.

Specific Instances

This MZR has been used in several publications that fit the parameters to data. These published results are available as the following:

  • Andrews2013: Result from Andrews & Martini 2013 with OH0 = 8.798, log10(M_to) = 8.901, and γ=0.640 based on fitting data from SDSS DR7 for galaxies with log10(Mstar) between 7.4 – 10.5.
source
AstroScalingRelations.CurtiMZRType
CurtiMZR(OH0::Real, M_to::Real, γ::Real, β::Real)

General form for the asymptotic logarithmic MZR with adjustable saturation transition suggested by Curti et al. 2020, given by

\[12 + \log(\text{O} / \text{H}) = \text{OH0} - \frac{\gamma}{\beta} \, \log \left( 1 + \left( \frac{M_*}{M_\text{to}} \right)^{-\beta} \right)\]

Relative to the MoustakasMZR, this MZR has one more free parameter which adjusts how broad the transition region is from the power-law MZR at low stellar masses to the asymptotic MZR at high stellar masses.

Specific Instances

This MZR has been used in several publications that fit the parameters to data. These published results are available as the following:

  • Curti2020: Result from the paper that introduces this functional form with OH0=8.793 ± 0.005, log10(M_to) = 10.02 ± 0.09, γ = 0.28 ± 0.02, and β = 1.2 ± 0.2.
source
AstroScalingRelations.PowerLawMZRType
PowerLawMZR(α::Real, β::Real, logMstar0::Real)

Mass-metallicity model described by a single power law index α, a metallicity normalization β, and the logarithm of the stellar mass logMstar0 = log10(Mstar0 [M⊙]) at which the metallicity is β. Such a power law MZR is often used when extrapolating literature results to low masses, e.g., $\text{M}_* < 10^8 \; \text{M}_\odot.$

Specific Instances

  • Ma2016Gas and Ma2016Stars are redshift-dependent power law MZR models fit to the gas-phase and stellar mass-metallicity relations in simulated FIRE galaxies.
source
AstroScalingRelations.Ma2016GasFunction
Ma2016Gas(z::Real, γ::Real=0.35; A::Real=0.93, B::Real=0.43, C::Real=-1.05)::PowerLawMZR

Returns a PowerLawMZR instance valid at redshift z given the gas-phase mass-metallicity relation measured for FIRE galaxies by Ma et al. 2016. γ is the power law slope and A, B, C control the redshift evolution of the model.

See also Ma2016Stars for the stellar mass-metallicity relation measured in the same work.

source
AstroScalingRelations.Ma2016StarsFunction
Ma2016Stars(z::Real, γ::Real=0.4; A::Real=0.67, B::Real=0.5, C::Real=-1.04)::PowerLawMZR

Returns a PowerLawMZR instance valid at redshift z given the stellar mass-metallicity relation measured for FIRE galaxies by Ma et al. 2016. γ is the power law slope and A, B, C control the redshift evolution of the model.

See also Ma2016Gas for the gas-phase mass-metallicity relation measured in the same work.

source
AstroScalingRelations.OHFunction
OH(mzr::AbstractMZR, Mstar::Real)

Returns $12 + \log(\text{O} / \text{H})$ from the mass-metallicity relation mzr at stellar mass Mstar [M⊙].

Examples

julia> OH(AstroScalingRelations.Andrews2013, 1e8) ≈ 8.119245564173369
true
source
AstroScalingRelations.dOH_dMstarFunction
dOH_dMstar(mzr::AbstractMZR, Mstar::Union{Real, Unitful.Mass})

Returns the partial derivative of the mass-metallicity relation mzr with respect to the stellar mass evaluated at Mstar [M⊙], where the metallicity is defined as $12 + \log(\text{O} / \text{H})$.

Examples

julia> dOH_dMstar(AstroScalingRelations.Andrews2013, 1e8) ≈ 2.1971001283624613e-9
true
source
AstroScalingRelations.dOH_dlnMstarFunction
dOH_dlnMstar(mzr::AbstractMZR, Mstar::Union{Real, Unitful.Mass})

Returns the partial derivative of the mass-metallicity relation mzr with respect to the natural logarithm of the stellar mass evaluated at Mstar [M⊙], where the metallicity is defined as $12 + \log(\text{O} / \text{H})$. Mathematically, the following are equivalent: dOH_dlnMstar(mzr, Mstar) = Mstar * dOH_dMstar(mzr, Mstar).

Examples

julia> dOH_dlnMstar(AstroScalingRelations.Andrews2013, 1e8) ≈ 2.1971001283624613e-9 * 1e8
true
source
AstroScalingRelations.dOH_dlog10MstarFunction
dOH_dlog10Mstar(mzr::AbstractMZR, Mstar::Union{Real, Unitful.Mass})

Returns the partial derivative of the mass-metallicity relation mzr with respect to the base-10 logarithm of the stellar mass evaluated at Mstar [M⊙], where the metallicity is defined as $12 + \log(\text{O} / \text{H})$. Mathematically, the following are equivalent: dOH_dlog10Mstar(mzr, Mstar) = log(10) * dOH_dlnMstar(mzr, Mstar).

Examples

julia> dOH_dlog10Mstar(AstroScalingRelations.Andrews2013, 1e8) ≈ 2.1971001283624613e-9 *
                                                                 1e8 * log(10)
true
source
AstroScalingRelations.OH_from_ZFunction
OH_from_Z(Z::Real, X::Real, f_O::Real)

Returns $12 + \log(\text{O} / \text{H})$ calculated from the metal mass fraction Z assuming a hydrogen mass fraction X and that the fraction of metal mass that is oxygen is f_O.

\[12 + \log(\text{O} / \text{H}) = 12 + \log \left( \frac{f_\text{O} \, Z}{16 X} \right)\]

Examples

julia> OH_from_Z(0.0127, 0.74, 0.35) ≈ 8.574520062919332
true
source
AstroScalingRelations.Z_from_OHFunction
Z_from_OH(OH::Real, X::Real, f_O::Real)

Returns the metal mass fraction Z calculated from the oxygen abundance OH defined as $12 + \log(\text{O} / \text{H})$ assuming a hydrogen mass fraction X and that the fraction of metal mass that is oxygen is f_O.

\[\begin{aligned} \text{OH} &\equiv 12 + \log(\text{O} / \text{H}) \newline Z &= 10^{\left( \text{OH} - 12 \right)} * 16 X / f_\text{O} \end{aligned}\]

Examples

julia> 0.0127 ≈ Z_from_OH(OH_from_Z(0.0127, 0.74, 0.35),
                          0.74, 0.35)
true
source
AstroScalingRelations.dZ_dOHFunction
dZ_dOH(OH::Real, X::Real, f_O::Real)

Returns the partial derivative of the metal mass fraction Z with respect to the oxygen abundance OH defined as $12 + \log(\text{O} / \text{H})$ assuming a hydrogen mass fraction X and that the fraction of metal mass that is oxygen is f_O.

\[\begin{aligned} \text{OH} &\equiv 12 + \log(\text{O} / \text{H}) \newline Z &= 10^{\left( \text{OH} - 12 \right)} * 16 X / f_\text{O} \newline \frac{\partial \, Z}{\partial \, \text{OH}} &= \ln(10) \, 10^{\left( \text{OH} - 12 \right)} * 16 X / f_\text{O} \end{aligned}\]

Examples

julia> dZ_dOH(8.574520062919332, 0.74, 0.35) ≈ 0.029242830681024394
true
source
AstroScalingRelations.dZ_dMstarFunction
dZ_dMstar(mzr::AbstractMZR, Mstar::Union{Real, u.Mass}, X::Real, f_O::Real)

Returns the partial derivative of the metal mass fraction Z with respect to galaxy stellar mass Mstar [M⊙] assuming the mass-metallicity relation mzr, a hydrogen mass fraction X, and that the fraction of metal mass that is oxygen is f_O. Calculated as oh = OH(mzr, Mstar); dZ_dMstar = dZ_dOH(oh, X, f_O) * dOH_dMstar(mzr, Mstar).

Examples

julia> dZ_dMstar(AstroScalingRelations.Andrews2013, 1e7, 0.74, 0.35) ≈ 7.33869576597908e-11
true
source

Galaxy Sizes

AstroScalingRelations.galaxy_sizeFunction
galaxy_size(Rvir; Aᵣ=0.02, fₚfₖ=0.78) = Aᵣ * fₚfₖ * Rvir
galaxy_size(Mh, ρthresh; Aᵣ=0.02, fₚfₖ=0.78) = Aᵣ * fₚfₖ * cbrt( 3 * Mh / (4π * ρthresh) )

Scaling relation for galaxy half-light radius with the virial radius of the dark matter halo such that

\[\begin{aligned} ρ_\text{thresh} &= ρ_c(z) \, Δ_\text{vir} \newline R_\text{vir} &= \sqrt[3]{ \frac{3 \, \text{M}_h}{4π \; ρ_c(z) \; Δ_\text{vir}}} \newline R_h(\text{M}_h, z) &= A_r \; f_p f_k \; R_\text{vir} \end{aligned}\]

The units of the returned $R_h$ are the same as the provided $R_\text{vir}$, or if using the (Mh, ρthresh) signature, the unit of cbrt( 3 * Mh / (4π * ρthresh) ).

Default keyword arguments $Aᵣ=0.02$ from Jiang et al. 2019 and $fₚfₖ=0.78$ for the projection correction for spheroidal systems from Somerville et al. 2018.

Examples

julia> galaxy_size(1e12, 12000; Aᵣ=0.02, fₚfₖ=0.78) ≈ 4.227023347086455
true
source

Stellar Masses

AstroScalingRelations.Longhetti2009Function
Longhetti2009(mK, VK, z, d_mod)

Returns the stellar mass in solar masses for an early-type galaxy using the empirical near-infrared mass estimator from Section 5 of Longhetti & Saracco 2009.

The estimator requires only the apparent K-band magnitude and the observed (V-K) colour, making it independent of multi-wavelength SED fitting. It was calibrated on early-type (elliptical) galaxies in the redshift range $1 < z < 2$.

Arguments

  • mK: apparent K-band magnitude of the galaxy
  • VK: observed (V-K) colour of the galaxy
  • z: redshift of the galaxy (valid range: $1 < z < 2$)
  • d_mod: distance modulus in magnitudes (cosmology-dependent; e.g., $d_\text{mod} = 5 \log_{10}(d_L / 10\,\text{pc})$)

Method

The estimator combines Equations 14 and 15 from the paper:

\[\begin{aligned} \log_{10}(M/L_K) &= 0.086 \times (V-K)_\text{obs} - 0.863 \\ M_K &= m_K - d_\text{mod}(z) - k_\text{cor}(z) \\ k_\text{cor}(z) &= -0.32 - 0.65\,z - 0.314\,z^2 - 0.0735\,z^3 \\ \log_{10}(M/M_\odot) &= \log_{10}(M/L_K) - 0.4 \, M_K + 1.364 \end{aligned}\]

where $0.4 \times M^\odot_K = 1.364$ (with $M^\odot_K = 3.41$) and the k-correction polynomial uses the coefficients from Table 3, case i) (all models except CB08 and Ma05, at solar metallicity).

Notes

  • The scatter of the $\log_{10}(M/L_K)$ vs. (V-K) relation (Eq. 15) is $\sigma = 0.04$ with a maximum deviation of $\pm 0.1$.
  • Overall stellar mass estimates are recovered to within a factor of $\sim 0.8$$1.1$ for 68% of simulated early-type galaxies at $1 < z < 2$.
  • The Salpeter IMF was used when calibrating the M/L models underlying this estimator.

Examples

julia> Longhetti2009(20.0, 5.0, 1.5, 45.0) ≈ 1.0744222661470343e10
true

julia> Longhetti2009(19.0, 4.5, 1.0, 44.1) ≈ 2.4266100950824142e10
true
source