myscience package

Submodules

myscience.bialy16 module

myscience.bialy16.calc_sf_threshold(alphaG, sigma_g=1.0)[source]

Calculates star formation threshold gas surface density from Bialy et al. (2016).

Parameters:

alphaG : float

alphaG parameter from Sternberg et al. (2014). Dimensionless.

sigma_g : float, optional

Dust absorption cross section. Units relative to galactic value of 1.9 x 10^-21 cm^-2.

Returns:

h_sd : float

Gas surface density threshold. Units of solar masses pc^-2.

myscience.funcs module

myscience.funcs.FWHM_to_std(FWHM)[source]
myscience.funcs.Tkin_to_FWHM(Tkin)[source]

Tkin <= m_H * FWHM^2 / (8 k_B * ln(2)) FWHM = (Tkin * (8 k_B * ln(2)) / m_H)^2

myscience.funcs.calc_density(T_H=1.0, pressure=3800.0, pressure_error=(100, 100), T_H_error=0, calc_error=True)[source]

Calculates pressure of atomic hydrogen assuming thermal equilibrium. P/k = T_H * n –> n = (P / k) / T_H

Parameters:

T_H : float

Atomic hydrogen number density.

pressure : float

P / k of atomic hydrogen in K / cm^3

Returns:

n : float

Temperature of atomic hydrogen in K.

myscience.funcs.calc_radiation_field(T_dust, a=100, T_dust_error=0.0, beta=2.0, beta_error=0.0, field_type='draine')[source]

Calculates ambient interstellar radiation field from dust temperature. Dust is assumed to be in thermal equilibrium and absorbs all incident radiation. See Equation 5 in Lee et al. (2012).

Parameters:

T_dust : float

Average dust temperature in K.

a : float

Average dust grain radius in 100 nanometers. Typical radius = 100 nm

T_dust_error : float, optional

Average dust temperature uncertainty in K.

beta : float, optional

Slope of modified black body spectrum.

beta_error : float, optional

Uncertainty of slope of modified black body spectrum.

field_type : str, optional

Radiation field type. Options are ‘draine’, ‘mathis’, and ‘habing’.

Returns:

I_UV : float

Ambient FUV radiation field relative to Draine Field.

Notes

Min’s Description:

In Lee+12, we used a modified black-body (emissivity spectral index beta of 2) + IRAS 60/100 to derive the dust temperature.

In this case, the ISRF heating dust grains (from all directions) can be actually easily calculated by

U(M83) = (T_dust / T_norm K)^6

— This relation is based on many observations showing that large interstellar silicates have an equilibrium temperature of T_norm K in the solar neighborhood.

— Here U(M83) is the ISRF by Mathis+83 integrated from 0.09 micron to 8 micron.

To be specific, U(M83) = 4pi * int J(nu) d(nu) (0.09 micron ~ 8 micron) and U(M83) = 1 corresponds to 2.2e-5 W m-2.

— For Perseus with T_dust ~ 17 K, U(M83) ~ 0.8.

— But what we need to know is I_UV, the scaling factor for the Draine field.

For the FUV range of 6 ~ 13.6 eV, the Draine field is a factor of ~1.5 stronger than the Mathis field. Based on all these estimates, I would expect I_UV ~ (1/1.5) * 0.8 ~ 0.5 for Perseus.

— Another thing I want to mention is that the “empirical” relation I used above is independent from the dust (LW photon) absorption cross section.

For more information visit: http://ezbc.me/research/2016/02/25/radiation-field/

myscience.funcs.calc_temperature(n_H=1.0, pressure=3800.0, pressure_error=(100, 100), n_H_error=0, calc_error=True)[source]

Calculates temperature of atomic hydrogen assuming thermal equilibrium. P/k = n_H * T –> T = (P / k) / n_H

Parameters:

n_H : float

Atomic hydrogen number density.

pressure : float

P / k of atomic hydrogen in K / cm^3

Returns:

T : float

Temperature of atomic hydrogen in K.

myscience.funcs.gaussian(amp, fwhm, mean)[source]
myscience.funcs.std_to_FWHM(std)[source]

myscience.krumholz09 module

Module for using the model of Krumholz et al. (2009)

