Cthulhu.broadening

Functions

det_broad(input_directory)

Determine the type of broadening that should be used in the case that the user specifies

write_broadening_file(broadening_file, data, ...[, ...])

Write a custom broadening file to the input directory containing line list data.

create_SB07(input_directory)

Create a broadening file according to Eq. 15 of Sharp & Burrows (2007),

read_H2_He(input_directory)

Read the H2 and He broadening files from the input directory

read_air(input_directory)

Read the air broadening file from the input directory

read_SB07(input_directory)

Read the Burrows broadening file from the input directory

read_custom(input_directory, broadening_file)

Read a user-provided broadening file from the input directory

gamma_L_VALD(gamma_vdw, m_s, broadener)

Computes Lorentzian HWHM at 296K and 1 bar for a given broadener from a

gamma_L_impact(E_low, E_up, l_low, l_up, species, m_s, ...)

Computes Lorentzian HWHM at 296K and 1 bar for a given broadener using

read_atom(species, nu_0, gf, E_low, E_up, J_low, ...)

RYAN

compute_H2_He(gamma_0_H2, T_ref, T, n_L_H2, P, P_ref, ...)

DESCRIPTION - RYAN

compute_air(gamma_0_air, T_ref, T, n_L_air, P, P_ref)

DESCRIPTION - RYAN

compute_SB07(gamma_0_SB07, P, P_ref)

DESCRIPTION - RYAN

Module Contents

Cthulhu.broadening.det_broad(input_directory)

Determine the type of broadening that should be used in the case that the user specifies ‘default’ broadening. Order of preference is: 1) H2-He, 2) air, 3) SB07

Parameters:

input_directory (String) – Local directory where the broadening file will be stored.

Returns:

broadening – The type of broadening being used.

Return type:

String

Cthulhu.broadening.write_broadening_file(broadening_file, data, input_dir, species, database, isotope='default', ionization_state=1, linelist='default')

Write a custom broadening file to the input directory containing line list data.

Parameters:
  • broadening_file (String) – Name of the custom broadening file.

  • data (list) – 3-d list or array containing the information (J, gamma_L_0, n_L) needed to create a broadening file.

  • input_dir (String) – Local directory containing all line list data (for all species).

  • species (String) – Name of molecule or atom.

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

  • isotope (String, optional) – Isotopologue of the species, if a molecule. The default is default.

  • ionization_state (int, optional) – Ionization state of the species, if an atom. The default is 1.

  • linelist (String, optional) – Line list of the species. ExoMol has named line lists, the other databases do not. The default is default.

Return type:

None.

Cthulhu.broadening.create_SB07(input_directory)

Create a broadening file according to Eq. 15 of Sharp & Burrows (2007), and add it to the input_directory.

Note: S&B (2007) state Eq. 15 gives the FWHM. Personal communication from Richard Freedman indicates the equation actually gives the HWHM.

Parameters:

input_directory (String) – Local directory where the broadening file will be stored.

Return type:

None.

Cthulhu.broadening.read_H2_He(input_directory)

Read the H2 and He broadening files from the input directory

Parameters:

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

Returns:

  • J_max (float) – RYAN.

  • gamma_0_H2 (numpy array) – RYAN.

  • n_L_H2 (numpy array) – RYAN.

  • gamma_0_He (numpy array) – RYAN.

  • n_L_He (numpy array) – RYAN.

Cthulhu.broadening.read_air(input_directory)

Read the air broadening file from the input directory

Parameters:

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

Returns:

  • J_max (float) – RYAN.

  • gamma_0_air (numpy array) – RYAN.

  • n_L_air (numpy array) – RYAN.

Cthulhu.broadening.read_SB07(input_directory)

Read the Burrows broadening file from the input directory

Parameters:

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

Returns:

  • J_max (float) – RYAN.

  • gamma_0_SB07 (numpy array) – RYAN.

Cthulhu.broadening.read_custom(input_directory, broadening_file)

Read a user-provided broadening file from the input directory

Parameters:

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

Returns:

  • J_max (float) – RYAN.

  • gamma_0_air (numpy array) – RYAN.

  • n_L_air (numpy array) – RYAN.

