Cthulhu.core

Functions

mass(species, isotopologue, linelist)

Determine the mass of a given chemical species-isotopologue combination in atomic mass units (amu).

load_pf(input_directory)

Read in a pre-downloaded partition function.

interpolate_pf(T_pf_raw, Q_raw, T, T_ref)

Interpolate partition function to the temperature of the cross section computation.

create_nu_grid_atom_OLD(atom, T, m, gamma, nu_0, ...)

Create the computational (fine) and output (coarse) wavenumber grids for

create_nu_grid(nu_out_min, nu_out_max, dnu_out)

RYAN

summon([database, species, isotope, VALD_data_dir, ...])

Makes calls to other downloader files to retrieve data from the desired database

compute_cross_section(input_dir, database, species, ...)

Main function to compute cross section, given that the requisite line list has already been downloaded.

Module Contents

Cthulhu.core.mass(species, isotopologue, linelist)

Determine the mass of a given chemical species-isotopologue combination in atomic mass units (amu).

Parameters:
  • species (String) – Molecule/atom we are calculating the mass for.

  • isotopologue (String) – Isotopologue of the species we are calculating the mass for.

  • linelist (String) – The line list this species’ cross-section will later be calculated for. Used to identify between ExoMol, HITRAN/HITEMP, and VALD

Returns:

Mass in amu of the given species-isotopologue combination.

Return type:

float

Cthulhu.core.load_pf(input_directory)

Read in a pre-downloaded partition function.

Parameters:

input_directory (String) – Local directory where the .pf file is stored.

Returns:

  • T_pf_raw (numpy array) – RYAN.

  • Q_raw (numpy array) – RYAN.

Cthulhu.core.interpolate_pf(T_pf_raw, Q_raw, T, T_ref)

Interpolate partition function to the temperature of the cross section computation. RYAN

Parameters:
  • T_pf_raw (TYPE) – RYAN.

  • Q_raw (TYPE) – RYAN.

  • T (TYPE) – RYAN.

  • T_ref (TYPE) – RYAN.

Returns:

  • Q_T (TYPE) – RYAN.

  • Q_T_ref (TYPE) – RYAN.

Cthulhu.core.create_nu_grid_atom_OLD(atom, T, m, gamma, nu_0, Voigt_sub_spacing, dnu_out, nu_out_min, nu_out_max, Voigt_cutoff, cut_max)

Create the computational (fine) and output (coarse) wavenumber grids for an atomic cross section calculation.

Note: for atoms a single grid is used over the entire wavenumber range.

Parameters:
  • atom (TYPE) – RYAN.

  • T (TYPE) – RYAN.

  • m (TYPE) – RYAN.

  • gamma (TYPE) – RYAN.

  • nu_0 (TYPE) – RYAN.

  • Voigt_sub_spacing (TYPE) – RYAN.

  • dnu_out (TYPE) – RYAN.

  • nu_out_min (TYPE) – RYAN.

  • nu_out_max (TYPE) – RYAN.

  • Voigt_cutoff (TYPE) – RYAN.

  • cut_max (TYPE) – RYAN.

Returns:

  • sigma_fine (TYPE) – RYAN.

  • sigma_out (TYPE) – RYAN.

  • nu_detune (TYPE) – RYAN.

  • N_points_fine (TYPE) – RYAN.

  • N_Voigt_points (TYPE) – RYAN.

  • alpha (TYPE) – RYAN.

  • cutoffs (TYPE) – RYAN.

  • nu_min (TYPE) – RYAN.

  • nu_max (TYPE) – RYAN.

  • nu_fine_start (TYPE) – RYAN.

  • nu_fine_end (TYPE) – RYAN.

  • nu_out (TYPE) – RYAN.

  • N_points_out (TYPE) – RYAN.

Cthulhu.core.create_nu_grid(nu_out_min, nu_out_max, dnu_out)

RYAN

Parameters:
  • nu_out_min (TYPE) – RYAN.

  • nu_out_max (TYPE) – RYAN.

  • dnu_out (TYPE) – RYAN.

Returns:

nu_compute – RYAN.

Return type:

TYPE

Cthulhu.core.summon(database='', species='', isotope='default', VALD_data_dir='', linelist='default', ionization_state=1)

Makes calls to other downloader files to retrieve data from the desired database

