MATS module

class MATS.dataset.Dataset(spectra, dataset_name, param_linelist, CIA_model={'band': None, 'model': None})[source]

Bases: object

Combines spectrum objects into a Dataset object to enable multi-spectrum fitting.

Parameters
  • spectra (list) – list of spectrum objects to be included in the Dataset. Example [spectrum_1, spectrum_2, …]

  • dataset_name (str) – Used to provide a name for the Dataset to use when saving files

  • param_linelist (pandas dataframe) – Reads in the parameter linelist used in fitting. This enables for consistency checks between the input spectra and the parameter line list.

  • baseline_order (int) – sets the baseline order for all spectra in the dataset. This will automatically be set to the maximum baseline order across all spectrum included in the Dataset.

  • CIA_model (dictionary) – Specifies the model and band of CIA Model to use. Default is {‘model’: None, ‘band’:None}. Other option is {‘model’:’Karman’, ‘band’:’a_band’ or ‘singlet_delta’}, which applies for O2-O2 and O2-N2 CIA in the Oxygen A and Singlet Delta Bands.

average_QF()[source]

Calculates the Average QF from all spectra.

Returns

average_QF – average QF of all spectra in dataset

Return type

float

check_iso_list()[source]

Checks to make sure that all molecules are in the isotope_list and also checks to make sure all spectra use the same isotope list

correct_component_list()[source]

Corrects so that all spectra and the parameter line list share the same molecules, but the mole fraction is fixed to zero where molecules are not present (called in the initialization of the class).

correct_etalon_list()[source]

Corrects so that all spectrum share the same number of etalons, but the amplitude and period are fixed to zero where appropriate(called in the initialization of the class).

generate_CIA_paramlist()[source]

Generates a csv file called dataset_name + _CIA_paramlist, which will be used to generate another csv file that is used for fitting the broadband CIA that is common across all spectra, where the columns will be dependent on the CIA model used.

Parameters

band (str, optional) – specifies the band for the CIA model. For the O2 CIA model reported by Karman et al. The options are a_band and singlet_delta. The default is None.

Returns

CIA_paramlist – dataframe containing information decribing the CIA parameters based on the CIA model chosen. This dataframe is also saved to a dataframe. Either file can be edited before making the CIA parameter list used for fitting. If editting the .csv file will need to regenerate dataframe from .csv.

Return type

pandas dataframe

generate_baseline_paramlist()[source]

Generates a csv file called dataset_name + _baseline_paramlist, which will be used to generate another csv file that is used for fitting spectrum dependent parameters with columns for spectrum number, segment number, x_shift, concentration for each molecule in the dataset, baseline terms (a = 0th order term, b = 1st order, etc), and etalon terms (set an amplitude, period, and phase for the number of etalons listed for each spectrum in the Dataset).

Returns

baseline_paramlist – dataframe containing information describing baseline parameters. Also saves to .csv. Either file can be edited before making the baseline parameter list used for fitting. If editting the .csv file will need to regenerate dataframe from .csv.

Return type

dataframe

generate_summary_file(save_file=False)[source]

Generates a summary file combining spectral information from all spectra in the Dataset.

Parameters

save_file (bool, optional) – If True, then a .csv is generated in addition to the dataframe. The default is False.

Returns

summary_file – Summary dataframe comprised of spectral information inculding model and residuals for all spectra in Dataset.

Return type

dataframe

get_ILS_function_dict()[source]

Provides a dictionary of all ILS functions used in the dataset and the number of resolution parameters

Returns

dataset_ILS_list – list of strings matching the name of the ILS functions used in the dataset

Return type

list

get_baseline_order()[source]
get_broadener_list()[source]

Provides a list of all broadeners in the dataset.

Returns

dataset_broadener_list – list of all broadeners in the dataset.

Return type

list

get_dataset_name()[source]
get_etalons()[source]

Get list of number of etalons for spectra.

Returns

dataset_etalon_list – etalon keys across spectra

Return type

list

get_list_spectrum_numbers()[source]

Generates a list of all spectrum_numbers.

Returns

spec_num_list – list of all spectrum numbers used in the dataset.

Return type

list

get_molecules()[source]

Get list of molecules in spectra.

Returns

dataset_molecule_list – list of molecules in spectra

Return type

list

get_number_nominal_temperatures()[source]

Get the number of nominal temperatures in the .

Returns

  • num_nominal_temperatures (int) – number of nominal temperatures in the Dataset

  • nominal_temperatures (list) – list of all nominal temperatures listed in the input spectra

get_number_spectra()[source]
get_spectra()[source]
get_spectra_extremes()[source]
get_spectrum_extremes()[source]

Gets the minimum and maximum wavenumber for the entire Dataset.

Returns

  • wave_min (float) – The minimum wavenumber in all spectra in the Dataset.

  • wave_max (float) – The maximum wavenumber in all spectra in the Dataset.

get_spectrum_filename(spectrum_num)[source]

Gets spectrum filename for spectrum in Dataset. :param spectrum_num: Integer assigned to a given spectrum. :type spectrum_num: int

Returns

filename – if spectrum_num in Dataset then the filename for that the spectrum_number is returned

Return type

str

get_spectrum_pressure(spectrum_num)[source]

Gets spectrum pressure for spectrum in Dataset.

Parameters

spectrum_num (int) – Integer assigned to a given spectrum.

Returns

pressure – if spectrum_num in Dataset then the pressure (torr) for that the spectrum_number is returned.

Return type

float

get_spectrum_temperature(spectrum_num)[source]

Gets spectrum temperature for spectrum in Dataset.

Parameters

spectrum_num (int) – Integer assigned to a given spectrum.

Returns

temperature – if spectrum_num in Dataset then the temperature (K) for that the spectrum_number is returned.

Return type

float

max_baseline_order()[source]

sets the baseline order to be equal to the maximum in any of the included spectra.

plot_model_residuals()[source]

Generates a plot showing both the model and experimental data as a function of wavenumber in the main plot with a subplot showing the residuals as function of wavenumber.

renumber_spectra()[source]

renumbers the spectra to be sequential starting at 1 (called in the initialization of the class).

set_baseline_order(new_baseline_order)[source]
set_dataset_name(new_dataset_name)[source]
set_spectra(new_spectra)[source]
class MATS.fit_dataset.Fit_DataSet(dataset, base_linelist_file, param_linelist_file, CIA_linelist_file=None, minimum_parameter_fit_intensity=1e-27, weight_spectra=False, baseline_limit=False, baseline_limit_factor=10, pressure_limit=False, pressure_limit_factor=10, temperature_limit=False, temperature_limit_factor=10, molefraction_limit=False, molefraction_limit_factor=10, etalon_limit=False, etalon_limit_factor=50, x_shift_limit=False, x_shift_limit_magnitude=0.1, nu_limit=False, nu_limit_magnitude=0.1, sw_limit=False, sw_limit_factor=10, gamma0_limit=False, gamma0_limit_factor=10, n_gamma0_limit=False, n_gamma0_limit_factor=10, delta0_limit=False, delta0_limit_factor=10, n_delta0_limit=False, n_delta0_limit_factor=10, SD_gamma_limit=False, SD_gamma_limit_factor=10, n_gamma2_limit=False, n_gamma2_limit_factor=10, SD_delta_limit=False, SD_delta_limit_factor=10, n_delta2_limit=False, n_delta2_limit_factor=10, nuVC_limit=False, nuVC_limit_factor=10, n_nuVC_limit=False, n_nuVC_limit_factor=10, eta_limit=False, eta_limit_factor=10, linemixing_limit=False, linemixing_limit_factor=10, n_linemixing_limit=False, n_linemixing_limit_factor=10, beta_formalism=False)[source]

Bases: object

Provides the fitting functionality for a Dataset.

