Parameters Reference¶
This page provides a complete reference for all keyword arguments accepted by PyExoCross API functions. Parameters are organized by category.
Species Identification¶
Parameter |
Type |
Default |
Description |
Databases |
|---|---|---|---|---|
|
|
|
Database type |
All |
|
|
|
Molecule name (e.g. |
ExoMol, ExoMolHR, HITRAN, HITEMP |
|
|
|
Atom name (e.g. |
ExoAtom |
|
|
|
Isotopologue (e.g. |
ExoMol, ExoMolHR, HITRAN, HITEMP |
|
|
|
Dataset name (e.g. |
All |
|
|
|
Numeric species identifier |
All |
database Accepted Values¶
Value |
Description |
|---|---|
|
ExoMol molecular database |
|
ExoMolHR molecular database |
|
ExoAtom atomic database |
|
HITRAN molecular spectroscopic database |
|
HITEMP high-temperature extension of HITRAN |
species_id Encoding¶
The species_id is a compact numeric identifier. The first digit(s) encode
the species main ID and the last digit encodes the species sub ID:
species_id = species_main_id * 10 + species_sub_id
Database |
Example |
|
Main ID |
Sub ID |
Meaning |
|---|---|---|---|---|---|
ExoMol |
MgH (24Mg-1H) |
|
|
|
HITRAN molecule ID #50, isotopologue ID #1 |
ExoMolHR |
MgH (24Mg-1H) |
|
|
|
HITRAN molecule ID #50, isotopologue ID #1 |
ExoAtom |
Ar |
|
|
|
HITRAN atom ID #60, isotope ID #1 |
HITRAN |
H2O (1H2-16O) |
|
|
|
HITRAN molecule ID #1, isotopologue ID #1 |
HITRAN |
CO2 (12C-16O2) |
|
|
|
HITRAN molecule ID #2, isotopologue ID #1 |
HITRAN |
NO (14N-16O) |
|
|
|
HITRAN molecule ID #8, isotopologue ID #1 |
HITRAN |
C2H2 |
|
|
|
HITRAN molecule ID #26, isotopologue ID #1 |
File Paths¶
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to input data |
|
|
|
Path for output files |
|
|
|
Log file path; |
read_path Conventions¶
Database |
|
Example |
|---|---|---|
ExoMol |
Root directory of ExoMol database |
|
ExoMolHR |
Root directory of ExoMolHR database |
|
ExoAtom |
Root directory of ExoAtom database |
|
HITRAN |
Root directory of HITRAN database |
|
HITEMP |
Root directory of HITEMP database |
|
For ExoMol:
{read_path}/{molecule}/{isotopologue}/{dataset}/
For ExoMolHR, this folder should contain only one .csv file:
{read_path}/{molecule}/{isotopologue}/
For ExoAtom:
{read_path}/{atom}/{dataset}/
For HITRAN/HITEMP:
{read_path}/{molecule}/{isotopologue}/
Computing Resources¶
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Number of CPU cores for processing each transitions file |
|
|
|
Number of transitions files processed simultaneously |
|
|
|
Chunk size when reading/calculating transitions |
|
|
|
Compute backend mode: |
|
|
|
GPU backend policy when |
|
|
|
Max number of lines per GPU batch (memory-control knob) |
|
|
|
Max number of grid points per GPU batch (memory-control knob) |
|
|
|
Transition cache: small inputs use memory and large inputs use Parquet; alternatives are |
|
|
|
Cache directory; |
|
|
|
Maximum transition data retained by |
|
|
|
Rebuild matching Parquet cache files |
|
|
|
|
GPU acceleration scope:
Enabled for
cooling_functions,stick_spectra,cross_sections, andstick_spectra_cross_sectionOther functions are CPU formula based
Parquet caches are shared by CPU and GPU modes. PyArrow currently reads and decodes Parquet on the CPU, and the selected arrays are then transferred to the GPU. GPU mode accelerates supported numerical kernels; it does not currently accelerate file I/O or Parquet decoding.
gpu_backend behavior:
'AUTO'(recommended):PyTorch-CUDA -> CuPy-CUDA -> MPS -> CPU fallback'CUDA':PyTorch-CUDA -> CuPy-CUDA -> MPS -> CPU fallback'PyTorch-CUDA': NVIDIA PyTorch CUDA only; otherwise CPU fallback'CuPy-CUDA': NVIDIA CuPy CUDA only; otherwise CPU fallback'MPS': Apple Metal (MPS) only; otherwise CPU fallback
Typical usage:
# CPU (default)
device='CPU'
# GPU (auto backend)
device='GPU'
gpu_backend='AUTO'
gpu_batch_lines=8192
gpu_batch_grid=256
# GPU (auto CUDA provider priority: PyTorch first, then CuPy)
device='GPU'
gpu_backend='CUDA'
# GPU (force PyTorch CUDA only)
device='GPU'
gpu_backend='PyTorch-CUDA'
# GPU (force CuPy CUDA only)
device='GPU'
gpu_backend='CuPy-CUDA'
# GPU (force MPS)
device='GPU'
gpu_backend='MPS'
For large line lists (e.g. H2O with billions of lines), increase chunk_size
to reduce I/O overhead. Set ncpufiles > 1 if the species has many
separate .trans files (common for ExoMol).
Conversion Parameters¶
Used by px.conversion().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
|
|
|
|
Minimum frequency in cm⁻¹ |
|
|
|
Maximum frequency in cm⁻¹ |
|
|
|
Max uncertainty (cm⁻¹); |
|
|
|
Min intensity (cm/molecule); |
|
|
|
Global QN labels for HITRAN output |
|
|
|
Global QN Fortran-style formats |
|
|
|
Local QN labels for HITRAN output |
|
|
|
Local QN Fortran-style formats |
Quantum Number Formats¶
The global and local quantum number format strings follow HITRAN2004 convention. Each format field is a C/Fortran-style specifier:
For ExoMol, ExoMolHR, and ExoAtom input, global_qn_format_list and local_qn_format_list
can be omitted when all requested labels are available in the definition
metadata. Metadata namespaces are shortened before matching, so labels such as
Herzberg:n1 are requested as n1. \
global_qn_label_list = ['ElecState', 'v', 'Omega']
global_qn_format_list = ['%9s', '%2d', '%4s'] # Total: 15 chars
local_qn_label_list = ['J', 'e/f']
local_qn_format_list = ['%5.1f', '%2s'] # Total: 15 chars (padded)
For HITRAN2004 format, both global and local quantum number fields are exactly 15 characters each. Ensure the sum of format widths matches.
Partition Function / Specific Heat / Cooling Function Parameters¶
Used by px.partition_functions(), px.specific_heats(), px.cooling_functions().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Temperature step interval in K |
|
|
|
Maximum temperature in K |
The calculation produces values at every ntemp K from 1 K to tmax K.
Lifetime Parameters¶
Used by px.lifetimes().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
|
Oscillator Strength Parameters¶
Used by px.oscillator_strengths().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
|
Physical Conditions¶
Used by px.stick_spectra(), px.cross_sections(), and px.stick_spectra_cross_section().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Temperature(s) in K |
|
|
|
Pressure(s) in bar (cross sections only) |
|
|
|
|
|
|
|
Unit: |
|
|
|
Minimum of range (in |
|
|
|
Maximum of range (in |
|
|
|
|
|
|
|
Optional isotopic abundance multiplier |
Note
wn_wl and wn_wl_unit define the calculation and saved-output coordinate, not just labels.
With wn_wl='WN', saved .stick and .xsec files use wavenumber as the first column.
With wn_wl='WL', saved files use wavelength as the first column in wn_wl_unit.
Plotting parameters can use a different coordinate and only affect figure x-axes.
Non-LTE Parameters¶
Used by px.stick_spectra(), px.cross_sections(), and px.stick_spectra_cross_section() when nlte_method != 'L'.
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Non-LTE method (see table below) |
|
|
|
Vibrational temperature(s) in K |
|
|
|
Rotational temperature(s) in K |
|
|
|
Vibrational quantum number labels |
|
|
|
Rotational quantum number labels |
|
|
|
Path to NLTE data file |
Non-LTE Methods¶
Value |
Name |
Description |
Required Parameters |
|---|---|---|---|
|
LTE |
Local thermodynamic equilibrium (default) |
|
|
Treanor |
Two-temperature model |
|
|
Density |
Number density NLTE |
|
|
Population |
Population NLTE |
|
Filter Parameters¶
Used by px.stick_spectra(), px.cross_sections(), and px.stick_spectra_cross_section().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Minimum intensity threshold (cm/molecule) |
|
|
|
Maximum uncertainty filter (cm⁻¹) |
|
|
|
Quantum number filter dictionary |
qns_filter Format¶
A dictionary mapping quantum number label to a list of accepted value patterns.
An empty list [] means “accept all values”.
# Accept only v' = 0, 1, 2; v" = 5; v' = 7 and v" = 7, and all parities
qns_filter = {
'v': ['0,', '1,', '2,', ',5', '7,7'],
'+/-': [],
}
# Accept all configuration, Multiple, and parity
qns_filter = {
'configuration': [],
'Multiple': [],
'parity': [],
}
Quantum Number Parameters¶
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Optional quantum number label |
|
|
|
Optional quantum number format |
For ExoMol and ExoAtom input, the labels and formats are read from the
definition metadata (.def.json, .def, or .adef.json) by default.
For ExoMolHR input, the labels and formats are read from the
default metadata automatically.
Namespace prefixes are removed, for example Herzberg:n1 becomes n1 and
qn:configuration becomes configuration. Optional state columns such as
uncertainty, lifetime, and oscillator strength are not added to the automatic
quantum number list.
Provide qnslabel_list and qnsformat_list only for custom/legacy files or
when you need to override the metadata. In that case, the labels and formats
must correspond to the quantum number columns in the .states file.
ExoMolHR No need.
ExoMol override example (MgH XAB):
qnslabel_list = ['+/-', 'e/f', 'ElecState', 'v', 'Lambda', 'Sigma', 'Omega']
qnsformat_list = ['%1s', '%1s', '%12s', '%3d', '%3d', '%5.1f', '%5.1f']
ExoAtom override example (Ar NIST):
qnslabel_list = ['configuration', 'Multiple', 'parity']
qnsformat_list = ['%20s', '%10s', '%2s']
HITRAN Example (NO):
qnslabel_list = ['J', 'X', 'Omega', 'v1', 'Sym', 'F']
qnsformat_list = ['%5.1f', '%2s', '%3s', '%2d', '%1s', '%5s']
Line Profile Parameters¶
Used by px.cross_sections().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Line profile type |
|
|
|
Wing cutoff distance (cm⁻¹); |
|
|
|
Include predissociation lifetimes for Voigt width |
Broadening Parameters¶
Used by px.cross_sections().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Broadening species (e.g. |
|
|
|
Mixing ratios (must sum to 1.0) |
|
|
|
Constant Doppler HWHM (cm⁻¹); |
|
|
|
Constant Lorentzian HWHM (cm⁻¹); |
Set alpha_hwhm=None and gamma_hwhm=None to let PyExoCross calculate
HWHMs from broadening parameters in the database. Use constant values for
quick testing or when database broadening files are unavailable.
For HITRAN and HITEMP, Default uses air broadening (gamma_air), consistent with the standard HAPI convention (GammaL='gamma_air').
For standard HITRAN air-broadened calculations, use:
broadeners=['Air'],
ratios=[1.0],
To mix air and self broadening, use for example:
broadeners=['Air', 'Self'],
ratios=[0.7, 0.3],
Grid Parameters¶
Used by px.cross_sections().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Bin size in |
|
|
|
Number of grid points (mutually exclusive with |
Note
If both bin_size and n_point are specified, n_point takes precedence and bin_size is calculated from the range.
For wavelength calculations, bin_size is a wavelength interval.
For example, wn_wl='WL', wn_wl_unit='nm', and bin_size=0.01 means a 0.01 nm grid
spacing.
cutoff, alpha_hwhm, and gamma_hwhm remain in cm⁻¹ because line profiles are evaluated in wavenumber space internally.
Plotting Parameters¶
Used by px.oscillator_strengths(), px.stick_spectra(), px.cross_sections(), and px.stick_spectra_cross_section().
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Whether to generate a plot |
|
|
|
|
|
|
|
X-axis: |
|
|
|
X-axis unit: |
|
|
|
Lower limit for y-axis |
Note
These are convenience kwargs that get remapped internally to function-specific names.
For example, plot=True in
px.cross_sections() becomes plot_cross_section=True.