Parameters:
  • database (String, optional) – The database from which to download the line list (ExoMol, HITRAN, HITEMP, VALD). The default is ‘’.

  • species (String, optional) – Molecular or atomic species to . The default is ‘’.

  • isotope (String, optional) – Isotopologue of the molecular species. For ExoMol, this is specified on the webpage. For HITRAN/HITEMP use 1 for the most naturally abundant isotopologue, 2 for the next most abundant, etc. The default is ‘default’.

  • VALD_data_dir (String, optional) – Local directory where the VALD line list is stored. The default is ‘’.

  • linelist (String, optional) – Species line list to download. Used mainly for ExoMol, where there are multiple line lists for the same species. For HITRAN/HITEMP/VALD, the line list is just the name of the database. The default is ‘default’.

  • ionization_state (int, optional) – Ionization state to be used, in case of an atomic species. A neutral atom corresponds to an ionization state of 1. The default is 1.

Return type:

None.

Cthulhu.core.compute_cross_section(input_dir, database, species, temperature, pressure=None, log_pressure=None, isotope='default', ionization_state=1, linelist='default', cluster_run=False, set_mass=None, nu_out_min=200, nu_out_max=25000, dnu_out=0.01, broad_type='default', broadening_file='', gamma_0_fixed=0.07, n_L_fixed=0.5, X_H2=0.85, X_He=0.15, Voigt_cutoff=500, Voigt_sub_spacing=1.0 / 6.0, N_alpha_samples=500, S_cut=1e-100, cut_max=30.0, N_cores=1, verbose=True)

Main function to compute cross section, given that the requisite line list has already been downloaded.

Parameters:
  • input_dir (String) – Local directory where the line list is stored.

  • database (String) – Database from which the line list was downloaded.

  • species (String) – Molecule or atom for which the cross section is to be computed.

  • temperature (TYPE) – DESCRIPTION.

  • pressure (TYPE) – DESCRIPTION.

  • log_pressure (TYPE) – DESCRIPTION.

  • isotope (String, optional) – Isotopologue of the species (if species is a molecule). For ExoMol, this is specified on the webpage. For HITRAN/HITEMP use 1 for the most naturally abundant isotopologue, 2 for the next most abundant, etc. The default is ‘default’.

  • ionization_state (int, optional) – Ionization state to be used, in case of an atomic species. A neutral atom corresponds to an ionization state of 1. The default is 1.

  • linelist (TYPE, optional) – Species line list to download. For ExoMol there are often multiple line lists for the same species. For HITRAN/HITEMP/VALD, the line list is just the name of the database. The default is ‘default’.

  • cluster_run (bool, optional) – DESCRIPTION. The default is False.

  • set_mass (double, optional) – Mass of the species in atomic mass units (amu). The default is None.

  • nu_out_min (double, optional) – Minimum wavenumber for which the cross section is computed. The default is 200.

  • nu_out_max (double, optional) – Maximum wavenumber for which the cross section is computed.. The default is 25000.

  • dnu_out (double, optional) – RYAN. The default is 0.01.

  • broad_type (String, optional) – Type of pressure broadening to be used in the computation. The default is ‘default’.

  • broadening_file (String, optional) – Broadening file to be used for the calculation. Usually used for custom broadening files. The default is ‘’.

  • gamma_0_fixed (double, optional) – RYAN. The default is 0.07.

  • n_L_fixed (double, optional) – RYAN. The default is 0.50.

  • X_H2 (double, optional) – RYAN. The default is 0.85.

  • X_He (double, optional) – RYAN. The default is 0.15.

  • Voigt_cutoff (double, optional) – RYAN. The default is 500.

  • Voigt_sub_spacing (double, optional) – RYAN. The default is (1.0/6.0).

  • N_alpha_samples (RYAN, optional) – RYAN. The default is 500.

  • S_cut (double, optional) – RYAN. The default is 1.0e-100.

  • cut_max (double, optional) – RYAN. The default is 30.0.

  • N_cores (int, optional) – Number of parallel cores to be used in the computation. The default is 1.

  • verbose (bool, optional) – Controls whether or not intermittent print statements are displayed relaying the status of the cross section computation. The default is True.

Returns:

  • nu_out (double) – Wavenumber .

  • sigma_out (double) – DESCRIPTION.