Parameters
  • dataset (object) – Dataset Object.

  • base_linelist_file (str) – filename for file containing baseline parameters.

  • param_linelist_file (str) – filename for file containing parmeter parameters.

  • CIA_linelist_file (str, optional) – Future Feature: filename for file constraining CIA parameters

  • minimum_parameter_fit_intensity (float, optional) – minimum intensity for parameters to be generated for fitting. NOTE: Even if a value is floated in the param_linelist if it is below this threshold then it won’t be a floated.. The default is 1e-27.

  • weight_spectra (boolean) – If True, then the pt by pt percent uncertainty for each spectrum and the spectrum weighting will be used in the calculation of the residuals. Default is False.

  • baseline_limit (bool, optional) – If True, then impose min/max limits on baseline parameter solutions. The default is False.

  • baseline_limit_factor (float, optional) – The factor variable describes the multiplicative factor that the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • pressure_limit (bool, optional) – If True, then impose min/max limits on pressure solutions. The default is False.

  • pressure_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • temperature_limit (bool, optional) – If True, then impose min/max limits on temperature solutions. The default is False.

  • temperature_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • molefraction_limit (bool, optional) – If True, then impose min/max limits on mole fraction solutions. The default is False.

  • molefraction_limit_factor (float, optional) – DESCRIPTION. The default is 10.

  • etalon_limit (bool, optional) – If True, then impose min/max limits on etalon solutions. The default is False.

  • etalon_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 50. #phase is constrained to +/- 2pi

  • x_shift_limit (bool, optional) – If True, then impose min/max limits on x-shift solutions. The default is False.

  • x_shift_limit_magnitude (float, optional) – The magnitude variables set the +/- range of the variable in cm-1. The default is 0.1.

  • nu_limit (bool, optional) – If True, then impose min/max limits on line center solutions. The default is False.

  • nu_limit_magnitude (float, optional) – The magnitude variables set the +/- range of the variable in cm-1. The default is 0.1.

  • sw_limit (bool, optional) – If True, then impose min/max limits on line intensity solutions. The default is False.

  • sw_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • gamma0_limit (bool, optional) – If True, then impose min/max limits on collisional half-width solutions. The default is False.

  • gamma0_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • n_gamma0_limit (bool, optional) – DESCIf True, then impose min/max limits on temperature exponent for half width solutions. The default is True.

  • n_gamma0_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • delta0_limit (bool, optional) – If True, then impose min/max limits on collisional shift solutions. The default is False.

  • delta0_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • n_delta0_limit (bool, optional) – If True, then impose min/max limits on temperature exponent of the collisional shift solutions. The default is True.

  • n_delta0_limit_factor (float, optional) – DESCRIPTION. The default is 10.

  • SD_gamma_limit (bool, optional) – If True, then impose min/max limits on the aw solutions. The default is False.

  • SD_gamma_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • n_gamma2_limit (bool, optional) – If True, then impose min/max limits on temperature exponent of the speed-dependent width solutions. The default is True.

  • n_gamma2_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • SD_delta_limit (bool, optional) – If True, then impose min/max limits on as solutions. The default is True.

  • SD_delta_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • n_delta2_limit (bool, optional) – If True, then impose min/max limits on temperature exponent of the speed-dependent shift solutions. The default is True.

  • n_delta2_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • nuVC_limit (bool, optional) – If True, then impose min/max limits on dicke narrowing solutions. The default is False.

  • nuVC_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • n_nuVC_limit (bool, optional) – If True, then impose min/max limits on temperature exponent of dicke narrowing solutions. The default is True.

  • n_nuVC_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is 10.

  • eta_limit (bool, optional) – If True, then impose min/max limits on correlation parameter solutions.. The default is True.

  • eta_limit_factor (float, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.The default is 10.

  • linemixing_limit (bool, optional) – The factor variable describes the multiplicative factor the value can vary by min = 1/factor * init_guess, max = factor* init_guess. NOTE: If the init_guess for a parameter is equal to zero, then the limits aren’t imposed because 1) then it would constrain the fit to 0 and 2) LMfit won’t let you set min = max.. The default is False.

  • linemixing_limit_factor (float, optional) – If True, then impose min/max limits on line-mixing solutions.. The default is 10.

  • beta_formalism (boolean, optional) – If True, then the beta correction on the Dicke narrowing is used in the simulation model.

constrained_CIA(params, S_temperature_dependence_constrained=True, shift_constrained=True)[source]

All user to set the temperature dependence of the SO mechanism scalar and/or the shift of the SO to be equal for O2-O2 and O2_N2

Parameters
  • params (lmfit parameter object) – the params object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit.

  • S_temperature_dependence_constrained (boolean, optional) – Constrains the temperature dependence of the SO mechanism scalar to be the same for O2-N2 and O2-O2. The default is True.

  • shift_constrained (boolean, optional) – Constrains the SO shift to be the same for O2-N2 and O2-O2. The default is True.

Returns

params – the params object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit.

Return type

lmfit parameter object

constrained_baseline(params, baseline_segment_constrained=True, xshift_segment_constrained=True, molefraction_segment_constrained=True, etalon_amp_segment_constrained=True, etalon_period_segment_constrained=True, etalon_phase_segment_constrained=True, pressure_segment_constrained=True, temperature_segment_constrained=True)[source]

Imposes baseline constraints when using multiple segments per spectrum, ie all baseline parameters can be the same across the entire spectrum except for the etalon phase, which is allowed to vary per segment.

Parameters
  • params (lmfit parameter object) – the params object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit.

  • baseline_segment_constrained (bool, optional) – True means the baseline terms are constrained across each spectrum. The default is True.

  • xshift_segment_constrained (bool, optional) – True means the x_shift terms are constrained across each spectrum. The default is True.

  • molefraction_segment_constrained (bool, optional) – True means the mole fraction for that molecule is constrained across each spectrum. The default is True.

  • etalon_amp_segment_constrained (bool, optional) – True means the etalon amplitude is constrained across each spectrum. The default is True.

  • etalon_period_segment_constrained (bool, optional) – True means the etalon period is constrained across each spectrum. The default is True.

  • etalon_phase_segment_constrained (bool, optional) – True means the etalon phase is constrained across each spectrum. The default is True.

  • pressure_segment_constrained (bool, optional) – True means the pressure is constrained across each spectrum. The default is True.

  • temperature_segment_constrained (bool, optional) – True means the temperature is constrained across each spectrum. The default is True.

Returns

params – the params object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit.

Return type

lmfit parameter object

fit_data(params, wing_cutoff=25, wing_wavenumbers=25, wing_method='wing_cutoff', xtol=1e-07, maxfev=2000, ftol=1e-07)[source]

Uses the lmfit minimizer to do the fitting through the simulation model function.

Parameters
  • params (lmfit parameter object) – the params object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit.

  • wing_cutoff (float, optional) – number of voigt half-widths to simulate on either side of each line. The default is 50.

  • wing_wavenumbers (float, optional) – number of wavenumbers to simulate on either side of each line. The default is 50.

  • wing_method (str, optional) – Provides choice between the wing_cutoff and wing_wavenumbers line cut-off options. The default is ‘wing_cutoff’.

  • xtol (float, optional) – Absolute error in xopt between iterations that is acceptable for convergence. The default is 1e-7.

  • maxfev (float, optional) – DESCRIPTION. The default is 2000.

  • ftol (The maximum number of calls to the function., optional) – Absolute error in func(xopt) between iterations that is acceptable for convergence.. The default is 1e-7.

Returns

result – contains all fit results as LMFit results object.

Return type

LMFit result Object

generate_beta_output_file(beta_summary_filename=None)[source]

Generates a file that summarizes the beta values used in the fitting in the case that beta was used to correct the Dicke narrowing term (beta_formalism = True).

Parameters

beta_summary_filename (str, optional) – Filename to save the beta information. The default is Beta Summary File.

Return type

The generated file has the beta values for each line and spectra that were used in the fitting. Access to this information is critical as the relationship between beta and nuVC is what generates a spoecific nuVC.

generate_params()[source]

Generates the lmfit parameter object that will be used in fitting.

Returns

params – the parameter object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit

Return type

lmfit parameter object

residual_analysis(result, indv_resid_plot=False)[source]

Updates the model and residual arrays in each spectrum object with the results of the fit and gives the option of generating the combined absorption and residual plot for each spectrum.

Parameters
  • result (LMFit result Object) – contains all fit results as LMFit results object.

  • indv_resid_plot (bool, optional) – True if you want to show residual plots for each spectra.. The default is False.

simulation_model(params, wing_cutoff=25, wing_wavenumbers=25, wing_method='wing_cutoff')[source]

This is the model used for fitting that includes baseline, resonant absorption, and CIA models.

Parameters
  • params (lmfit parameter object) – the params object is a dictionary comprised of all parameters translated from dataframes into a dictionary format compatible with lmfit.

  • wing_cutoff (float, optional) – number of voigt half-widths to simulate on either side of each line. The default is 25.

  • wing_wavenumbers (float, optional) – number of wavenumbers to simulate on either side of each line. The default is 25

  • wing_method (TYPE, optional) – Provides choice between the wing_cutoff and wing_wavenumbers line cut-off options. The default is ‘wing_cutoff’.

Returns

total_residuals – residuals for all spectra in Dataset.

Return type

array

update_params(result, base_linelist_update_file=None, param_linelist_update_file=None, CIA_linelist_update_file=None)[source]

Updates the baseline and line parameter files based on fit results with the option to write over the file (default) or save as a new file and updates baseline values in the spectrum objects.

Parameters
  • result (LMFit result Object) – contains all fit results as LMFit results object.

  • base_linelist_update_file (str, optional) – Name of file to save the updated baseline parameters. Default is to override the input. The default is None.

  • param_linelist_update_file (str, optional) – Name of file to save the updated line parameters. Default is to override the input. The default is None.

  • cia_linelist_update_file (str, optional) – Name of file to save the updated CIA parameters. Default is to override the input.

