Calculate a large spectrum by partΒΆ
In may be faster to calculate a full-range spectrum on several partial spectral ranges, and combine them.
Uses the MergeSlabs() function for that.
Starting from 0.11, RADIS introduces a sparse waverange implementation that should make it possible to directly compute a full range spectrum. See the HITRAN full-range example

/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/master/radis/misc/warning.py:427: HighTemperatureWarning: HITRAN is valid for low temperatures (typically < 700 K). For higher temperatures you may need HITEMP or CDSD. See the 'databank=' parameter
warnings.warn(WarningType(message))
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/master/radis/misc/warning.py:427: HighTemperatureWarning: HITRAN is valid for low temperatures (typically < 700 K). For higher temperatures you may need HITEMP or CDSD. See the 'databank=' parameter
warnings.warn(WarningType(message))
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/master/radis/misc/warning.py:427: HighTemperatureWarning: HITRAN is valid for low temperatures (typically < 700 K). For higher temperatures you may need HITEMP or CDSD. See the 'databank=' parameter
warnings.warn(WarningType(message))
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/master/radis/misc/warning.py:427: UnevenWaverangeWarning: When resampling the spectrum, the new waverange had unequal spacing.
warnings.warn(WarningType(message))
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/master/radis/misc/warning.py:427: UnevenWaverangeWarning: When resampling the spectrum, the new waverange had unequal spacing.
warnings.warn(WarningType(message))
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/master/radis/misc/warning.py:427: UnevenWaverangeWarning: When resampling the spectrum, the new waverange had unequal spacing.
warnings.warn(WarningType(message))
OH-hitran-1000K-#7376 new quantities added: ['emisscoeff']
OH-hitran-1000K-#6368 new quantities added: ['emisscoeff']
OH-hitran-1000K-#1840 new quantities added: ['emisscoeff']
Spectrum Name: OH-hitran-1000K-#7376//OH-hitran-1000K-#6368//OH-hitran-1000K-#1840
Spectral Quantities
----------------------------------------
abscoeff [cm-1] (99,502 points)
emisscoeff [mW/cm3/sr/cm-1] (99,502 points)
transmittance_noslit (99,502 points)
emissivity_noslit (99,502 points)
absorbance (99,502 points)
radiance_noslit [mW/cm2/sr/cm-1] (99,502 points)
Physical Conditions
----------------------------------------
Tgas 1000 K
isotope N/A
mole_fraction 0.1
path_length 1 cm
pressure 10 bar
self_absorption True
species {'OH'}
state X
thermal_equilibrium True
wavenum_max N/A cm-1
wavenum_min N/A cm-1
Computation Parameters
----------------------------------------
NwG N/A
NwL 4
Tref 296 K
add_at_used numpy
broadening_method voigt
cutoff 1e-27 cm-1/(#.cm-2)
dbformat hitran
dbpath /home/docs/.radisdb/hitran/OH.h5
default_output_unit cm-1
diluent air
diluents {'air': 0.9}
folding_thresh 1e-06
include_neighbouring_lines True
isatom False
isneutral None
lbfunc None
memory_mapping_engine auto
neighbour_lines 0 cm-1
optimization simple
parsum_mode full summation
pfsource default
potential_lowering None
pseudo_continuum_threshold 0
radis_version 0.17
sparse_ldm True
spectral_points N/A
truncation 50 cm-1
waveunit cm-1
wstep Unequal spacing, average <wstep>=0.10 cm-1
zero_padding N/A
Config parameters
----------------------------------------
DEFAULT_DOWNLOAD_PATH ~/.radisdb
GRIDPOINTS_PER_LINEWIDTH_ERROR_THRESHOLD 1
GRIDPOINTS_PER_LINEWIDTH_WARN_THRESHOLD 3
SPARSE_WAVERANGE auto
Information
----------------------------------------
calculation_time 0.16682637199846795 s
chunksize None
db_use_cached True
dxG 0.1375350788016573
dxL 0.20180288881201608
export_lines False
export_populations None
export_rovib_fraction True
levelsfmt None
lines_calculated 5,587
lines_cutoff 21,804
lines_in_continuum 0
load_energies False
lvl_use_cached True
parfuncpath None
total_lines 27391
warning_broadening_threshold 0.01
warning_linestrength_cutoff 0.01
wavenum_max_calc N/A cm-1
wavenum_min_calc N/A cm-1
----------------------------------------
<matplotlib.lines.Line2D object at 0x720862149fd0>
from radis import MergeSlabs, calc_spectrum
spectra = []
for wmin, wmax in [(50, 3000), (3000, 7000), (7000, 10000)]:
spectra.append(
calc_spectrum(
wmin,
wmax,
Tgas=1000,
pressure=10, # bar
molecule="OH",
path_length=1,
mole_fraction=0.1,
wstep=0.1,
databank="hitran",
verbose=False,
)
)
s = MergeSlabs(*spectra, resample="full", out="transparent")
print(s)
s.plot("transmittance_noslit", wunit="nm")
Total running time of the script: (0 minutes 0.853 seconds)