myscience.krumholz09.calc_T_cnm(phi_cnm, Z=1.0, phi_cnm_error=(0.0, 0.0), calc_error=False)[source]

Calculates T_cnm from equation 19 in Krumholz et al. (2009).

Parameters:

phi_cnm : float, array-like

Phi_cnm parameter, n_cnm = phi_cnm * n_cnm,min .

Z : float, array-like

Metallicity normalized by solar value.

G0 : float, array-like

FUV radiation field normalized by solar value.

myscience.krumholz09.calc_n_cnm(G_0=1.0, T_cnm=70.0, Z=1.0, G_0_error=(0.0, 0.0), T_cnm_error=(0.0, 0.0), calc_error=False)[source]

Calculates volume density of CNM. See equation (18). Returns n_cnm in cm^-3.

Parameters:

G_0 : float, array-like

Incident radiation field of FUV photons normalized to solar.

Z : float, array-like

Metallicity normalized to solar value.

myscience.krumholz09.calc_n_min(G_0=1.0, G_0_error=(0.0, 0.0), Z=1.0, calc_error=False)[source]

Calculates minimum volume density of CNM to maintain pressure balance with the WNM. See equation (5). Returns n_min in cm^-3.

Parameters:

G_0 : float, array-like

Incident radiation field of FUV photons normalized to solar.

Z : float, array-like

Metallicity normalized to solar value.

myscience.krumholz09.calc_phi_cnm(T_cnm, Z=1.0)[source]

Calculates phi_cnm from equation 19 in Krumholz et al. (2009).

Parameters:

T_cnm : float, array-like

Temperature of cold neutral medium in K.

Z : float, array-like

Metallicity normalized by solar value.

myscience.krumholz09.calc_rh2(h_sd, phi_cnm=3.0, Z=1.0, a=0.2, f_diss=0.1, phi_mol=10.0, sigma_d=1.0, return_fractions=False, remove_helium=True)[source]

Calculates ratio of molecular hydrogen to atomic hydrogen surface density using the model from Krumholz et al. 2008 given a total hydrogen surface density.

Parameters:

h_sd : array-like

Hydrogen surface density in units of solar mass per parsec**2-

phi_cnm : float

Ratio of CNM number density and minimum number density to maintain pressure balance with the WNM.

Z : float

Gas-phase metallicity relative to solar.

a : float

?

phi_mol : float

Molecular gas fraction.

sigma_d : float

Dust cross section in units of 10^-21 cm^-2 (solar).

return_fractions : bool

Return f_H2 and f_HI?

remove_helium : bool

Remove contribution from Helium to total gas surface density? If True, assumes h_sd does not include Helium.

Returns:

rh2_fit : array-like

Model ratio between molecular and atomic hydrogen masses.

f_H2, f_HI : array-like, optional

If return_fractions=True then the following is returned: f_H2 = mass fraction of molecular hydrogen f_HI = mass fraction of atomic hydrogen

myscience.sternberg14 module

myscience.sternberg14.calc_n_H(I_UV=1, alphaG=1, phi_g=1.0, Z_g=1.0, Z_CO=1.0, I_UV_error=0.0, alphaG_error=0.0, phi_g_error=0.0, Z_g_error=0.0, calc_errors=True)[source]

Equation 5 in Bialy et al. (2015)

myscience.sternberg14.calc_phi_cnm(alphaG=1.0, Z_g=1.0, Z_CO=1.0, phi_g=1.0, alphaG_error=0.0, phi_g_error=0.0)[source]
myscience.sternberg14.calc_rh2(h_sd, alphaG=1.5, Z=1.0, phi_g=1.0, sigma_g21=1.9, radiation_type='isotropic', return_fractions=True)[source]

Calculates ratio of molecular hydrogen to atomic hydrogen surface density using the model from Sternberg et al. (2014) given a total hydrogen surface density.

Parameters:

h_sd : array-like

Hydrogen surface density in units of solar mass per parsec**2-

return_fractions : bool

Return f_H2 and f_HI?

Returns:

rh2_fit : array-like

Model ratio between molecular and atomic hydrogen masses.

f_H2, f_HI : array-like, optional

If return_fractions=True then the following is returned: f_H2 = mass fraction of molecular hydrogen f_HI = mass fraction of atomic hydrogen

Module contents