Functions Reference¶
All functions are accessible from the top-level pyexocross namespace:
import pyexocross as px
Every function accepts either:
An
.inpfile path viainp_filepath, orKeyword arguments (
**kwargs), orBoth (keyword arguments override
.inpfile values).
Common CPU/GPU Compute Kwargs¶
PyExoCross uses CPU by default. You can explicitly select compute mode with:
Kwarg |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
|
|
|
|
GPU backend policy: |
|
|
|
GPU line-batch size for memory control |
|
|
|
GPU grid-batch size for memory control |
GPU acceleration is available for:
px.cooling_functions-> Recommend to use CPU modepx.stick_spectra-> Recommend to use CPU modepx.cross_sectionspx.stick_spectra_cross_section
CPU formulas are used for:
px.conversionpx.partition_functionspx.specific_heatspx.lifetimespx.oscillator_strengths
If device='GPU' but no compatible backend is available, PyExoCross falls
back to CPU formulas.
# Default CPU mode
px.cross_sections(..., device='CPU')
# GPU mode (auto backend)
px.cross_sections(
...,
device='GPU',
gpu_backend='AUTO',
gpu_batch_lines=8192,
gpu_batch_grid=256,
)
# CUDA policy: PyTorch-CUDA -> CuPy-CUDA -> MPS -> CPU fallback
px.cross_sections(..., device='GPU', gpu_backend='CUDA')
# Force PyTorch CUDA only
px.cross_sections(..., device='GPU', gpu_backend='PyTorch-CUDA')
# Force CuPy CUDA only
px.cross_sections(..., device='GPU', gpu_backend='CuPy-CUDA')
# Force PyTorch MPS only
px.cross_sections(..., device='GPU', gpu_backend='MPS')
px.load¶
data = px.load(..., cache='auto', cache_dir=None, max_memory=512,
all_transitions=False)
Loads and preprocesses reusable ExoMol, ExoAtom, ExoMolHR, HITRAN, or HITEMP
data. auto keeps small inputs in memory and converts large inputs to Parquet;
parquet forces persistent Parquet caching; none uses the original input
format. Use the result with data= in px.conversion,
px.partition_functions, px.specific_heats, px.lifetimes,
px.cooling_functions, px.oscillator_strengths, px.stick_spectra,
px.cross_sections, or px.stick_spectra_cross_section.
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
No |
Optional |
|
|
Yes* |
|
|
|
Conditional |
Required for molecular databases |
|
|
Conditional |
Required for ExoAtom |
|
|
Conditional |
Required except for ExoAtom |
|
|
Yes* |
Line-list dataset name |
|
|
No |
Species identifier; needed by conversions that write HITRAN IDs |
|
|
Yes* |
Database root containing the input line list |
|
|
No |
Output root retained for later calculations; default |
|
|
No |
Log path retained for later calculations; |
|
|
No |
Initial minimum wavenumber/wavelength; default |
|
|
No |
Initial maximum wavenumber/wavelength; default |
|
|
No |
Range coordinate, |
|
|
No |
|
|
|
No |
Maximum uncertainty retained during preprocessing; default |
|
|
No |
|
|
|
No |
Persistent cache directory; default is source-adjacent |
|
|
No |
Auto-mode memory threshold in MB; default |
|
|
No |
Rebuild matching persistent caches; default |
|
|
No |
Eagerly load all transition files; default |
|
|
No |
|
|
|
No |
GPU backend policy; default |
|
|
No |
GPU line-batch limit; default |
|
|
No |
GPU grid-batch limit; default |
|
|
No |
Rows read per transition chunk; default |
* Not required when supplied by inp_filepath.
Later calculations may provide their own min_range and max_range as long
as that interval is covered by the data loaded here. A wider interval requires
another px.load. The cutoff value does not expand the range required from
px.load.
Range errors report the exact recommended min_range and
max_range for the next load.
A later unc_filter may keep the loaded value or use a smaller, stricter value;
PyExoCross then filters the loaded data further. A larger value, or changing a
numeric filter to None, requires another px.load and the error reports the
required filter value.
For ExoMol and ExoAtom, a later qns_filter may add constraints or narrow the
values retained by px.load. Empty value lists are wildcards and do not filter
the loaded states. Removing an active constraint or adding values excluded by
px.load requires loading the data again. HITRAN, HITEMP, and ExoMolHR retain
the complete line table and apply QN filters during each calculation.
For ExoMol/ExoAtom, calling px.lifetimes, px.cooling_functions, or
px.oscillator_strengths automatically expands range-loaded data to all
transitions and updates the same object for reuse.
Set all_transitions=True only when this work should be done eagerly.
Partition functions and specific heats reuse states and database metadata from
LoadedData but do not read or expand transitions.
Example
data = px.load(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
logs_path='/path/to/output/log/MgH.log',
min_range=0,
max_range=10000,
cache='auto',
max_memory=512,
device='CPU',
)
# A narrower calculation range reuses the loaded data.
px.cross_section(
data=data,
min_range=1000,
max_range=2000,
temperatures=[296, 1000],
pressures=[1.0],
)
# This first whole-list calculation automatically loads all transitions.
px.lifetimes(data=data)
# These calls reuse the automatically expanded object.
px.cooling_functions(data=data)
px.oscillator_strengths(data=data)
The original direct API remains available and still performs loading, preprocessing, calculation, and saving in one call.
The direct API can also use the same cache without calling px.load:
px.conversion(..., cache='auto')
px.lifetimes(..., cache='auto')
px.cooling_functions(..., cache='auto')
px.oscillator_strengths(..., cache='auto')
px.stick_spectra(..., cache='auto')
px.cross_section(..., cache='auto')
px.stick_spectra_cross_section(..., cache='auto')
With cache_dir=None, PyExoCross stores persistent files in
<read_path>/<data_info>/.pyexocross_cache/. Initial conversion takes extra
time; subsequent runs reuse the cache if the source path, size, and
modification time are unchanged. Set refresh=True to rebuild it.
max_memory is specified in MB. The default max_memory=512 is converted
internally to 512 * 1024**2 bytes and only limits transition data retained by
cache='auto'; it is not a limit on total process memory.
The same Parquet files work in CPU and GPU modes. Current Parquet reading, decompression, and preprocessing run on the CPU through PyArrow. GPU mode accelerates supported calculation kernels after the required arrays are loaded.
For range-based spectra and cross sections, Parquet mode stores filtered files
under <cache_dir>/ranges/ using names with specified ranges.
A finite cutoff expands the cached interval only inside the transition files selected by the original
calculation range; it does not add adjacent source files. Cache validity and
source metadata are stored in <cache_dir>/manifest.json. When several valid
caches cover a request, PyExoCross selects the narrowest interval and prints
the number, intervals, and total size of range cache files.
The complete states table is also stored in a parquet file.
Its source path, size, and modification time
are tracked in the same manifest instead of being embedded in the filename.
HITRAN/HITEMP fixed-width files and ExoMolHR CSV files are normalized once and
stored as database-prefixed, range-named *__00000-30000.linelist.parquet
files. Their existing v
column is used for row-group range filtering, while uncertainty and intensity
filters remain calculation parameters. With cache_dir=None, these caches are
stored in .pyexocross_cache beside the source .par or .csv file.
px.run¶
px.run(inp_filepath, force_reload=False)
Run all enabled functions from an .inp configuration file. This is the
programmatic equivalent of running python3 run.py -p <inp_filepath> from the
command line.
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Yes |
Path to the |
|
|
No |
Force re-parse of |
Note
If you edit the same .inp file repeatedly in a long-lived session (e.g. Jupyter),
use force_reload=True to avoid reusing stale cached parameters.
Example
px.run('/path/to/MgH_ExoMol.inp')
# Re-read updated .inp content in the same session
px.run('/path/to/MgH_ExoMol.inp', force_reload=True)
px.download¶
px.download(database, file_path=None, **kwargs)
Download database files from external servers. Supported databases are ExoMol, ExoMolHR, ExoAtom, and HITRAN.
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Yes |
Name of the database to download: |
|
|
Yes |
Path to save the downloaded files (e.g. |
|
|
Yes |
Molecule/isotopologue or atom configuration dictionary. |
|
|
Yes |
If |
|
|
Optional |
Filter transitions by wavenumber range (cm⁻¹). |
|
|
Optional |
Temperature in Kelvin. |
|
|
Optional |
Minimum line intensity threshold in cm/molecule. |
|
|
Optional |
The dataset to use. Can be either |
Species Configuration Options (species_info)¶
Inside species_info, you can configure the following optional settings:
wn_range(list/tuple of[wn_min, wn_max]): Filter transitions by wavenumber range (cm⁻¹). Supported by ExoMol (downloads only segmented transition files fully within range), ExoMolHR, and HITRAN.Tortemperature(int): Temperature in Kelvin. Required for ExoMolHR online query downloads.thresholdorSmin(float): Minimum line intensity threshold in cm/molecule. Required for ExoMolHR online query downloads to filter out weaker lines.dataset(str): The dataset to use. Required for ExoAtom downloads. Can be either'NIST'(critically evaluated and recommended for accuracy) or'Kurucz'(recommended for completeness).
Database |
Required Parameters |
Optional Parameters |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Examples
ExoMol Download¶
px.download(
database='ExoMol',
file_path='/path/to/ExoMol/',
species_info={
'MgH': {
'24Mg-1H': {'wn_range': None},
'25Mg-1H': {'wn_range': None},
},
'H2O': {
'1H2-16O': {'wn_range': [41000, 41200]},
},
},
download=True,
)
ExoMolHR Download¶
px.download(
database='ExoMolHR',
file_path='/path/to/ExoMolHR/',
species_info={
'MgH': {
'24Mg-1H': None,
'25Mg-1H': {'T': 1000, 'wn_range': [0, 500], 'threshold': 1e-30},
},
'AlH': {
'27Al-1H': {'T': 500, 'wn_range': [0, 500], 'threshold': 1e-30}
},
},
download=True,
)
ExoAtom Download¶
px.download(
database='ExoAtom',
file_path='/path/to/ExoAtom/',
species_info={
'He': {'dataset': 'NIST'},
'He_p': {'3He_p': {'dataset': 'NIST'}},
'Ar_p': {'dataset': 'Kurucz'},
},
download=True,
)
HITRAN Download¶
px.download(
database='HITRAN',
file_path='/path/to/HITRAN/',
species_info={
'NO': {
'14N-16O': {'wn_range': [0, 100]},
'15N-16O': {'wn_range': [100, 150]},
},
'H2O': {
'1H2-16O': {'wn_range': [100, 110]},
},
},
download=True,
)
Generating URLs Only¶
If you only want to generate the list of URLs to be downloaded later, set download=False:
px.download(
database='ExoMol',
file_path='/path/to/ExoMol/',
species_info={'MgH': {'24Mg-1H': None}},
download=False,
)
This will save the URLs to /path/to/ExoMol/url/exomol__urls.txt and print them to the console.
px.conversion¶
px.conversion(inp_filepath=None, **kwargs)
Convert between ExoMol/ExoMolHR/ExoAtom and HITRAN line-list formats.
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to |
|
|
|
|
|
|
|
Molecule name (e.g. |
|
|
|
Atom name for ExoAtom (e.g. |
|
|
|
Isotopologue (e.g. |
|
|
|
Dataset name (e.g. |
|
|
|
Species identifier (e.g. |
|
|
|
Path to input database |
|
|
|
Path for output files |
|
|
|
Log file path |
|
|
|
|
|
|
|
Minimum frequency in cm⁻¹ |
|
|
|
Maximum frequency in cm⁻¹ |
|
|
|
Uncertainty filter (cm⁻¹); |
|
|
|
Intensity threshold (cm/molecule); |
|
|
|
Global quantum number labels for HITRAN output |
|
|
|
Global QN format specifiers (total 15 chars in HITRAN2004) |
|
|
|
Local quantum number labels for HITRAN output |
|
|
|
Local QN format specifiers (total 15 chars in HITRAN2004) |
|
|
|
Optional quantum number label override; ExoMol/ExoMolHR/ExoAtom labels are derived from definition metadata by default |
|
|
|
Optional quantum number format override; ExoMol/ExoMolHR/ExoAtom formats are derived from definition metadata by default |
|
|
|
CPU cores for processing transitions |
|
|
|
Files processed simultaneously |
|
|
|
Chunk size for transitions |
|
|
|
|
|
|
|
Persistent cache directory |
|
|
|
Auto-mode memory threshold in MB |
Legacy Aliases
px.convert_exomol_to_hitran(...) # Sets conversion_format='HITRAN'
px.convert_exomolhr_to_hitran(...) # Sets conversion_format='HITRAN'
px.convert_exoatom_to_hitran(...) # Sets conversion_format='HITRAN'
px.convert_hitran_to_exomol(...) # Sets conversion_format='ExoMol'
Example
px.conversion(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
conversion_format='HITRAN',
global_qn_label_list=['ElecState', 'v', 'Omega'],
global_qn_format_list=['%9s', '%2d', '%4s'],
local_qn_label_list=['J', 'e/f'],
local_qn_format_list=['%5.1f', '%2s'],
)
px.partition_functions¶
px.partition_functions(inp_filepath=None, **kwargs)
Calculate partition functions \(Q(T) = \sum_n g_n^{\text{tot}} \exp(-c_2 \tilde{E}_n / T)\).
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to |
|
|
|
Database name |
|
|
|
Molecule name |
|
|
|
Atom name (ExoAtom) |
|
|
|
Isotopologue |
|
|
|
Dataset name |
|
|
|
Species identifier |
|
|
|
Input database path |
|
|
|
Output path |
|
|
|
Log file path |
|
|
|
Temperature step in K |
|
|
|
Maximum temperature in K |
|
|
|
CPU cores for transitions |
|
|
|
Files processed simultaneously |
|
|
|
Chunk size |
Legacy Alias: px.partition_function
Example
px.partition_functions(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
ntemp=1,
tmax=5000,
)
px.specific_heats¶
px.specific_heats(inp_filepath=None, **kwargs)
Calculate specific heat capacities \(C_p(T)\) using partition function derivatives.
Parameters: Same as px.partition_functions.
Legacy Alias: px.specific_heat
Example
px.specific_heats(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
ntemp=1,
tmax=5000,
)
px.cooling_functions¶
px.cooling_functions(inp_filepath=None, **kwargs)
Calculate cooling functions:
Parameters
Same as px.partition_functions, plus optional
compute backend kwargs:
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
GPU line-batch size (memory control) |
|
|
|
GPU grid-batch size (memory control) |
Legacy Alias: px.cooling_function
Example
px.cooling_functions(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
ntemp=1,
tmax=5000,
device='CPU',
)
px.lifetimes¶
px.lifetimes(inp_filepath=None, **kwargs)
Calculate radiative lifetimes: $\(\tau_i = 1 / \sum_f A_{fi}\)$
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to |
|
|
|
Database name |
|
|
|
Molecule name |
|
|
|
Atom name (ExoAtom) |
|
|
|
Isotopologue |
|
|
|
Dataset name |
|
|
|
Species identifier |
|
|
|
Input database path |
|
|
|
Output path |
|
|
|
Log file path |
|
|
|
|
|
|
|
CPU cores for transitions |
|
|
|
Files processed simultaneously |
|
|
|
Chunk size |
Legacy Alias: px.lifetime
Example
px.lifetimes(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
compress=False,
)
px.oscillator_strengths¶
px.oscillator_strengths(inp_filepath=None, **kwargs)
Calculate oscillator strengths: weighted \(gf = g_{\text{tot}}' A_{fi} / (c \tilde{\nu}_{fi})^2\) or unweighted \(f\)-values.
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to |
|
|
|
Database name |
|
|
|
Molecule name |
|
|
|
Atom name (ExoAtom) |
|
|
|
Isotopologue |
|
|
|
Dataset name |
|
|
|
Species identifier |
|
|
|
Input database path |
|
|
|
Output path |
|
|
|
Log file path |
|
|
|
|
|
|
|
CPU cores for transitions |
|
|
|
Files processed simultaneously |
|
|
|
Chunk size |
|
|
|
Whether to generate a plot |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lower limit for y-axis |
Legacy Alias: px.oscillator_strength
Example
px.oscillator_strengths(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
gf_or_f='f',
plot=True,
plot_method='log',
plot_wn_wl='WN',
plot_unit='cm-1',
limit_yaxis=1e-30,
)
px.stick_spectra¶
px.stick_spectra(inp_filepath=None, **kwargs)
Calculate LTE or Non-LTE stick spectra (absorption or emission).
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to |
Species |
|||
|
|
|
|
|
|
|
Molecule name |
|
|
|
Atom name (ExoAtom) |
|
|
|
Isotopologue |
|
|
|
Dataset name |
|
|
|
Species identifier |
Paths |
|||
|
|
|
Input database path |
|
|
|
Output path |
|
|
|
Log file path |
Physical conditions |
|||
|
|
|
Temperature(s) in K |
|
|
|
|
|
|
|
|
|
|
|
Minimum range value (in |
|
|
|
Maximum range value (in |
|
|
|
|
|
|
|
Optional isotopic abundance multiplier |
Non-LTE |
|||
|
|
|
|
|
|
|
Vibrational temperatures for method |
|
|
|
Rotational temperatures for method |
|
|
|
Vibrational QN labels for method |
|
|
|
Rotational QN labels for method |
|
|
|
Path to NLTE data file (methods |
Filters |
|||
|
|
|
Intensity threshold (cm/molecule); |
|
|
|
Uncertainty filter (cm⁻¹); |
|
|
|
Quantum number filter (see below) |
Quantum numbers |
|||
|
|
|
Optional QN label override; ExoMol/ExoAtom labels are derived from definition metadata by default |
|
|
|
Optional QN format override; ExoMol/ExoAtom formats are derived from definition metadata by default |
Computing |
|||
|
|
|
CPU cores for transitions |
|
|
|
Files processed simultaneously |
|
|
|
Chunk size |
|
|
|
|
|
|
|
|
|
|
|
GPU line-batch size (memory control) |
|
|
|
GPU grid-batch size (memory control) |
Plotting |
|||
|
|
|
Whether to generate a plot |
|
|
|
|
|
|
|
X-axis: |
|
|
|
|
|
|
|
Lower limit for y-axis (cm/molecule) |
Note
wn_wl and wn_wl_unit define the calculation range, saved file name, and the
first column of the saved .stick file.
Use wn_wl='WN', wn_wl_unit='cm-1'
to save wavenumber, or wn_wl='WL', wn_wl_unit='nm'/'um' to save wavelength.
plot_wn_wl and plot_unit only control the plot x-axis.
Quantum Number Filter (qns_filter)¶
The qns_filter parameter accepts a dictionary where keys are quantum number
labels and values are lists of accepted value patterns. Use an empty list
[] to accept all values for that label.
qns_filter={
'+/-': [], # accept all parities
'v': ['0,', '1,', '2,'], # only v' = 0, 1, 2
'ElecState': [], # accept all electronic states
}
Example
px.stick_spectra(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
temperatures=[1000, 2000],
wn_wl='WN',
wn_wl_unit='cm-1',
min_range=0,
max_range=30000,
abs_emi='Ab',
abundance=1.0,
device='CPU',
)
px.cross_sections¶
px.cross_sections(inp_filepath=None, **kwargs)
Calculate LTE or Non-LTE cross sections with a choice of line profiles.
Parameters
All parameters from px.stick_spectra, plus:
Parameter |
Type |
Default |
Description |
|---|---|---|---|
Grid |
|||
|
|
|
Pressure(s) in bar |
|
|
|
Bin size (in |
|
|
|
Number of grid points; mutually exclusive with |
Line profile |
|||
|
|
|
Line profile (see table below) |
|
|
|
Wing cutoff in cm⁻¹; |
|
|
|
Use predissociation lifetimes for Voigt width |
Broadening |
|||
|
|
|
Broadening species |
|
|
|
Broadener mixing ratios (must sum to 1.0) |
|
|
|
Constant Doppler HWHM; |
|
|
|
Constant Lorentzian HWHM; |
Plotting |
|||
|
|
|
Whether to generate a plot |
|
|
|
|
|
|
|
X-axis: |
|
|
|
|
|
|
|
Lower limit for y-axis (cm\(^2\)/molecule) |
Note
The cross-section grid is built in the selected wn_wl_unit.
For example,
with wn_wl='WL', wn_wl_unit='nm', min_range, max_range, bin_size, the
saved file name, and the first column of the saved .xsec file all use nm.
The plot axis can be changed independently with plot_wn_wl and plot_unit.
Line-profile widths and cutoff remain in cm⁻¹.
Available Line Profiles¶
Profile Name |
Description |
|---|---|
|
Pure Doppler profile |
|
Gaussian profile |
|
Lorentzian profile |
|
Voigt via SciPy |
|
Voigt via SciPy |
|
Humlicek algorithm for Voigt |
|
Generic pseudo-Voigt |
|
Thompson pseudo-Voigt approximation |
|
Kielkopf pseudo-Voigt approximation |
|
Olivero pseudo-Voigt approximation |
|
Liu-Lin pseudo-Voigt approximation |
|
Rocco pseudo-Voigt approximation |
|
Binned Doppler profile |
|
Binned Gaussian profile |
|
Binned Lorentzian profile |
|
Binned Voigt profile |
Available Broadeners¶
Broadener |
Description |
|---|---|
|
Default broadening parameters |
|
Air broadening (N\(_2\) + O\(_2\)) |
|
Self broadening |
|
Hydrogen broadening |
|
Helium broadening |
|
CO\(_2\) broadening |
|
Water broadening |
|
Support all broadening files format from ExoMol database.
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],
Legacy Alias: px.cross_section
Example
px.cross_sections(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
temperatures=[1000, 2000],
pressures=[1.0],
wn_wl='WN',
wn_wl_unit='cm-1',
min_range=0,
max_range=30000,
bin_size=0.1,
abs_emi='Ab',
abundance=1,
profile='SciPyVoigt',
device='GPU',
gpu_backend='AUTO',
gpu_batch_lines=8192,
gpu_batch_grid=256,
broadeners=['Default'],
ratios=[1.0],
cutoff=25.0,
plot=True,
plot_method='log',
)
px.stick_spectra_cross_section¶
px.stick_spectra_cross_section(inp_filepath=None, **kwargs)
Calculate LTE or Non-LTE stick spectra and cross sections simultaneously.
Parameters
All parameters from px.stick_spectra and px.cross_sections.
The same wn_wl/wn_wl_unit selection is used for both saved outputs:
.stick and .xsec first columns are both wavenumber for WN and wavelength
for WL. Cross-section bin_size follows the same unit.
Example
px.stick_spectra_cross_section(
database='ExoMol',
molecule='MgH',
isotopologue='24Mg-1H',
dataset='XAB',
species_id=501,
read_path='/path/to/ExoMol/',
save_path='/path/to/output/',
temperatures=[1000, 2000],
pressures=[1.0],
wn_wl='WN',
wn_wl_unit='cm-1',
min_range=0,
max_range=30000,
bin_size=0.1,
abs_emi='Ab',
abundance=1,
profile='SciPyVoigt',
device='GPU',
gpu_backend='AUTO',
gpu_batch_lines=8192,
gpu_batch_grid=256,
plot=True,
)