Cthulhu.broadening.gamma_L_VALD(gamma_vdw, m_s, broadener)

Computes Lorentzian HWHM at 296K and 1 bar for a given broadener from a tabulated VALD van der Waals broadening constant.

Parameters:
  • gamma_vdw (float) – Van der Waals parameter from VALD.

  • m_s (float) – Mass of species whose spectral line is being broadened (u).

  • broadener (String) – Identity of broadening species (H2 or He).

Returns:

  • gamma_L_0 (float) – Lorentzian HWHM at reference T (296K) and P (1 bar).

  • n_L (float) – Temperature exponent (fixed to -0.7 for van der Waals theory).

Cthulhu.broadening.gamma_L_impact(E_low, E_up, l_low, l_up, species, m_s, broadener)

Computes Lorentzian HWHM at 296K and 1 bar for a given broadener using van der Waals impact theory.

Parameters:
  • E_low (float) – Lower level energy (cm^-1).

  • E_up (float) – Upper level energy (cm^-1).

  • l_low (int) – Lower level orbital angular momentum.

  • l_up (int) – Upper level orbital angular momentum.

  • species (String) – Identity of species whose spectral line is being broadened.

  • m_s (float) – Mass of species whose spectral line is being broadened (u).

  • broadener (String) – Identity of broadening species (H2 or He).

Returns:

  • gamma_L_0 (float) – Lorentzian HWHM at reference T (296K) and P (1 bar).

  • n_L (float) – Temperature exponent (fixed to -0.7 for van der Waals theory).

Cthulhu.broadening.read_atom(species, nu_0, gf, E_low, E_up, J_low, l_low, l_up, gamma_nat, gamma_vdw, alkali, m)

RYAN

Parameters:
  • species (String) – Name of atomic species, i.e. ‘H’ for hydrogen.

  • nu_0 (TYPE) – RYAN.

  • gf (TYPE) – RYAN.

  • E_low (TYPE) – RYAN.

  • E_up (TYPE) – RYAN.

  • J_low (TYPE) – RYAN.

  • l_low (TYPE) – RYAN.

  • l_up (TYPE) – RYAN.

  • gamma_nat (TYPE) – RYAN.

  • gamma_vdw (TYPE) – RYAN.

  • alkali (TYPE) – RYAN.

  • m (TYPE) – RYAN.

Returns:

  • gamma_0_H2 (TYPE) – DESCRIPTION.

  • n_L_H2 (TYPE) – DESCRIPTION.

  • gamma_0_He (TYPE) – DESCRIPTION.

  • n_L_He (TYPE) – DESCRIPTION.

Cthulhu.broadening.compute_H2_He(gamma_0_H2, T_ref, T, n_L_H2, P, P_ref, X_H2, gamma_0_He, n_L_He, X_He)

DESCRIPTION - RYAN

Parameters:
  • gamma_0_H2 (TYPE) – RYAN.

  • T_ref (TYPE) – RYAN.

  • T (TYPE) – RYAN.

  • n_L_H2 (TYPE) – RYAN.

  • P (TYPE) – RYAN.

  • P_ref (TYPE) – RYAN.

  • X_H2 (TYPE) – RYAN.

  • gamma_0_He (TYPE) – RYAN.

  • n_L_He (TYPE) – RYAN.

  • X_He (TYPE) – RYAN.

Returns:

gamma – RYAN.

Return type:

TYPE

Cthulhu.broadening.compute_air(gamma_0_air, T_ref, T, n_L_air, P, P_ref)

DESCRIPTION - RYAN

Parameters:
  • gamma_0_air (TYPE) – RYAN.

  • T_ref (TYPE) – RYAN.

  • T (TYPE) – RYAN.

  • n_L_air (TYPE) – RYAN.

  • P (TYPE) – RYAN.

  • P_ref (TYPE) – RYAN.

Returns:

gamma – RYAN.

Return type:

TYPE

Cthulhu.broadening.compute_SB07(gamma_0_SB07, P, P_ref)

DESCRIPTION - RYAN

Parameters:
  • gamma_0_SB07 (TYPE) – RYAN.

  • P (TYPE) – RYAN.

  • P_ref (TYPE) – RYAN.

Returns:

gamma – RYAN.

Return type:

TYPE