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, HITRAN, HITEMP |
|
|
|
Atom name (e.g. |
ExoAtom |
|
|
|
Isotopologue (e.g. |
ExoMol, HITRAN, HITEMP |
|
|
|
Dataset name (e.g. |
All |
|
|
|
Numeric species identifier |
All |
database Accepted Values¶
Value |
Description |
|---|---|
|
ExoMol molecular database (default) |
|
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 |
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 |
|
ExoAtom |
Root directory of ExoAtom database |
|
HITRAN |
Root directory of HITRAN database |
|
HITEMP |
Root directory of HITEMP database |
|
For ExoMol, the code automatically resolves the full path as:
{read_path}/{molecule}/{isotopologue}/{dataset}/
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) |
GPU acceleration scope:
Enabled for
cooling_functions,stick_spectra,cross_sections, andstick_spectra_cross_sectionOther functions are CPU formula based
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)
run_mode='CPU'
# GPU (auto backend)
run_mode='GPU'
gpu_backend='AUTO'
gpu_batch_lines=8192
gpu_batch_grid=256
# GPU (auto CUDA provider priority: PyTorch first, then CuPy)
run_mode='GPU'
gpu_backend='CUDA'
# GPU (force PyTorch CUDA only)
run_mode='GPU'
gpu_backend='PyTorch-CUDA'
# GPU (force CuPy CUDA only)
run_mode='GPU'
gpu_backend='CuPy-CUDA'
# GPU (force MPS)
run_mode='GPU'
gpu_backend='MPS'
:::{tip}
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:
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)
:::{important} 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 |
|
|
|
|
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 |
|---|---|---|---|
|
|
|
Quantum number column labels |
|
|
|
Quantum number format specifiers |
The labels and formats must correspond to the columns in the .states file
after the standard columns (ID, energy, degeneracy, lifetime).
ExoMolHR No need.
ExoMol Example (MgH XAB):
qnslabel_list = ['+/-', 'e/f', 'ElecState', 'v', 'Lambda', 'Sigma', 'Omega']
qnsformat_list = ['%1s', '%1s', '%12s', '%3d', '%3d', '%5.1f', '%5.1f']
ExoAtom 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⁻¹); |
:::{tip}
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.
:::
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.
:::
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.
:::