Miscellanea how-to¶
Create grid of atmospheric models¶
For spectral synthesis, PFANT uses model atmospheres encoded in its own binary “.mod” format. Such
“.mod” files are generated by the Fortran binary innewmarcs, which interpolates within a grid of
model atmospheres. This grid is also encoded in “.mod” format and can be generated using the script
create-grid.py.
To create a grid of atmospheric models:
Download atmospheric models of interest from MARCS website (http://marcs.astro.uu.se/) and put all files in a single directory
Run one of the options below:
Without MARCS opacities:
create-grid.py --mode modbin
With MARCS opacities:
create-grid.py –mode opa
Converting “VALD3 extended” format atomic lines to PFANT format¶
The Vienna Atomic Line Database (VALD) is “a collection of atomic and molecular transition parameters of astronomical interest” (http://vald.astro.uu.se/).
To convert from the “VALD3 extended” to a “PFANT atomic lines” file:
vald3-to-atoms.py <vald3-extended-filename>
tune-zinf <output-from-previous-command>
This is done in two steps. The first step, vald3-to-atoms.py does
the actual conversion (which is quick) and saves a file, e.g., “atoms-untuned-xxxxx.dat”
The second step (which is time-consuming) is performed by tune-zinf.py and aims
to tune an important parameter used by the pfant Fortran binary.
For more information, see help for vald3-to-atoms.py, tune-zinf.py, cut-atoms.py
(call these scripts with --help option).
Continuous opacities: selecting between PFANT and MARCS coefficients¶
By default, PFANT internally calculates the continuum absorption coefficients, then adds MARCS scattering coefficients.
PFANT-calculated continuum absorption + MARCS scattering (default)
innewmarcs --absoru T --opa T --sca T --abs F
pfant --absoru T --opa T --sca T --abs F
or
run4.py --opa T --sca T --abs F
PFANT-calculated continuum only
innewmarcs --absoru T --opa F
pfant --absoru T --opa F
or
run4.py --absoru T --opa F
MARCS opacities (absorption and scattering) only
innewmarcs --absoru F --opa T --sca T --abs T
pfant --absoru F --opa T --sca T --abs T
or
run4.py --absoru F --opa T --sca T --abs T
Note
For innewmarcs, “–opa T” causes the creation of an additional file modeles.opa besides modeles.mod.
Related command-line options (also accessible in x.py):
--opa T ...... switches on MARCS opacities
(may be of two types: absorption and scattering)
--abs T ...... switches on MARCS absorption
--sca T ...... switches on MARCS scattering
--absoru F ... switches off PFANT internal calculation
Note
In order to use continuum opacities calculated by MARCS code (http://marcs.astro.uu.se/),
you will need to create your own atmospheric model grid (using create-grid.py),
or download file “grid.moo” as explained below (this file is too big to be stored on
GitHub (241 MB > 100 MB)). File “grid.moo” contains a 3D grid of MARCS
(http://marcs.astro.uu.se/) atmospheric models with opacities included.
go to directory
PFANT/data/commonand runget-grid.moo.sh, ordownload it from this location (or this location) and save it as “PFANT/data/common/grid.moo”