Cthulhu.core ============ .. py:module:: Cthulhu.core Functions --------- .. autoapisummary:: Cthulhu.core.mass Cthulhu.core.load_pf Cthulhu.core.interpolate_pf Cthulhu.core.create_nu_grid_atom_OLD Cthulhu.core.create_nu_grid Cthulhu.core.summon Cthulhu.core.compute_cross_section Module Contents --------------- .. py:function:: mass(species, isotopologue, linelist) Determine the mass of a given chemical species-isotopologue combination in atomic mass units (amu). :param species: Molecule/atom we are calculating the mass for. :type species: String :param isotopologue: Isotopologue of the species we are calculating the mass for. :type isotopologue: String :param linelist: The line list this species' cross-section will later be calculated for. Used to identify between ExoMol, HITRAN/HITEMP, and VALD :type linelist: String :returns: Mass in amu of the given species-isotopologue combination. :rtype: float .. py:function:: load_pf(input_directory) Read in a pre-downloaded partition function. :param input_directory: Local directory where the .pf file is stored. :type input_directory: String :returns: * **T_pf_raw** (*numpy array*) -- RYAN. * **Q_raw** (*numpy array*) -- RYAN. .. py:function:: interpolate_pf(T_pf_raw, Q_raw, T, T_ref) Interpolate partition function to the temperature of the cross section computation. RYAN :param T_pf_raw: RYAN. :type T_pf_raw: TYPE :param Q_raw: RYAN. :type Q_raw: TYPE :param T: RYAN. :type T: TYPE :param T_ref: RYAN. :type T_ref: TYPE :returns: * **Q_T** (*TYPE*) -- RYAN. * **Q_T_ref** (*TYPE*) -- RYAN. .. py:function:: 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. :param atom: RYAN. :type atom: TYPE :param T: RYAN. :type T: TYPE :param m: RYAN. :type m: TYPE :param gamma: RYAN. :type gamma: TYPE :param nu_0: RYAN. :type nu_0: TYPE :param Voigt_sub_spacing: RYAN. :type Voigt_sub_spacing: TYPE :param dnu_out: RYAN. :type dnu_out: TYPE :param nu_out_min: RYAN. :type nu_out_min: TYPE :param nu_out_max: RYAN. :type nu_out_max: TYPE :param Voigt_cutoff: RYAN. :type Voigt_cutoff: TYPE :param cut_max: RYAN. :type cut_max: TYPE :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. .. py:function:: create_nu_grid(nu_out_min, nu_out_max, dnu_out) RYAN :param nu_out_min: RYAN. :type nu_out_min: TYPE :param nu_out_max: RYAN. :type nu_out_max: TYPE :param dnu_out: RYAN. :type dnu_out: TYPE :returns: **nu_compute** -- RYAN. :rtype: TYPE .. py:function:: 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 :param database: The database from which to download the line list (ExoMol, HITRAN, HITEMP, VALD). The default is ''. :type database: String, optional :param species: Molecular or atomic species to . The default is ''. :type species: String, optional :param isotope: 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'. :type isotope: String, optional :param VALD_data_dir: Local directory where the VALD line list is stored. The default is ''. :type VALD_data_dir: String, optional :param linelist: 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'. :type linelist: String, optional :param ionization_state: 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. :type ionization_state: int, optional :rtype: None. .. py:function:: 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. :param input_dir: Local directory where the line list is stored. :type input_dir: String :param database: Database from which the line list was downloaded. :type database: String :param species: Molecule or atom for which the cross section is to be computed. :type species: String :param temperature: DESCRIPTION. :type temperature: TYPE :param pressure: DESCRIPTION. :type pressure: TYPE :param log_pressure: DESCRIPTION. :type log_pressure: TYPE :param isotope: 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'. :type isotope: String, optional :param ionization_state: 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. :type ionization_state: int, optional :param linelist: 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'. :type linelist: TYPE, optional :param cluster_run: DESCRIPTION. The default is False. :type cluster_run: bool, optional :param set_mass: Mass of the species in atomic mass units (amu). The default is None. :type set_mass: double, optional :param nu_out_min: Minimum wavenumber for which the cross section is computed. The default is 200. :type nu_out_min: double, optional :param nu_out_max: Maximum wavenumber for which the cross section is computed.. The default is 25000. :type nu_out_max: double, optional :param dnu_out: RYAN. The default is 0.01. :type dnu_out: double, optional :param broad_type: Type of pressure broadening to be used in the computation. The default is 'default'. :type broad_type: String, optional :param broadening_file: Broadening file to be used for the calculation. Usually used for custom broadening files. The default is ''. :type broadening_file: String, optional :param gamma_0_fixed: RYAN. The default is 0.07. :type gamma_0_fixed: double, optional :param n_L_fixed: RYAN. The default is 0.50. :type n_L_fixed: double, optional :param X_H2: RYAN. The default is 0.85. :type X_H2: double, optional :param X_He: RYAN. The default is 0.15. :type X_He: double, optional :param Voigt_cutoff: RYAN. The default is 500. :type Voigt_cutoff: double, optional :param Voigt_sub_spacing: RYAN. The default is (1.0/6.0). :type Voigt_sub_spacing: double, optional :param N_alpha_samples: RYAN. The default is 500. :type N_alpha_samples: RYAN, optional :param S_cut: RYAN. The default is 1.0e-100. :type S_cut: double, optional :param cut_max: RYAN. The default is 30.0. :type cut_max: double, optional :param N_cores: Number of parallel cores to be used in the computation. The default is 1. :type N_cores: int, optional :param verbose: Controls whether or not intermittent print statements are displayed relaying the status of the cross section computation. The default is True. :type verbose: bool, optional :returns: * **nu_out** (*double*) -- Wavenumber . * **sigma_out** (*double*) -- DESCRIPTION.