LTE Molecule Model¶
There is a tool for modeling the full LTE spectrum of a molecule. It uses the CDMS / VAMDC database (http://portal.vamdc.eu/vamdc_portal/home.seam) and the vamdclib (http://vamdclib.readthedocs.io) python library to compute the partition function of a molecule. It uses astroquery.splatalogue (http://astroquery.readthedocs.io/en/latest/splatalogue/splatalogue.html) to identify the line frequencies and energy levels.
A very simple example looks like this:
freqs, aij, deg, EU, partfunc = get_molecular_parameters('CH3OH',
fmin=90*u.GHz,
fmax=100*u.GHz)
def modfunc(xarr, vcen, width, tex, column):
return generate_model(xarr, vcen, width, tex, column, freqs=freqs, aij=aij,
deg=deg, EU=EU, partfunc=partfunc)
fitter = generate_fitter(modfunc, name="CH3OH")
The molecular parameter lookup stage is often slow and may be a bottleneck.
Details can be found in the API documentation:
LTE Molecule Modeling Tool¶
Uses astroquery & vamdclib to obtain molecular parameters. http://astroquery.readthedocs.io/en/latest/splatalogue/splatalogue.html
Equations are based on Mangum & Shirley 2015 (2015PASP..127..266M)
Module API¶
-
pyspeckit.spectrum.models.lte_molecule.
Jnu
(nu, T)[source] [github] [bitbucket]¶ RJ equivalent temperature (MS15 eqn 24)
-
pyspeckit.spectrum.models.lte_molecule.
Jnu_cgs
(nu, T)[source] [github] [bitbucket]¶ RJ equivalent temperature (MS15 eqn 24) (use cgs constants for speed)
-
pyspeckit.spectrum.models.lte_molecule.
generate_fitter
(model_func, name)[source] [github] [bitbucket]¶ Generator for hnco fitter class
-
pyspeckit.spectrum.models.lte_molecule.
generate_model
(xarr, vcen, width, tex, column, freqs, aij, deg, EU, partfunc, background=None, tbg=2.73)[source] [github] [bitbucket]¶ Model Generator
-
pyspeckit.spectrum.models.lte_molecule.
get_molecular_parameters
(molecule_name, molecule_name_vamdc=None, tex=50, fmin=<Quantity 1.0 GHz>, fmax=<Quantity 1.0 THz>, line_lists=['SLAIM'], chem_re_flags=0, **kwargs)[source] [github] [bitbucket]¶ Get the molecular parameters for a molecule from the CDMS database using vamdclib
Parameters: - molecule_name : string
The string name of the molecule (normal name, like CH3OH or CH3CH2OH)
- molecule_name_vamdc : string or None
If specified, gives this name to vamdc instead of the normal name. Needed for some molecules, like CH3CH2OH -> C2H5OH.
- tex : float
Optional excitation temperature (basically checks if the partition function calculator works)
- fmin : quantity with frequency units
- fmax : quantity with frequency units
The minimum and maximum frequency to search over
- line_lists : list
A list of Splatalogue line list catalogs to search. Valid options include SLAIM, CDMS, JPL. Only a single catalog should be used to avoid repetition of transitions and species
- chem_re_flags : int
An integer flag to be passed to splatalogue’s chemical name matching tool
Examples
>>> freqs, aij, deg, EU, partfunc = get_molecular_parameters(molecule_name='CH2CHCN', ... fmin=220*u.GHz, ... fmax=222*u.GHz, ... molecule_name_vamdc='C2H3CN') >>> freqs, aij, deg, EU, partfunc = get_molecular_parameters('CH3OH', ... fmin=90*u.GHz, ... fmax=100*u.GHz)
-
pyspeckit.spectrum.models.lte_molecule.
line_tau
(tex, total_column, partition_function, degeneracy, frequency, energy_upper, einstein_A=None)[source] [github] [bitbucket]¶ Given the excitation temperature of the state, total column density of the molecule, the partition function, the degeneracy of the state, the frequency of the state, and the upper-state energy level, return the optical depth of that transition.
This is a helper function for the LTE molecule calculations. It implements the equations
\[\tau_\nu = \frac{c^2}{8 \pi \nu^2} A_{ij} N_u \exp\left( \frac{h \nu}{k_B T_{ex}}\right)\]\[N_{u} = N_{tot} \frac{g_u}{Q} \exp\left(\frac{-E_u}{k_B T_{ex}} \right)\]based on Equation 29 of Mangum & Shirley 2015 (2015PASP..127..266M)
-
pyspeckit.spectrum.models.lte_molecule.
line_tau_cgs
(tex, total_column, partition_function, degeneracy, frequency, energy_upper, einstein_A)[source] [github] [bitbucket]¶ Given the excitation temperature of the state, total column density of the molecule, the partition function, the degeneracy of the state, the frequency of the state, and the upper-state energy level, return the optical depth of that transition.
Unlike
line_tau()
, this function requires inputs in CGS units.This is a helper function for the LTE molecule calculations. It implements the equations
\[\tau_\nu = \frac{c^2}{8 \pi \nu^2} A_{ij} N_u \exp\left( \frac{h \nu}{k_B T_{ex}}\right)\]\[N_{u} = N_{tot} \frac{g_u}{Q} \exp\left(\frac{-E_u}{k_B T_{ex}} \right)\]based on Equations 11 and 29 of Mangum & Shirley 2015 (2015PASP..127..266M)