Postprocessing
ProDiMo
output to add/modify lines for FLiTs

This module provides postprocessing routines to modify the ProDiMoForFLiTs.fits
ProDiMo
output file, and produce corresponding LAMDA files.
This module relies on prodimopy.run_slab to calculate the level populations, hence QTpy folder is required to be downloaded from here:
https://hitran.org/files/TIPS/TIPS2021/
.
The following example modifies the ProDiMoForFLiTs.fits to modify existing and add some new lines to the fits file
The
postprocess_lines()
function does the postprocessing.
import
prodimopy.postprocessing
as
pp
pp
.
postprocess_lines
(
QTpath
=
'/path/to/QTpy/'
,
directory
=
'/path/to/directory/containing/prodimo/and/.fitsfiles'
,
input_file
=
'name of the input fits file, e.g. ProDiMoForFLiTs.fits'
,
output_file
=
'name of the output fits file, e.g. ProDiMoForFLiTs_new.fits'
,
linemode
=
'replace'
,
lineselection
=
'/path/to/new/LineSelection.in'
)
prodimopy.postprocessing.
calculate_population_grid
(
molecule
,
iso
,
T
,
lvldata
,
QTpath
,
HITRAN_QT
)
[source]

Calculate the level population grid based on T grid of the 2D disk
prodimopy.postprocessing.
postprocess_lines
(
QTpath
=
'.'
,
directory
=
'.'
,
linemode
=
'replace'
,
input_file
=
'ProDiMoForFLiTs.fits.gz'
,
output_file
=
'ProDiMoForFLiTs_PP.fits.gz'
,
lineselection
=
'LineSelectionPP.in'
)
[source]

Edit ProDiMoForFLiTs.fits.gz function to add new lines and species
Parameters
:
QTpath
(
string
) – Path to the QTpy folder downloaded from HITRAN
directory
(
string
) – Working directory that contains
ProDiMo
outputs and the fits file. The output also uses this parent directory.
linemode
(
str
) – Can be ‘replace’ or ‘add’
‘replace’ will replace existing occrence, if any, of the species in the .fits file. If not present, then it will automatically add new HDU.
‘add’ will add another HDU with the species, irrespective of whether it already exists.
input_file
(
str
) – Filename of existing .fits file that is to be modified
output_file
(
str
) – Output file name, should end with ‘.fits’
lineselection
(
string
) – Path to file which specifies the line selection