MATS.fit_dataset.HTP_from_DF_select(linelist, waves, wing_cutoff=25, wing_wavenumbers=25, wing_method='wing_cutoff', p=1, T=296, molefraction={}, isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']}, natural_abundance=True, abundance_ratio_MI={}, Diluent={}, diluent='air', IntensityThreshold=1e-30, TIPS=<function <lambda>>, compressability_factor=1)[source]

Calculates the absorbance (ppm/cm) based on input line list, wavenumbers, and spectrum environmental parameters.

Outline

  1. Uses provided wavenumber axis

  2. Calculates the molecular density from pressure and temperature

  3. Sets up Diluent dictionary if not given as input

  4. Calculates line intensity and doppler width at temperature for all lines

  5. Loops through each line in the line list and loops through each diluent, generating a line parameter at experimental conditions that is the appropriate ratio of each diluent species corrected for pressure and temperature. For each line, simulate the line for the given simulation cutoffs and add to cross section

  6. Return wavenumber and cross section arrays

Parameters
  • linelist (dataframe) –

    Pandas dataframe with the following column headers, where species corresponds to each diluent in the spectrum objects included in the dataset and nominal temperature corresponds to the nominal temperatures included in the dataset:

    nu = wavenumber of the spectral line transition (cm-1) in vacuum

    sw = The spectral line intensity (cm−1/(molecule⋅cm−2)) at Tref=296K

    elower = The lower-state energy of the transition (cm-1)

    molec_id = HITRAN molecular ID number

    local_iso_id = HITRAN isotopologue ID number

    gamma_0_species = half width at half maximum (HWHM) (cm−1/atm) at Tref=296K and reference pressure pref=1atm for a given diluent (air, self, CO2, etc.)

    n_gamma0_species = The coefficient of the temperature dependence of the half width

    delta_0_species = The pressure shift (cm−1/atm) at Tref=296K and pref=1atm of the line position with respect to the vacuum transition wavenumber νij

    n_delta0_species = the coefficient of the temperature dependence of the pressure shift

    SD_gamma_species = the ratio of the speed dependent width to the half-width at reference temperature and pressure

    n_gamma2_species = the coefficient of the temperature dependence of the speed dependent width NOTE: This is the temperature dependence of the speed dependent width not the ratio of the speed dependence to the half-width

    SD_delta_species = the ratio of the speed dependent shift to the collisional shift at reference temperature and pressure

    n_delta2_species = the coefficient of the temperature dependence of the speed dependent shift NOTE: This is the temperature dependence of the speed dependent shift not the ratio of the speed dependence to the shift

    nuVC_species = dicke narrowing term at reference temperature

    n_nuVC_species = coefficient of the temperature dependence of the dicke narrowing term

    eta_species = the correlation parameter for the VC and SD effects

    y_species = linemixing term

    n_y_species = temperature dependence of linemixing term

  • waves (array) – 1-D array comprised of wavenumbers (cm-1) to use as x-axis for simulation.

  • wing_cutoff (float, optional) – number of half-widths for each line to be calculated for. The default is 50.

  • wing_wavenumbers (float, optional) – number of wavenumber for each line to be calculated. The default is 50.

  • wing_method (str, optional) – defines which wing cut-off option to use. Options are wing_cutoff or wing_wavenumbers The default is ‘wing_cutoff’.

  • p (float, optional) – pressure for simulation in atmospheres. The default is 1.

  • T (float, optional) – temperature for simulation in kelvin. The default is 296.

  • molefraction (dict, optional) – takes the form {molecule_id : mole fraction, molecule_id: mole fraction, …}. The default is {}.

  • isotope_list (dict, optional) – provides opportunity to specify the isotope look-up table. Default is ISO, which is from HAPI. If not using ISO, then must use this format and suggested you use function to add to ISO

  • natural_abundance (bool, optional) – True indicates the sample is at natural abundance. The default is True.

  • abundance_ratio_MI (dictionary, optional) – If sample is not at natural abundance, then the natural abundance defines the enrichment factor compared to natural abundance(ie a sample where the main isotope is the only isotope would have a 1/natural abundance as the enrichment factor). Defined as {M:{I:enrichment factor, I: enrichment factor, I: enrichment factor}, … }. The default is {}.

  • Diluent (dict, optional) – contains the species as the key with the value being the abundance of that diluent in the sample, ie {‘He’:0.5, ‘self’:0.5}. The default is {}.

  • diluent (str, optional) – If Diluent = {}, then this value will be used to set the only diluent to be equal to this diluent. The default is ‘air’.

  • IntensityThreshold (float, optional) – minimum line intensity that will be simulated. The default is 1e-30.

  • TIPS (definition, optional) – selects the HAPI provided TIPS version to use for the partition function

Returns

  • wavenumbers (array) – wavenumber axis that should match the input waves

  • xsect (array) – simulated cross section as a function of wavenumbers (ppm/cm)

MATS.fit_dataset.HTP_wBeta_from_DF_select(linelist, waves, wing_cutoff=25, wing_wavenumbers=25, wing_method='wing_cutoff', p=1, T=296, molefraction={}, isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']}, natural_abundance=True, abundance_ratio_MI={}, Diluent={}, diluent='air', IntensityThreshold=1e-30, TIPS=<function <lambda>>, compressability_factor=1)[source]

Calculates the absorbance (ppm/cm) based on input line list, wavenumbers, and spectrum environmental parameters with capability of incorporating the beta correction to the Dicke Narrowing proposed in Analytical-function correction to the Hartmann–Tran profile for more reliable representation of the Dicke-narrowed molecular spectra.

Outline

  1. Uses provided wavenumber axis

  2. Calculates the molecular density from pressure and temperature

  3. Sets up Diluent dictionary if not given as input

  4. Calculates line intensity and doppler width at temperature for all lines

  5. Loops through each line in the line list and loops through each diluent, generating a line parameter at experimental conditions that is the appropriate ratio of each diluent species corrected for pressure and temperature. For each line, simulate the line for the given simulation cutoffs and add to cross section

  6. Return wavenumber and cross section arrays

Parameters
  • linelist (dataframe) –

    Pandas dataframe with the following column headers, where species corresponds to each diluent in the spectrum objects included in the dataset and nominal temperature corresponds to the nominal temperatures included in the dataset:

    nu = wavenumber of the spectral line transition (cm-1) in vacuum

    sw = The spectral line intensity (cm−1/(molecule⋅cm−2)) at Tref=296K

    elower = The lower-state energy of the transition (cm-1)

    molec_id = HITRAN molecular ID number

    local_iso_id = HITRAN isotopologue ID number

    gamma_0_species = half width at half maximum (HWHM) (cm−1/atm) at Tref=296K and reference pressure pref=1atm for a given diluent (air, self, CO2, etc.)

    n_gamma0_species = The coefficient of the temperature dependence of the half width

    delta_0_species = The pressure shift (cm−1/atm) at Tref=296K and pref=1atm of the line position with respect to the vacuum transition wavenumber νij

    n_delta0_species = the coefficient of the temperature dependence of the pressure shift

    SD_gamma_species = the ratio of the speed dependent width to the half-width at reference temperature and pressure

    n_gamma2_species = the coefficient of the temperature dependence of the speed dependent width NOTE: This is the temperature dependence of the speed dependent width not the ratio of the speed dependence to the half-width

    SD_delta_species = the ratio of the speed dependent shift to the collisional shift at reference temperature and pressure

    n_delta2_species = the coefficient of the temperature dependence of the speed dependent shift NOTE: This is the temperature dependence of the speed dependent shift not the ratio of the speed dependence to the shift

    nuVC_species = dicke narrowing term at reference temperature

    n_nuVC_species = coefficient of the temperature dependence of the dicke narrowing term

    eta_species = the correlation parameter for the VC and SD effects

    y_species = linemixing term

    n_y_species = temperature dependence of line mixing term

  • waves (array) – 1-D array comprised of wavenumbers (cm-1) to use as x-axis for simulation.

  • wing_cutoff (float, optional) – number of half-widths for each line to be calculated for. The default is 50.

  • wing_wavenumbers (float, optional) – number of wavenumber for each line to be calculated. The default is 50.

  • wing_method (str, optional) – defines which wing cut-off option to use. Options are wing_cutoff or wing_wavenumbers The default is ‘wing_cutoff’.

  • p (float, optional) – pressure for simulation in atmospheres. The default is 1.

  • T (float, optional) – temperature for simulation in kelvin. The default is 296.

  • molefraction (dict, optional) – takes the form {molecule_id : mole fraction, molecule_id: mole fraction, …}. The default is {}.

  • isotope_list (dict, optional) – provides opportunity to specify the isotope look-up table. Default is ISO, which is from HAPI. If not using ISO, then must use this format and suggested you use function to add to ISO

  • natural_abundance (bool, optional) – True indicates the sample is at natural abundance. The default is True.

  • abundance_ratio_MI (dictionary, optional) – If sample is not at natural abundance, then the natural abundance defines the enrichment factor compared to natural abundance(ie a sample where the main isotope is the only isotope would have a 1/natural abundance as the enrichment factor). Defined as {M:{I:enrichment factor, I: enrichment factor, I: enrichment factor}, … }. The default is {}.

  • Diluent (dict, optional) – contains the species as the key with the value being the abundance of that diluent in the sample, ie {‘He’:0.5, ‘self’:0.5}. The default is {}.

  • diluent (str, optional) – If Diluent = {}, then this value will be used to set the only diluent to be equal to this diluent. The default is ‘air’.

  • IntensityThreshold (float, optional) – minimum line intensity that will be simulated. The default is 1e-30.

  • TIPS (definition, optional) – selects the HAPI provided TIPS version to use for the partition function

Returns

  • wavenumbers (array) – wavenumber axis that should match the input waves

  • xsect (array) – simulated cross section as a function of wavenumbers (ppm/cm)

class MATS.generate_fitparam_file.Generate_FitParam_File(dataset, param_linelist, base_linelist, CIA_linelist=None, lineprofile='VP', linemixing=False, threshold_intensity=1e-30, fit_intensity=1e-26, fit_window=1.5, sim_window=5, param_linelist_savename='Parameter_LineList', base_linelist_savename='Baseline_LineList', CIA_linelist_savename='CIA_LineList', nu_constrain=True, sw_constrain=True, gamma0_constrain=True, delta0_constrain=True, aw_constrain=True, as_constrain=True, nuVC_constrain=True, eta_constrain=True, linemixing_constrain=True, additional_columns=[])[source]

Bases: object

Class generates the parameter files used in fitting and sets up fit settings.

Parameters
  • dataset (object) – Dataset object to be used in the fits

  • param_linelist (dataframe) – parameter linelist dataframe name, where the dataframe has the appropriate column headers

  • base_linelist (dataframe) – baseline parameter dataframe name generated from the dataset.generate_baseline_paramlist() function.

  • CIA_linelist (dataframe, optional) – Future Function: CIA linelist dataframe name generated from the dataset.generate_CIA_paramlist() function.

  • lineprofile (str) – lineprofile to use for the simulation. This sets values in the parameter linelist to 0 and forces them to not vary unless manually changed. Default values is VP, voigt profile. Options are VP, SDVP, NGP, SDNGP, HTP.

  • linemixing (bool) – If False, then all linemixing parameters are set to 0 and not able to float. Default is False.

  • threshold_intensity (float) – This is the minimum line intensity that will be simulated. Default value is 1e-30.

  • fit_intensity (float) – This is the minimum line intensity for which parameters will be set to float. This can be overwritten manually. Default value is 1e-26.

  • fit_window (float) – currently not used

  • sim_window (float) – This is the region outside of the wavelength region of the dataset that will be simulated for analysis. Default value is 5 cm-1.

  • base_linelist_savename (str) – filename that the baseline linelist will be saved as. Default is Baseline_LineList

  • param_linelist_savename (str) – filename that the parameter linelist will be saved as. Default is Parameter_LineList.

  • CIA_linelist_save_name (str) – Future Feature: filename that the CIA linelist will be saved as. Default is CIA_LineList.

  • nu_constrain (bool) – True indicates that the line centers will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • sw_constrain (bool) – True indicates that the line intensities will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • gamma0_constrain (bool) – True indicates that the collisional width will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • delta0_constrain (bool) – True indicates that the shift will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • aw_constrain (bool) – True indicates that the speed dependent width will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • as_constrain (bool) – True indicates that the speed dependent shift will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • nuVC_constrain (bool) – True indicates that the dicke narrowing term will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • eta_constrain (bool) – True indicates that the correlation parameter will be a global variable across all spectra. False generates a new value for each spectrum in the dataset.

  • linemixing_constrain (bool) – True indicates that the first-order linemixing term will be a global variable across all spectra. False generates a new value for each spectrum in the datas

generate_fit_KarmanCIA_linelist(vary_S_SO=False, vary_S_EXCH=False, vary_EXCH_temp=False, vary_SO_temp=False, vary_EXCH_shift=False, vary_SO_shift=False)[source]
generate_fit_baseline_linelist(vary_baseline=False, vary_pressure=False, vary_temperature=False, vary_molefraction={}, vary_xshift=False, vary_etalon_amp=False, vary_etalon_period=False, vary_etalon_phase=False, vary_ILS_res=False)[source]

Generates the baseline line list used in fitting and updates the fitting booleans to desired settings.

Parameters
  • vary_baseline (bool, optional) – If True, then sets all baseline parameters for all spectra to float. The default is True.

  • vary_pressure (bool, optional) – If True, then the pressures for all spectra are floated. This should be used with caution as the impact these parameters have on other floated parameters might lead to an unstable solution. The default is False.

  • vary_temperature (bool, optional) – If True, then the temperatures for all spectra are floated. This should be used with caution as the impact these parameters have on other floated parameters might lead to an unstable solution.The default is False.

  • vary_molefraction (dict, optional) – keys to dictionary correspond to molecule id where the value is boolean flag, which dictates whether to float the mole fraction. The default is {}. Example: {7: True, 1: False}

  • vary_xshift (bool, optional) – If True, then sets x-shift parameters for all spectra to float. The default is False.

  • vary_etalon_amp (bool, optional) – If True, then sets etalon amplitude parameters for all spectra to float. The default is False.

  • vary_etalon_period (bool, optional) – If True, then sets etalon period parameters for all spectra to float. . The default is False.

  • vary_etalon_phase (bool, optional) – If True, then sets etalon phase parameters for all spectra to float.. The default is False.

  • vary_ILS_res (bool, optional) – If True, then sets ILS resolution parameters for all spectra to float.. The default is False.

Returns

base_linelist_df – returns dataframe based on baseline line list with addition of a vary and err column for every floatable parameter. The vary columns are defined by the inputs. The err columns will be populated from fit results. The dataframe is also saved as a .csv file..

Return type

dataframe

generate_fit_param_linelist_from_linelist(vary_nu={}, vary_sw={}, vary_gamma0={}, vary_n_gamma0={}, vary_delta0={}, vary_n_delta0={}, vary_aw={}, vary_n_gamma2={}, vary_as={}, vary_n_delta2={}, vary_nuVC={}, vary_n_nuVC={}, vary_eta={}, vary_linemixing={}, vary_n_linemixing={})[source]

Generates the parameter line list used in fitting and updates the fitting booleans to desired settings.

Parameters
  • vary_nu (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope line centers should be floated. Each key in the dictionary corresponds to a molecule, where the values are a dictionary corresponding to local_iso_ids as keys and boolean values acting as boolean flags. True means float the nu for that molecule and isotope. Example vary_nu = {7:{1:True, 2: False, 3: False}, 1:{1:False, 2: False, 3: False}}, would indicate that line centers of all main oxygen isotopes would be floated (if the line intensity is greater than the fit intensity), where the line centers for all other O2 isotopes and all water isotopes would not be varied. If these value are left blank, then all variable would have to be manually switched to float. The default is {}.

  • vary_sw (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope line intensities should be floated. Follows nu_vary example. The default is {}.

  • vary_gamma0 (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope collisional half-width should be floated. Follows nu_vary example. . The default is {}.

  • vary_n_gamma0 (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope coefficient of the temperature dependence of the half width should be floated. Follows nu_vary example. . The default is {}.

  • vary_delta0 (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope pressure shift should be floated. Follows nu_vary example. . The default is {}.

  • vary_n_delta0 (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope coefficient of the temperature dependence of the pressure shift should be floated. Follows nu_vary example. . The default is {}.

  • vary_aw (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope ratio of the speed dependent width to the half-width should be floated. Follows nu_vary example. . The default is {}.

  • vary_n_gamma2 (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope coefficient of the temperature dependence of the speed dependent width should be floated. Follows nu_vary example. . The default is {}.

  • vary_as (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope the ratio of the speed dependent shift to the shift should be floated. Follows nu_vary example. . The default is {}.

  • vary_n_delta2 (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope coefficient of the temperature dependence of the speed dependent shift should be floated. Follows nu_vary example. . The default is {}.

  • vary_nuVC (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope dicke narrowing should be floated. Follows nu_vary example. . The default is {}.

  • vary_n_nuVC (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope coefficient of the temperature dependence of the dicke narrowing should be floated. Follows nu_vary example. . The default is {}.

  • vary_eta (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope correlation parameter for the VC and SD effects should be floated. Follows nu_vary example. . The default is {}.

  • vary_linemixing (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope first-order line-mixing should be floated. Follows nu_vary example. . The default is {}.

  • vary_n_linemixing (bool, optional) – Dictionary of dictionaries setting whether the molecule and isotope temperature dependence for the first-order line-mixing should be floated. Follows nu_vary example. . The default is {}.

Returns

param_linelist_df – returns dataframe based on parameter line list with addition of a vary and err column for every floatable parameter. The vary columns are defined by the inputs and the fit_intensity value. The err columns will be populated from fit results. The dataframe is also saved as a .csv file. line intensity will be normalized by the fit_intensity (set to the sw_scale_factor). The term ‘sw’ is now equal to the normalized value, such that in the simulation ‘sw’*sw_scale_factor is used for the line intensity. Because line intensities are so small it is difficult to fit the value without normalization.

Return type

dataframe

get_CIA_linelist()[source]
get_base_linelist()[source]
get_dataset()[source]
get_param_linelist()[source]

Routines to load example data locally or from web

class MATS.linelistdata.LoadLineListData(paths=None)[source]

Bases: object

Helper class to read in supplied LineList DataFrames

names

names of LineList files available

Type

list

__getitem__ : get file DataFrame by position/name

self[x] returns a copy of the linelist frame corresponding to self.names[x] if x is an integer, otherwise returns Frame corresponding to name = x

property names
property paths
class MATS.spectrum.Spectrum(filename, molefraction={}, natural_abundance=True, isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']}, diluent='air', Diluent={}, abundance_ratio_MI={}, spectrum_number=1, input_freq=True, input_tau=True, pressure_column='Cavity Pressure /Torr', temperature_column='Cavity Temperature Side 2 /C', frequency_column='Total Frequency /MHz', tau_column='Mean tau/us', tau_stats_column=None, segment_column=None, etalons={}, nominal_temperature=296, x_shift=0, baseline_order=1, weight=1, ILS_function=None, ILS_resolution=0.1, ILS_wing=10, TIPS=<function <lambda>>, compressability_file=None)[source]

Bases: object

Spectrum class provides all information describing experimental or simulated spectrum.

Parameters
  • filename (str) – file containing spectrum with .csv extension. File extension is not included in the name

  • molefraction (dict) – mole fraction of each molecule in spectra in the format {molec_id: mole fraction (out of 1), molec_id: molefraction, … }

  • natural_abundance (bool, optional) – flag for if the molecular species in the spectrum are at natural abundance

  • abundance_ratio_MI (dict, optional) – if not at natural abundance sets the enhancement factor for each molecule and isotope in the following format {molec_id:{iso_id: enhancement, iso_id: enhancement}, … }. The enhancement is the ratio of the new abundance to the natural abundance.

  • isotope_list (dict, optional) – provides opportunity to specify the isotope look-up table. Default is ISO, which is from HAPI. If not using ISO, then must use this format and suggested you use function to add to ISO

  • diluent (str, optional) – sets the diluent for the sample. Default = ‘air’

  • Diluent (dict, optional) – sets the diluent for the sample if there are a combination of several diluents. Format {‘he’: 0.5, ‘air’: 0.5). NOTE: the line parameter file must have parameters that correspond to the diluent (ie gamma0_he, and gamma0_air). Additionally, the contribution from all diluents must sum to 1.

  • spectrum_number (int, optional) – sets a number for the spectrum that will correspond to fit parameters. This is set in the Dataset class, so should not need to be defined manually

  • input_freq (bool, optional) – True indicates that the frequency_column is in MHz. False indicates that the frequency column is in wavenumbers.

  • input_tau (bool, optional) – True indicates that the tau_column is in us. False indicates that the tau column is in 1/c*tau (ppm/cm).

  • pressure_column (str, optional) – Name of the pressure column in input file. Column should be in torr. Default is Cavity Pressure /Torr.

  • temperature_column (str, optional) – Name of the temperature column in input file. Column should be in celsius. Default is Cavity Temperature Side 2 /C.

  • frequency_column (str, optional) – Name of the frequency column in input file. Column should be in MHz or Wavenumbers (with appropriate flag for input_freq). NOTE: This is not a detuning axis. Default is Total Frequency /MHz.

  • tau_column (str, optional) – Name of the tau column in input file. Column should be in us or in 1/ctau (ppm/cm) (with appropriate flag for input_tau). Default is Mean tau/us.

  • tau_stats_column (str, optional) – Name of column containing the pt by pt error as a percent of the y-axis. Default is ‘tau rel. std. dev./%

  • segment_column (str, optional) – Name of column with segment numbers in input file. This column allows spectrum background parameters to be treated in segments across the spectrum. If None then the entire spectrum will share the same segment.

  • etalons (dict, optional) – Allows you to define etalons by an amplitude and period (1/ frequency in cm-1). Default is no etalons. Input is dictionary with keys being a number and the value being an array with the first index being the amplitude and the second being the period.

  • nominal_temperature (int, optional) – nominal temperature indicates the approximate temperature of the spectrum. When combining spectra into a dataset this acts as a flag to whether temperature dependence terms should be parameters that can be fit or whether they should act as constants. Default = 296

  • x_shift (float, optional) – value in wavenumbers of the x shift for the spectrum axis. This is a fittable parameter. Be careful in using this parameter as floating multiple parameters with similar effects cause fits to not converge (ie. unconstrained line centers + x_shift or fits with line center, shifts, and x_shifts terms without enough lines per spectrum to isolate the different effects). Floating this term works best if you have a good initial guess. Default = 0

  • baseline_order (int, optional) – sets the baseline order for this spectrum. Allows you to change the baseline order across the broader dataset.()

  • weight (float, optional,) – set the weighting to used for the spectrum if using weighted fits. This can be used to weight a whole spectrum in addition to the pt by pt weighting using the stats column.

  • ILS_function (string, optional) – Default is None and means that no instrument line shape is used in the fitting. Function can be: SLIT_MICHELSON, SLIT_DIFFRACTION, SLIT_COSINUS, SLIT_DISPERSION, SLIT_GAUSSIAN, SLIT_TRIANGULAR, SLIT_RECTANGULAR corresponding to the ILS functions defined in HAPI or a user defined function.

  • ILS_resolution (float/array, optional) – Resolution is a float or array of ILS resolutions in wavenumbers. The SlitFunctions defined in HAPI have 1 resolution, but this opens the option for the user defined function to be comprised of several functions with varying resolutions. Default is 0.1 cm-1.

  • ILS_wing (float/array, optional) – AF_wing is the a float or array consisting of the range the ILS is calculted over in cm-1. This is a single value fort he HAPI slit functions, but could be an array of multiple values for user-defined functions. Default is 10 cm-1

  • TIPS (definition, optional) – selects the HAPI provided TIPS version to use for the partition function

  • compressability_file (str, optional) – compressability_file is the name of a file that contains the compressability information, generated by the NIST Refprop program with the rows containing compressability (used to correct the ideal gas law) as a function pressure (MPa) and the columns as a function of temperature (K). Pressure and temperature are header/index in the given axis.

calculate_QF()[source]

Calculates the quality of fit factor (QF) for a spectrum - QF = (maximum alpha - minimum alpha) / std(residuals).

Returns

QF.

Return type

float

diluent_sum_check()[source]

Checks that if multiple broadeners are used that the contributions sum to one.

Returns

Warning if the diluents don’t sum to one

Return type

str

fft_spectrum()[source]

Takes the FFT of the residuals of the spectrum, generates a plot of frequency (cm-1) versus amplitude (ppm/cm), and prints a dataframe with the 20 highest amplitude frequencies with the FFT frequency (period), amplitude, FFT phase, and frequency (cm-1).

get_Diluent()[source]
get_abundance_ratio_MI()[source]
get_alpha()[source]
get_background()[source]
get_cia()[source]
get_diluent()[source]
get_etalons()[source]
get_filename()[source]
get_frequency()[source]
get_model()[source]
get_molefraction()[source]
get_natural_abundance()[source]
get_nominal_temperature()[source]
get_pressure()[source]
get_pressure_torr()[source]
get_residuals()[source]
get_spectrum_number()[source]
get_tau()[source]
get_tau_stats()[source]
get_temperature()[source]
get_temperature_C()[source]
get_wavenumber()[source]
plot_freq_tau()[source]

Generates a plot of tau (us) as a function of frequency (MHz).

plot_model_residuals()[source]

Generates a plot of the alpha and model (ppm/cm) as a function of wavenumber (cm-1) and on lower plot shows the residuals (ppm/cm) as a function of wavenumber (cm-1).

plot_wave_alpha()[source]

Generates a plot of alpha (ppm/cm) as a function of wavenumber (cm-1).

save_spectrum_info(save_file=False)[source]

Saves spectrum information to a pandas dataframe with option to also save as as a csv file.

Parameters

save_file (bool, optional) – If False, then only a dataframe is created. If True, then a csv file will be generated with the name filename + ‘_saved.csv’. The default is False.

Returns

new_file – returns a pandas dataframe with columns related to the spectrum information

Return type

dataframe

segment_wave_alpha()[source]

Defines the wavenumber, alpha, and indices of spectrum that correspond to a given spectrum segment.

Returns

  • wavenumber_segments (dict) – dictionary where the key corresponds to a segment number and the values correspond to the wavenumbers for that segment

  • alpha_segments (dict) – dictionary where the key corresponds to a segment number and the values correspond to the alpha values for that segment.

  • indices_segments (dict) – dictionary where the key corresponds to a segment number and the values correspond to the array indices for that segment.

set_Diluent(new_Diluent)[source]
set_abundance_ration_MI(new_abundance_ratio_MI)[source]
set_background(new_background)[source]
set_cia(new_cia)[source]
set_diluent(new_diluent)[source]
set_etalons(new_etalons)[source]
set_frequency_column(new_frequency_column)[source]
set_model(new_model)[source]
set_molefraction(new_molefraction)[source]
set_natural_abundance(new_natural_abundance)[source]
set_nominal_temperature(new_nominal_temperature)[source]
set_pressure_column(new_pressure_column)[source]
set_residuals(new_residuals)[source]
set_spectrum_number(new_spectrum_number)[source]
set_tau_column(new_tau_column)[source]
set_tau_stats_column(new_tau_stats_column)[source]
set_temperature_column(new_temperature_column)[source]
set_weight(new_weight)[source]
MATS.spectrum.simulate_spectrum(parameter_linelist, wave_min=None, wave_max=None, wave_space=None, wavenumbers=[], wave_error=0, SNR=None, baseline_terms=[0], temperature=25, temperature_err={'bias': 0, 'function': None, 'params': {}}, pressure=760, pressure_err={'function': None, 'params': {}, 'per_bias': 0}, wing_cutoff=25, wing_wavenumbers=25, wing_method='wing_cutoff', filename='temp', molefraction={}, molefraction_err={}, isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']}, natural_abundance=True, abundance_ratio_MI={}, diluent='air', Diluent={}, nominal_temperature=296, etalons={}, x_shift=0, IntensityThreshold=1e-30, num_segments=1, beta_formalism=False, ILS_function=None, ILS_resolution=0.1, ILS_wing=10, TIPS=<function <lambda>>, compressability_file=None)[source]

Generates a synthetic spectrum, where the output is a spectrum object that can be used in MATS classes.

Parameters
  • parameter_linelist (dataframe) – linelist following the convention of the linelists used for the HTP_from_DF_select. Note that there will need to be a linemixing column for each nominal temperature, which you will have to do manually (ie y_air_296, y_self_296).

  • wavenumbers (array of floats, optional) – array of wavenumbers for the simulation (cm-1). If provided, then this axis will be used. If wavenumbers = None, then the wave_min, wave_max, and wave_space will be used to calculate wavenumber grid.

  • wave_min (float, optional) – minimum wavenumber for the simulation (cm-1)

  • wave_max (float, optional) – maximum wavenumber for the simulation (cm-1).

  • wave_space (float, optional) – wavenumber spacing for the simulation (cm-1).

  • wave_error (float, optional) – absolute error on the wavenumber axis (cm-1) to include in simulations. The default is 0.

  • SNR (float, optional) – Signal to noise ratio to impose on the simulated spectrum. The default is None. If SNR is none there is no noise on the simulation.

  • baseline_terms (list, optional) – polynomial baseline coefficients where the index is equal to the coefficient order, ie. [0, 1, 2] would correspond to baseline = 0 + 1*(wavenumber - minimum wavenumber) + 2*(wavenumber - minimum wavenumber)^2. The default is [0].

  • temperature (float, optional) – temperature for simulation in celsius. The default is 25.

  • temperature_err (dict, optional) – possible keys include ‘bias’, ‘function’, and ‘params’. The bias indicates the absolute bias in Celsius of the temperature reading, which will be added to the input temperature. Function can be ‘linear’ with params ‘m’ and ‘b’ or ‘sine’ with parameters ‘amp’, ‘phase’, and ‘phase’. These define a function that is added to both the bias and set temperature as a function of the wavenumber. Note: if ‘function’ key is not equal to None, then there also needs to be a params key to define the function.. The default is {‘bias’: 0, ‘function’: None, ‘params’: {}}.

  • pressure (float, optional) – pressure for simulation in torr. The default is 760.

  • pressure_err (dict, optional) – possible keys include bias, function, and params. The bias indicates the percent bias in of the pressure reading, which will be added to the input pressure. Function can be ‘linear’ with params ‘m’ and ‘b’ or ‘sine’ with parameters ‘amp’, ‘phase’, and ‘phase’. These define a function that is added to both the bias and set pressure as a function of the wavenumber. Note: if ‘function’ key is not equal to None, then there also needs to be a params key to define the function.. The default is {‘per_bias’: 0, ‘function’: None, ‘params’: {}}.

  • wing_cutoff (float, optional) – number of voigt half-widths to simulate on either side of each line. The default is 25.

  • wing_wavenumbers (float, optional) – number of wavenumbers to simulate on either side of each line. The default is 25.

  • wing_method (str, optional) – Provides choice between the wing_cutoff and wing_wavenumbers line cut-off options. The default is ‘wing_cutoff’.

  • filename (str, optional) – allows you to pick the output filename for the simulated spectra. The default is ‘temp’.

  • molefraction (dict, optional) – mole fraction of each molecule to be simulated in the spectrum in the format {molec_id: mole fraction (out of 1), molec_id: molefraction, … }. The default is {}.

  • molefraction_err (dict, optional) – percent error in the mole fraction of each molecule to be simulated in the spectrum in the format {molec_id: percent error in mole fraction, molec_id: percent error in mole fraction, … }. The default is {}.

  • natural_abundance (bool, optional) – flag for if the spectrum contains data at natural abundance. The default is True.

  • abundance_ratio_MI (dict, optional) – if not at natural abundance sets the enhancement factor for each molecule and isotope in the following format {molec_id:{iso_id: enhancement, iso_id: enhancement}, … }. The default is {}. The enhancement is the ratio of the new abundance to the natural abundance.

  • isotope_list (dict, optional) – provides opportunity to specify the isotope look-up table. Default is ISO, which is from HAPI. If not using ISO, then must use this format and suggested you use function to add to ISO

  • diluent (str, optional) – sets the diluent for the sample if only using one broadener. The default is ‘air’.

  • Diluent (dict, optional) – sets the diluent for the sample if there are a combination of several. Format {‘he’: 0.5, ‘air’: 0.5). NOTE: the line parameter file must have parameters that correspond to the diluent (ie gamma0_he, and gamma0_air). Additionally, the contribution from all diluents must sum to 1.. The default is {}.

  • nominal_temperature (int, optional) – nominal temperature indicates the approximate temperature of the spectrum. When combining spectra into a dataset this acts as a flag to whether temperature dependence terms should be parameters that can be fit or whether they should act as constants.. The default is 296.

  • etalons (dict, optional) – Allows you to define etalons by an amplitude and period (1/ frequency in cm-1). Default is no etalons. Input is dictionary with keys being a number and the value being an array with the first index being the amplitude and the second being the period.. The default is {}.

  • x_shift (float, optional) – value in wavenumbers of the x shift for the spectrum axis.. The default is 0.

  • IntensityThreshold (float, optional) – minimum line intensity to use in the simulation. The default is 1e-30.

  • num_segments (int, optional) – Number of segments in the file, which is implemented labeling the segment column into equal sequential se . The default is 10.

  • beta_formalism (boolean, optional) – Indicates whether the beta correction for Dicke Narrowing should be used. The default is False.

  • ILS_function (string, optional) – Default is None and means that no instrument line shape is used in the fitting. Function can be: SLIT_MICHELSON, SLIT_DIFFRACTION, SLIT_COSINUS, SLIT_DISPERSION, SLIT_GAUSSIAN, SLIT_TRIANGULAR, SLIT_RECTANGULAR corresponding to the ILS functions defined in HAPI or a user defined function.

  • ILS_resolution (float/array, optional) – Resolution is a float or array of ILS resolutions in wavenumbers. The SlitFunctions defined in HAPI have 1 resolution, but this opens the option for the user defined function to be comprised of several functions with varying resolutions. Default is 0.1 cm-1.

  • ILS_wing (float, optional) – AF_wing is the a float consisting of the range the ILS is calculted over in cm-1. Default is 10 cm-1

  • TIPS (definition, optional) – selects the HAPI provided TIPS version to use for the partition function

Returns

  • spectrum_file (.csv) – File that contains the simulated wavenumber axis, noisy wavenumber axis, absorbance data, noisy absorbance data, percent noise, pressure (torr), and temperature (C). The filename will correspond to the filename parameter, which has a default value of temp. The pressure and temperature columns will include whatever functional change there is to the pressure or temperature, but not the bias offset. This is coded to match how this error would manifest in experiments.

  • spectrum_object (object) – Outputs a Spectrum class object. This makes it so the you can easily switch between reading in an experimental spectrum and simulated a synthetic spectrum by simply switching out whether the spectrum object is defined through the class definition or through the simulate_spectrum function.

MATS.utilities.add_to_HITRANstyle_isotope_list(input_isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']}, molec_id=100, local_iso_id=1, global_isotope_id=200, iso_name='', abundance=1, mass=1, mol_name='')[source]

Allows for used to add to an existing isotope line list in the HITRAN format

Parameters
  • input_isotope_list (dictionary, optional) – Isotope list dictionary in HAPI format. The default is ISO.

  • molec_id (int, optional) – molec_id for new isotope entry. The default is 100.

  • local_iso_id (int, optional) – local isotope id number for new isotope entry. The default is 1.

  • global_isotope_id (int, optional) – global isotope id for new istope entry. The default is 200.

  • iso_name (str, optional) – isotoope name for new isotope entry. The default is ‘’.

  • abundance (float, optional) – relative abundance of new isotope entry. The default is 1.

  • mass (float, optional) – Mass of isotope in g. The default is 1.

  • mol_name (str, optional) – name of the molecule for new istope entry. The default is ‘’.

Returns

output_isotope_list – Isotope list with additionall entry

Return type

dictionary

MATS.utilities.arange_(lower, upper, step)[source]

originally from HAPI 1.1.0.9.6, but corrects npnt to be int

MATS.utilities.convolveSpectrumSame(Omega, CrossSection, Resolution=0.1, AF_wing=10.0, SlitFunction=<function SLIT_RECTANGULAR>, Wavenumber=None)[source]

Convolves cross section with a slit function with given parameters. Originally from HAPI 1.1.0.9.6 with correction to arange_ to prevent float/int error

MATS.utilities.etalon(x, amp, period, phase)[source]

Etalon definition

Parameters
  • x (array) – array of floats used to define the x-axis

  • amp (float) – amplitude of the etalon.

  • period (float) – period of the etalon.

  • phase (float) – phase of the etalon.

Returns

etalon – etalon as a function of input x-axis, amplitude, period, and phase.

Return type

array

MATS.utilities.hasNumbers(inputString)[source]

Determines whether there are numbers in a string

Parameters

inputString (str) – string for analysis

Returns

Returns True if the there are numbers in a string

Return type

bool

MATS.utilities.isotope_list_molecules_isotopes(isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']})[source]

The HITRAN style isotope list in the format (M,I), this function creates a dictionary from this with M as the keys and lists of I as values.

Parameters

isotope_list (dictionary, optional) – HITRAN style isotope list. The default is ISO.

Returns

molecule_isotope_dictionary – Dictionary with the molecules in an isotope list with the available I values.

Return type

dictionary

MATS.utilities.max_iter(pars, iter, resid, *args, **kws)[source]
MATS.utilities.molecularMass(M, I, isotope_list={(1, 1): [1, 'H2(16O)', 0.9973173, 18.01056, 'H2O'], (1, 2): [2, 'H2(18O)', 0.001999827, 20.01481, 'H2O'], (1, 3): [3, 'H2(17O)', 0.0003718841, 19.01478, 'H2O'], (1, 4): [4, 'HD(16O)', 0.0003106928, 19.01674, 'H2O'], (1, 5): [5, 'HD(18O)', 6.230031e-07, 21.02098, 'H2O'], (1, 6): [6, 'HD(17O)', 1.158526e-07, 20.02096, 'H2O'], (1, 7): [129, 'D2(16O)', 2.419741e-08, 20.02292, 'H2O'], (2, 1): [7, '(12C)(16O)2', 0.9842043, 43.98983, 'CO2'], (2, 2): [8, '(13C)(16O)2', 0.01105736, 44.99318, 'CO2'], (2, 3): [9, '(16O)(12C)(18O)', 0.003947066, 45.99408, 'CO2'], (2, 4): [10, '(16O)(12C)(17O)', 0.000733989, 44.99404, 'CO2'], (2, 5): [11, '(16O)(13C)(18O)', 4.434456e-05, 46.99743, 'CO2'], (2, 6): [12, '(16O)(13C)(17O)', 8.246233e-06, 45.9974, 'CO2'], (2, 7): [13, '(12C)(18O)2', 3.95734e-06, 47.99832, 'CO2'], (2, 8): [14, '(17O)(12C)(18O)', 1.471799e-06, 46.99829, 'CO2'], (2, 9): [121, '(12C)(17O)2', 1.368466e-07, 45.99826, 'CO2'], (2, 10): [15, '(13C)(18O)2', 4.446e-08, 49.00167, 'CO2'], (2, 11): [120, '(18O)(13C)(17O)', 1.65354e-08, 48.00165, 'CO2'], (2, 12): [122, '(13C)(17O)2', 1.537446e-09, 47.00162, 'CO2'], (3, 1): [16, '(16O)3', 0.9929009, 47.98474, 'O3'], (3, 2): [17, '(16O)(16O)(18O)', 0.003981942, 49.98899, 'O3'], (3, 3): [18, '(16O)(18O)(16O)', 0.001990971, 49.98899, 'O3'], (3, 4): [19, '(16O)(16O)(17O)', 0.0007404746, 48.98896, 'O3'], (3, 5): [20, '(16O)(17O)(16O)', 0.0003702373, 48.98896, 'O3'], (4, 1): [21, '(14N)2(16O)', 0.9903328, 44.00106, 'N2O'], (4, 2): [22, '(14N)(15N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 3): [23, '(15N)(14N)(16O)', 0.003640926, 44.9981, 'N2O'], (4, 4): [24, '(14N)2(18O)', 0.001985822, 46.00531, 'N2O'], (4, 5): [25, '(14N)2(17O)', 0.0003692797, 45.00528, 'N2O'], (5, 1): [26, '(12C)(16O)', 0.9865444, 27.99491, 'CO'], (5, 2): [27, '(13C)(16O)', 0.01108364, 28.99827, 'CO'], (5, 3): [28, '(12C)(18O)', 0.001978224, 29.99916, 'CO'], (5, 4): [29, '(12C)(17O)', 0.0003678671, 28.99913, 'CO'], (5, 5): [30, '(13C)(18O)', 2.2225e-05, 31.00252, 'CO'], (5, 6): [31, '(13C)(17O)', 4.13292e-06, 30.00249, 'CO'], (6, 1): [32, '(12C)H4', 0.9882741, 16.0313, 'CH4'], (6, 2): [33, '(13C)H4', 0.01110308, 17.03466, 'CH4'], (6, 3): [34, '(12C)H3D', 0.0006157511, 17.03748, 'CH4'], (6, 4): [35, '(13C)H3D', 6.917852e-06, 18.04083, 'CH4'], (7, 1): [36, '(16O)2', 0.9952616, 31.98983, 'O2'], (7, 2): [37, '(16O)(18O)', 0.00399141, 33.99408, 'O2'], (7, 3): [38, '(16O)(17O)', 0.0007422352, 32.99404, 'O2'], (8, 1): [39, '(14N)(16O)', 0.9939737, 29.99799, 'NO'], (8, 2): [40, '(15N)(16O)', 0.003654311, 30.99502, 'NO'], (8, 3): [41, '(14N)(18O)', 0.001993122, 32.00223, 'NO'], (9, 1): [42, '(32S)(16O)2', 0.9456777, 63.9619, 'SO2'], (9, 2): [43, '(34S)(16O)2', 0.04195028, 65.9577, 'SO2'], (9, 3): [137, '(33S)(16O)2', 0.007464462, 64.96129, 'SO2'], (9, 4): [138, '(16O)(32S)(18O)', 0.003792558, 65.96615, 'SO2'], (10, 1): [44, '(14N)(16O)2', 0.991616, 45.9929, 'NO2'], (10, 2): [130, '(15N)(16O)2', 0.003645643, 46.98994, 'NO2'], (11, 1): [45, '(14N)H3', 0.9958716, 17.02655, 'NH3'], (11, 2): [46, '(15N)H3', 0.003661289, 18.02358, 'NH3'], (12, 1): [47, 'H(14N)(16O)3', 0.9891098, 62.99564, 'HNO3'], (12, 2): [117, 'H(15N)(16O)3', 0.003636429, 63.99268, 'HNO3'], (13, 1): [48, '(16O)H', 0.9974726, 17.00274, 'OH'], (13, 2): [49, '(18O)H', 0.002000138, 19.00699, 'OH'], (13, 3): [50, '(16O)D', 0.0001553706, 18.00891, 'OH'], (14, 1): [51, 'H(19F)', 0.9998443, 20.00623, 'HF'], (14, 2): [110, 'D(19F)', 0.000155741, 21.0124, 'HF'], (15, 1): [52, 'H(35Cl)', 0.757587, 35.97668, 'HCl'], (15, 2): [53, 'H(37Cl)', 0.2422573, 37.97373, 'HCl'], (15, 3): [107, 'D(35Cl)', 0.000118005, 36.98285, 'HCl'], (15, 4): [108, 'D(37Cl)', 3.773502e-05, 38.9799, 'HCl'], (16, 1): [54, 'H(79Br)', 0.5067811, 79.92616, 'HBr'], (16, 2): [55, 'H(81Br)', 0.4930632, 81.92412, 'HBr'], (16, 3): [111, 'D(79Br)', 7.893838e-05, 80.93234, 'HBr'], (16, 4): [112, 'D(81Br)', 7.680162e-05, 82.93029, 'HBr'], (17, 1): [56, 'H(127I)', 0.9998443, 127.9123, 'HI'], (17, 2): [113, 'D(127I)', 0.000155741, 128.9185, 'HI'], (18, 1): [57, '(35Cl)(16O)', 0.7559077, 50.96377, 'ClO'], (18, 2): [58, '(37Cl)(16O)', 0.2417203, 52.96082, 'ClO'], (19, 1): [59, '(16O)(12C)(32S)', 0.9373947, 59.96699, 'OCS'], (19, 2): [60, '(16O)(12C)(34S)', 0.04158284, 61.96278, 'OCS'], (19, 3): [61, '(16O)(13C)(32S)', 0.01053146, 60.97034, 'OCS'], (19, 4): [62, '(16O)(12C)(33S)', 0.007399083, 60.96637, 'OCS'], (19, 5): [63, '(18O)(12C)(32S)', 0.00187967, 61.97123, 'OCS'], (19, 6): [135, '(16O)(13C)(34S)', 0.0004671757, 62.96614, 'OCS'], (20, 1): [64, 'H2(12C)(16O)', 0.9862371, 30.01056, 'H2CO'], (20, 2): [65, 'H2(13C)(16O)', 0.0110802, 31.01392, 'H2CO'], (20, 3): [66, 'H2(12C)(18O)', 0.001977609, 32.01481, 'H2CO'], (21, 1): [67, 'H(16O)(35Cl)', 0.75579, 51.97159, 'HOCl'], (21, 2): [68, 'H(16O)(37Cl)', 0.2416826, 53.96864, 'HOCl'], (22, 1): [69, '(14N)2', 0.9926874, 28.00615, 'N2'], (22, 2): [118, '(14N)(15N)', 0.007299165, 29.00318, 'N2'], (23, 1): [70, 'H(12C)(14N)', 0.9851143, 27.0109, 'HCN'], (23, 2): [71, 'H(13C)(14N)', 0.01106758, 28.01425, 'HCN'], (23, 3): [72, 'H(12C)(15N)', 0.00362174, 28.00793, 'HCN'], (24, 1): [73, '(12C)H3(35Cl)', 0.7489369, 49.99233, 'CH3Cl'], (24, 2): [74, '(12C)H3(37Cl)', 0.2394912, 51.98938, 'CH3Cl'], (25, 1): [75, 'H2(16O)2', 0.9949516, 34.00548, 'H2O2'], (26, 1): [76, '(12C)2H2', 0.9775989, 26.01565, 'C2H2'], (26, 2): [77, '(12C)(13C)H2', 0.02196629, 27.019, 'C2H2'], (26, 3): [105, '(12C)2HD', 0.0003045499, 27.02182, 'C2H2'], (27, 1): [78, '(12C)2H6', 0.97699, 30.04695, 'C2H6'], (27, 2): [106, '(12C)H3(13C)H3', 0.02195261, 31.05031, 'C2H6'], (28, 1): [79, '(31P)H3', 0.9995329, 33.99724, 'PH3'], (29, 1): [80, '(12C)(16O)(19F)2', 0.9865444, 65.99172, 'COF2'], (29, 2): [119, '(13C)(16O)(19F)2', 0.01108366, 66.99508, 'COF2'], (30, 1): [126, '(32S)(19F)6', 0.95018, 145.9625, 'SF6'], (31, 1): [81, 'H2(32S)', 0.9498841, 33.98772, 'H2S'], (31, 2): [82, 'H2(34S)', 0.04213687, 35.98351, 'H2S'], (31, 3): [83, 'H2(33S)', 0.007497664, 34.9871, 'H2S'], (32, 1): [84, 'H(12C)(16O)(16O)H', 0.9838977, 46.00548, 'HCOOH'], (33, 1): [85, 'H(16O)2', 0.9951066, 32.99766, 'HO2'], (34, 1): [86, '(16O)', 0.997628, 15.99492, 'O'], (35, 1): [127, '(35Cl)(16O)(14N)(16O)2', 0.7495702, 96.95667, 'ClONO2'], (35, 2): [128, '(37Cl)(16O)(14N)(16O)2', 0.2396937, 98.95372, 'ClONO2'], (36, 1): [87, '(14N)(16O)+', 0.9939737, 29.99799, 'NOp'], (37, 1): [88, 'H(16O)(79Br)', 0.505579, 95.92108, 'HOBr'], (37, 2): [89, 'H(16O)(81Br)', 0.4918937, 97.91903, 'HOBr'], (38, 1): [90, '(12C)2H4', 0.9772944, 28.0313, 'C2H4'], (38, 2): [91, '(12C)H2(13C)H2', 0.02195946, 29.03466, 'C2H4'], (39, 1): [92, '(12C)H3(16O)H', 0.9859299, 32.02622, 'CH3OH'], (40, 1): [93, '(12C)H3(79Br)', 0.5009946, 93.94181, 'CH3Br'], (40, 2): [94, '(12C)H3(81Br)', 0.4874334, 95.93976, 'CH3Br'], (41, 1): [95, '(12C)H3(12C)(14N)', 0.9738662, 41.02655, 'CH3CN'], (42, 1): [96, '(12C)(19F)4', 0.98889, 87.99362, 'CF4'], (43, 1): [116, '(12C)4H2', 0.955998, 50.01565, 'C4H2'], (44, 1): [109, 'H(12C)3(14N)', 0.963346, 51.0109, 'HC3N'], (45, 1): [103, 'H2', 0.9996885, 2.01565, 'H2'], (45, 2): [115, 'HD', 0.0003114316, 3.021825, 'H2'], (46, 1): [97, '(12C)(32S)', 0.9396236, 43.97207, 'CS'], (46, 2): [98, '(12C)(34S)', 0.04168171, 45.96787, 'CS'], (46, 3): [99, '(13C)(32S)', 0.0105565, 44.97543, 'CS'], (46, 4): [100, '(12C)(33S)', 0.007416675, 44.97146, 'CS'], (47, 1): [114, '(32S)(16O)3', 0.9434345, 79.95682, 'SO3'], (48, 1): [123, '(12C)2(14N)2', 0.9707524, 52.00615, 'C2N2'], (49, 1): [124, '(12C)(16O)(35Cl)2', 0.5663918, 97.93262, 'COCl2'], (49, 2): [125, '(12C)(16O)(35Cl)(37Cl)', 0.362235, 99.92967, 'COCl2'], (50, 1): [146, '(32S)(16O)', 0.9479262, 47.96699, 'SO'], (50, 2): [147, '(34S)(16O)', 0.04205002, 49.96278, 'SO'], (50, 3): [148, '(32S)(18O)', 0.001900788, 49.97123, 'SO'], (51, 1): [144, '(12C)H3(19F)', 0.988428, 34.02188, 'CH3F'], (52, 1): [139, '(74Ge)H4', 0.3651724, 77.95248, 'GeH4'], (52, 2): [140, '(72Ge)H4', 0.2741292, 75.95338, 'GeH4'], (52, 3): [141, '(70Ge)H4', 0.2050722, 73.95555, 'GeH4'], (52, 4): [142, '(73Ge)H4', 0.07755167, 76.95476, 'GeH4'], (52, 5): [143, '(76Ge)H4', 0.07755167, 79.9527, 'GeH4'], (53, 1): [131, '(12C)(32S)2', 0.8928115, 75.94414, 'CS2'], (53, 2): [132, '(32S)(12C)(34S)', 0.07921026, 77.93994, 'CS2'], (53, 3): [133, '(32S)(12C)(33S)', 0.01409435, 76.94353, 'CS2'], (53, 4): [134, '(13C)(32S)2', 0.01003057, 76.9475, 'CS2'], (54, 1): [145, '(12C)H3(127I)', 0.988428, 141.9279, 'CH3I'], (55, 1): [136, '(14N)(19F)3', 0.996337, 70.99829, 'NF3']})[source]

molecular mass look-up based on the HAPI definition adapted to allow used to specify ISO list INPUT PARAMETERS:

M: HITRAN molecule number I: HITRAN isotopologue number

OUTPUT PARAMETERS:

MolMass: molecular mass

— DESCRIPTION:

Return molecular mass of HITRAN isotolopogue.