MolecularHydrogen

class msaexp.utils.MolecularHydrogen(**kwargs)[source]

Bases: object

Tools for working with molecular hydrogen lines using the helpful relations from Aditya Togi and J. D. T. Smith 2016 ApJ, 830, 18

Optically thin flux:

\[F_j = h \nu A N_{j+2} \Omega / 4\pi\]

Line flux F as a function of temperature, T (excitation diagram):

\[ \begin{align}\begin{aligned}N_{j+2} = \frac{g_{j+2}}{Z(T)} e^{-E_\mathrm{upper} / kT}\\Z(T) = \sum g_j e^{-E_j / kT}\\F_j \propto \frac{N_{j+2} A}{\lambda}\end{aligned}\end{align} \]

Line data from the Gemini compilation at https://www.gemini.edu/observing/resources/near-ir-resources/spectroscopy/important-h2-lines

Attributes Summary

N

Length of data table

h_nu_A

precompute \(h \cdot \nu \cdot A\) (erg / second)

ix

Index of the reference transition (usually "1-0 S(1)") in the data table

nu

Transition frequency

reference

separate_ZT

Methods Summary

Nj([T])

Compute number density: \(N_j = \frac{g_j}{Z(T)}~e^{-E_j / kT}\)

ZT([T])

Compute \(Z(T) = \sum g_j e^{-E_j / kT}\)

h2_mass([line_flux, transition, z])

Still figuring out unit conversions....

initialize_flux_table()

Initialize flux table

line_flux([T])

Line flux \(F_j = h \nu A N_{j+2} \Omega / 4\pi\)

line_names([prefix])

LaTeX line names

load_data()

Read the data table and set the units on some columns

spec_model(spec[, z, update_flux, ...])

Make an MSAEXP model

temperature_powerlaw([n, Tl, Tu, nsteps])

Generate a powerlaw temperature distribution \(dN = T^{-n} dT\)

to_linelist()

Reformat into a LineList object

update_flux_table([T, min_line_fraction, ...])

Get a list of lines and ratios

Attributes Documentation

N

Length of data table

h_nu_A

precompute \(h \cdot \nu \cdot A\) (erg / second)

ix

Index of the reference transition (usually “1-0 S(1)”) in the data table

nu

Transition frequency

reference = ('1-0', 'S(1)')
separate_ZT = False

Methods Documentation

Nj(T=1000.0)[source]

Compute number density: \(N_j = \frac{g_j}{Z(T)}~e^{-E_j / kT}\)

ZT(T=1000.0)[source]

Compute \(Z(T) = \sum g_j e^{-E_j / kT}\)

h2_mass(line_flux=<Quantity 1.e-20 erg / (s cm2)>, transition=('1-0', 'S(1)'), z=1.01, **kwargs)[source]

Still figuring out unit conversions….

initialize_flux_table()[source]

Initialize flux table

line_flux(T=1000.0, **kwargs)[source]

Line flux \(F_j = h \nu A N_{j+2} \Omega / 4\pi\)

line_names(prefix='H$_2$')[source]

LaTeX line names

load_data()[source]

Read the data table and set the units on some columns

spec_model(spec, z=0.0, update_flux=True, wave_range=None, fnu=True, single=True, **kwargs)[source]

Make an MSAEXP model

static temperature_powerlaw(n=4.5, Tl=50, Tu=2000, nsteps=16)[source]

Generate a powerlaw temperature distribution \(dN = T^{-n} dT\)

to_linelist()[source]

Reformat into a LineList object

update_flux_table(T=1000.0, min_line_fraction=0.05, wave_range=(1.6, 2.6), **kwargs)[source]

Get a list of lines and ratios