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: .. code-block:: shell 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: .. code:: shell vald3-to-atoms.py tune-zinf 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) .. code:: shell 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** .. code:: shell innewmarcs --absoru T --opa F pfant --absoru T --opa F or :: run4.py --absoru T --opa F **MARCS opacities (absorption and scattering) only** .. code:: shell 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``): .. code-block:: none --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. a. go to directory ``PFANT/data/common`` and run ``get-grid.moo.sh``, or b. download it from `this location `__ (or `this location `__) and save it as "PFANT/data/common/grid.moo" Conversion of molecular lines from other formats to PFANT format ---------------------------------------------------------------- See :doc:`convmol`.