Welcome to pymoog’s documentation!¶
Introduction to pymoog¶
pymoog
is a python3 wrapper for running the LTE spectrum synthesis part of the code MOOG written by Chris Sneden.
It wraps up the (a bit) teidous steps for generating a synthetic spectra into four python commands, while retaining the functions provided by MOOG.
Besides, it also provides some other functions for analysing the MOOG result, mainly contribution function and fitting stellar parameters.
Here you can:
generate a synthetic spectra
alter the stellar parameters for the spectra, such as $T_\mathrm{eff}$, metallicity, abundance ratios or resolution.
determine some stellar parameters, such as microturbulance velocity or abundance ratios.
without considering:
where to grab stellar atmosphere models and line lists
how to interpolate the models.
Warning
We cannot use any code blindly, so it is important to read the output files of MOOG, i.e., MOOG.out1/2/3, and the user manual of MOOG when you find something may gone wrong.
Installation¶
Install gfortran compilar¶
pymoog
use gfortran, a free Fortran compiler as a part of GCC.
Although it is possible to use other Fortran compiler to compile MOOG, using gfortran is (to my experience) the mose easy one and thus pymoog requires gcc to be installed before installation.
First, we check whether gfortran is installed in your computer.
Type gfortran
in the terminal; if you get:
gfortran: fatal error: no input files
compilation terminated.
then gfortran is already installed and please go to next section.
If you get:
command not found: gfortran
then you need to install gfortran:
Linux:
sudo apt install gcc
Windows: please use Windows Subsystem for Linux and follow the instruction for Linux.
Mac: please refer to this post; the main point is using
brew
to install (brew install gcc
). I have no experience on using Mac so, finger crossed.
Install pymoog¶
Using pypi (recommended)
pip install pymoog
From github
clone
this repository andcd
into the corresponding folder;pip install .
Note that pymoog
requires some large files (atmosphere models and line lists, stored in here) to run , and they will be downloaded during pip install
.
Thus the installation may takes 10 or 20 minutes without anything prompting in the command line.
When upgrading pymoog
, the program check if there is any newer version of the large files.
If the local files are up-to-date, then the download will be skipped to speed up the installation process.
Uninstall pymoog¶
Uninstall in pip:
pip uninstall pymoog
.Remove all the files in pymoog running folder:
rm -r ~/.pymoog
Quickstart¶
Here presents a minimum example for using pymoog to generate a synthetic spectra. For more detailed usage and other functions of the code, please refer to drivers’ guide.
Let’s say that we want to generate a synthetic with $T_\mathrm{eff}=5000,\mathrm{K}$, $\log{g}=4.0$, and metallicity $\mathrm{[M/H]}=0$ (these are the three stellar parameters you always need to provide). The spectra spans from $6000$ to $6200,\mathrm{\AA}$ and with a resolution of 30000.
s = pymoog.synth.synth(5000, 4.0, 0, 6000, 6200, 30000)
# Teff, logg, [Fe/H], wav_start(A), wav_end(A), resolution
s.prepare_file()
s.run_moog()
s.read_spectra()
Then you are done!
The synthetic spectra is stored in the object s
:
# Plot the synthesized spectra
plt.plot(s.wav, s.flux)
There should be a figure here.
Guide for each driver¶
Here we presents the useage of each drivers imported to pymoog in detail.
MOOG provides 14 drivers used for various purpose, and 5 of them are imported in pymoog:
driver |
explanation |
imported |
---|---|---|
synth |
spectrum synthesis, varying atomic abundances |
yes |
weedout |
segregation of very weak lines from stronger ones in a large line list |
yes |
abfind |
force-fitting abundances to match single-line equivalent widths |
yes |
blends |
force-fitting abundances to match blended-line equivalent widths |
yes |
cog |
curve-of-growth creation for individual lines |
yes |
binary |
spectrum synthesis of a binary star individual lines |
no |
gridsyn |
mass production of synthetic spectra |
no |
cogsyn |
curve-of-growth creation for blended features |
no |
ewfind |
calculation of equivalent widths of individual lines |
no |
calmod |
converting a BEGN tauross model to an equivalent tau5000 scale |
no |
doflux |
plot the overall flux curve of the model atmosphere |
no |
synpop |
spectrum synthesis for a stellar population |
no |
abpop |
equivalent width matching for a stellar population |
no |
plotit |
re-plotting of spectra that were created in a prior run |
no |
There are two more functions which are available in pymoog:
Contribution function: a function indicating where the lines are formed in the atmosphere
MPFIT: an algorithm for self-consistent multi-parameter fitting for spectra, by [Takeda (1995)](https://ui.adsabs.harvard.edu/abs/1995PASJ…47..287T).
The following links provide the usage of each driver and function listed above. Only the keywords worth attention will be descripbed, and please refer to the help docstring for detail description of each keyword.
synth: create synthetic spectra¶
Now let’s see what we can control in synth
, the core part of pymoog
.
The example shown in quickstart only involve a few stellar parameters, i.e., $T_\mathrm{eff}$, $\log{g}$ and metallicity.
Changing elemental abundance ratios¶
The elemental abundance ratios are altered thruough abun_change
keyword in s.prepare_file
:
s = pymoog.synth.synth(5000, 4.0, 0, 6000, 6200, 30000)
s.prepare_file(abun_change={14:0.1, 28:-0.4})
s.run_moog()
s.read_spectra()
abun_change
is a dictionary with the keys as the atomic number, and value as the [X/Fe] value of the element.
Providing your own model file¶
s = pymoog.synth.synth(5000, 4.0, 0, 6000, 6200, 30000)
s.prepare_file(model_file='Yourmodel.mod', model_format='moog')
s.run_moog()
s.read_spectra()
You can provide your own model file into pymoog by specifying the model_file
as your model file name.
Note that the model file must be in the format of MOOG, ATLAS9, ATLAS12 or MARCS, and the model_format
must be specified accordingly as “moog”, “kurucz-atlas9”, “kurucz-atlas12” or “marcs”.
Specifying the smoothing parameters¶
s = pymoog.synth.synth(5000, 4.0, 0, 6000, 6200, 30000)
s.prepare_file(smooth_para=['r', 0.1, 10, 0, 5, 0])
s.run_moog()
s.read_spectra()
The smooth_para
kayword in s.prepare_file
is used for specifying the smoothing parameters.
The arrangement of smooth_para
follows the third line of plotpars
in batch.par
(refer to page 9 of MOOG Manual).
The first value is a one-character smoothing type for the synthetic spectra.
Possible types are: g (Gaussian), l (Lorentzian), v (rotational), m (macroturbulent), c=g+v, d=g+m, r=g+m+v
The following values are:
the full-width-at-half-maximum of a Gaussian smoothing function
vsini of a rotational broadening function
limb darkening coefficient of a rotational broadening function
macroturbulence veloxity
the full-width-at-half-maximum of a Lorentzian smoothing function
Note that if a type is specified, then only the value of this (or these) type(s) are valid.
pymoog
use the full-width-at-half-maximum of a Gaussian smoothing function as the line-spread-function, and calculate the width from the input resolution.
If the second value in smooth_para
is set as 0, then it will be over-written by the width, othewise not over-written.
weedout: removing weak lines¶
It is sometimes useful to remove the weak lines which do not affect the spectra so much, keeping the line list short and clean.
The weedout
driver is for this task.
w = pymoog.weedout.weedout(5000, 4.0, 0, 10830-15, 10830+15, kappa_ratio=0.2, line_list='vald_3000_11000',)
w.prepare_file()
w.run_moog()
w.compare(50000)
plt.plot(w.wav_all, w.flux_all, label='before weedout')
plt.plot(w.wav_keep, w.flux_keep, label='after weedout')
The lines with kappa_ratio (ratio of line to continuum opacity) smaller than the specified number is removed. A value of 0.01 can usually remove the weak lines but keep the synthetic spectra identical. Note that which lines are removed is subject to the stellar parameters.
abfind: force-fitting abundances to match single-line equivalent widths.¶
Suppose we have a list of strong lines (stored as linelist
DataFrame) with their measured EW as follow:
wavelength id EP loggf C6 D0 EW
0 11032.103 12.0 5.9460 -1.801 0.000 NaN 23.05
1 11033.662 12.0 5.9460 -2.073 0.000 NaN 13.33
2 11034.481 12.0 5.9460 -2.426 0.000 NaN 6.24
3 11005.127 14.0 6.2228 -2.098 -7.200 NaN 5.54
4 11013.703 14.0 6.2061 -0.983 -7.320 NaN 48.24
5 11017.966 14.0 6.2061 0.760 -7.320 NaN 281.02
6 11040.405 14.0 6.2061 -1.449 -7.320 NaN 22.53
7 11019.848 19.0 2.6700 -0.010 3073.329 NaN 11.13
8 11022.653 19.0 2.6703 -0.161 3073.329 NaN 7.98
9 11015.530 24.0 3.4493 -0.429 -7.530 NaN 43.10
10 11044.610 24.0 3.0112 -1.930 -7.780 NaN 5.74
11 11013.235 26.0 4.7955 -1.383 -7.550 NaN 35.22
12 11026.788 26.0 3.9434 -2.805 -7.810 NaN 11.92
13 11045.599 26.0 5.5870 -0.624 -7.500 NaN 35.73
14 11057.772 26.0 4.8349 -1.967 -7.550 NaN 11.55
15 11069.374 26.0 6.2223 -1.055 -7.140 NaN 5.06
16 11081.595 26.0 5.6425 -1.419 -7.470 NaN 7.37
17 11088.584 28.0 4.1647 -1.512 -7.560 NaN 16.36
18 11054.253 30.0 5.7958 -0.300 0.000 NaN 18.43
Note
The DataFrame has to be sorted in id and wavelength.
Then abfind can run as:
a = pymoog.abfind.abfind(5000, 4.0, 0.0, line_list='line.list')
a.prepare_file()
pymoog.line_data.save_linelist(linelist, MOOG_run_path + 'line.list')
a.run_moog()
a.read_output()
The output of abfind will be stored as a dict with it keys as elements and values as DataFrame:
{12.0: wavelength ID EP logGF EWin logRWin abund delavg
0 11032.103 12.0 5.946 -1.801 23.05 -5.680 7.376 -0.002
1 11033.662 12.0 5.946 -2.073 13.33 -5.918 7.378 0.000
2 11034.481 12.0 5.946 -2.426 6.24 -6.248 7.379 0.001,
14.0: wavelength ID EP logGF EWin logRWin abund delavg
0 11005.127 14.0 6.223 -2.098 5.54 -6.298 7.606 -0.030
1 11013.703 14.0 6.206 -0.983 48.24 -5.359 7.639 0.003
2 11017.966 14.0 6.206 0.760 281.02 -4.593 7.667 0.031
3 11040.405 14.0 6.206 -1.449 22.53 -5.690 7.632 -0.004,
19.0: wavelength ID EP logGF EWin logRWin abund delavg
0 11019.848 19.0 2.67 -0.010 11.13 -5.996 4.866 -0.002
1 11022.653 19.0 2.67 -0.161 7.98 -6.140 4.871 0.002,
24.0: wavelength ID EP logGF EWin logRWin abund delavg
0 11015.53 24.0 3.449 -0.429 43.10 -5.408 5.044 0.002
1 11044.61 24.0 3.011 -1.930 5.74 -6.284 5.040 -0.002,
26.0: wavelength ID EP logGF EWin logRWin abund delavg
0 11013.235 26.0 4.795 -1.383 35.22 -5.495 7.129 -0.076
1 11026.788 26.0 3.943 -2.805 11.92 -5.966 7.046 -0.159
2 11045.599 26.0 5.587 -0.624 35.73 -5.490 7.242 0.037
3 11057.772 26.0 4.835 -1.967 11.55 -5.981 7.171 -0.033
4 11069.374 26.0 6.222 -1.055 5.06 -6.340 7.359 0.154
5 11081.595 26.0 5.643 -1.419 7.37 -6.177 7.282 0.077,
28.0: wavelength ID EP logGF EWin logRWin abund delavg
0 11088.584 28.0 4.165 -1.512 16.36 -5.831 6.009 0.0}
blends: force-fitting abundances to match blended-line equivalent widths¶
Blends driver fit the EW of a feature as a whole, only varing the abunance specified. The following example shows a fitting of Fe abundance of the feature from 10817.7 to 10818.9A, with an observed EW of 80mA.
b = pymoog.blends.blends(5000, 4.0, 0, 10817.7, 10818.9, 80, 26, line_list='vald_3000_24000')
b.prepare_file()
b.run_moog()
b.read_output()
b.blends_s_df
wavelength ID EP logGF EWin logRWin abund delavg
0 10818.275 26.0 3.96 -1.948 80.0 -5.131 7.325 0.0
cog: curve-of-growth creation for individual line¶
The cog
driver generate the curve-of-growth for individual line.
Let’s look at a Si line with following parameters (and stored in file use.list
):
wavelength id EP loggf C6 D0 EW
0 11040.405 14.0 6.2061 -1.449 -7.32 NaN 22.53
c = pymoog.cog.cog(5000, 4.0, 0, line_list=MOOG_run_path+'use.list')
c.prepare_file()
c.run_moog()
c.read_output()
Find dominant line¶
It would be useful to have a function for finding the dominant line or lines within a wavelength range.
Find single dominant line¶
pymoog.line_data.find_single_dominant_line(10818.3, 5000, 4.0, 0, 28000, line_list='vald_3000_24000', weedout_switch=True)
This function find the most dominent line in a specified wavelength.
NaN
s will be returned if no line is dominant.
Find isolated lines of an element¶
solar_spec = pd.read_csv('solar_spec.txt', sep=' ', names=['wav', 'obs_spec'])
solar_spec['obs_spec'] /= np.median(solar_spec['obs_spec'])
line_list_use = pymoog.mpfit.find_isolated_lines(5777, 4.0, 0, [[7400, 7500]], 26, 28000, solar_spec)
This function is located in mpfit
module since it requires the observed spectra.
Contribution function¶
Contribution function describes where the line forms.
From radiative transfer, we have the formal solution of intensity:
$I_\nu(0) = \int_0^{\infty} S_\nu e^{-\frac{\tau_\nu}{\mu}} \frac{d\tau_\nu}{\mu}$
The expression inside the intergral, $C_I = \frac{1}{\mu} S_\nu e^{-\frac{\tau_\nu}{\mu}}$, describe the amount of intensity emitted in a specific layer $\Delta \tau_\nu$, when the atmosphere is divided into some plane parallels. We call $C_I$ as the contribution function of intensity
However, we usually care more about where the absorption (remove of intensity) is formed instead of intensity, so we need to write the contribution function of the depression in the line core. We divide the intensity and depression of a line into following parts:
Here the black curve represents the actual spectral line, and the light blue curve represents the spectral line when no line emission presents.
$I_c$ is the emission of continuum and represents the intensity when the spectral line is absent;
$D_l^p$ is the depression of $I_c$ due to line absorption;
$I_l^c$ is the emission of continuum not absorbed by spectral line;
$I_l^p$ is the emission of spectral line;
$D_l = D_l^p - I_l^p$ is the amount of observed absorption;
$I_l = I_l^c + I_l^p$ is the amount of observed intensity.
Then we can derive their expression and contribution as follow ($\eta = \kappa_l / \kappa_c$):
expression |
contribution function |
|
---|---|---|
$I_c$ |
$\int_0^{\infty} S_\nu e^{-\frac{\tau_\nu}{\mu}} \frac{d\tau_\nu}{\mu}$ |
$S_\nu e^{-\frac{\tau_\nu}{\mu}}$ |
$D_l^p$ |
$\int_0^\infty \left[ \int_{\tau_c}^\infty S_c(\tau_c) e^{-\tau_c} d\tau_c \right] e^{-\tau_l} \eta d\tau_c$ |
$\left[ \int_{\tau_c}^\infty S_c(\tau_c) e^{-\tau_c} d\tau_c \right] e^{-\tau_l} \eta$ |
$I_l^p$ |
$\int_0^\infty S_l e^{-(\tau_c+\tau_l)} \eta d\tau_c$ |
$S_l e^{-(\tau_c+\tau_l)} \eta$ |
$D_l$ |
$\int_0^\infty \left[ \int_{\tau_c}^\infty S_c(\tau_c) e^{-\tau_c} d\tau_c - S_l(\tau_c) e^{-\tau_c} \right] e^{-\tau_l} \eta d\tau_c$ |
$\left[ \int_{\tau_c}^\infty S_c(\tau_c) e^{-\tau_c} d\tau_c - S_l(\tau_c) e^{-\tau_c} \right] e^{-\tau_l} \eta$ |
$I_l^c$ |
$\int_0^\infty S_c e^{-(\tau_c+\tau_l)} d\tau_c$ |
$S_c e^{-(\tau_c+\tau_l)}$ |
$I_l$ |
$\int_0^\infty (S_c + \eta S_l) e^{-(\tau_c+\tau_l)} d\tau_c$ |
$(S_c + \eta S_l) e^{-(\tau_c+\tau_l)}$ |
As an example, the following figure shows the three contribution function calculated by pymoog:
MPFIT¶
Under construction….
solar_spec = pd.read_csv('solar_spec.txt', sep=' ', names=['wav', 'obs_spec'])
solar_spec['obs_spec'] /= np.median(solar_spec['obs_spec'])
line_list_use = find_isolated_lines(5777, 4.0, 0, [[7400, 7500]], 26, 28000, solar_spec)
line_wav = line_list_use.loc[3, 'wavelength']
del_wav = 20 / 3e5 * line_wav
wav_part = solar_spec.loc[np.abs(solar_spec['wav'] - line_wav) <= del_wav, 'wav'].values
flux_part = solar_spec.loc[np.abs(solar_spec['wav'] - line_wav) <= del_wav, 'obs_spec'].values
pymoog.mpfit.mpfit_main(wav_part, flux_part, 2, 0.4, 0, 0, {}, ['vbroad', 'm_h', 'rv'], 5777, 4.0,
fitting_boundary={'m_h':[-0.65, 0.65]})
Miscellaneous¶
Model grid points¶
Model grid points¶
Kurucz model¶
The metallicity is from -5 to 1.0 with a step of 0.5, except in -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3.
logg grid is from 0 to 5 with a step of 0.5.
Teff grid is from 3500 to 50000 with a step of 250, 500, 1000 or 2500.
Caveats¶
See this issue.
Interpolation¶
Interpolation of the grid points are done with linear Delaunay interpolation used by ispec. The delaunay triangulation of grid points by scipy in Kurucz model is labeled by gray lines in grid point images. Note that the actual triangulation may be different from those presented in the above images, since the images only show the Delaunay triangulation in $T_\mathrm{eff}$-$\log{g}$ plane. Nevertheless, Delaunay triangulation ensure all the models within a triangle or in a gray line can be calculated by interpolation. If 3/2/1 stellar parameter are not in the grid point position, then 4/3/2 models will be used in interpolation; if all the stellar parameter are in the grid point, then no interpolation will perform.
MARCS¶
Line lists¶
Warning: the behavior of different line lists are not compared yet, so please use these line lists with caution.
pymoog
provides several line lists as follow:
GES line list (version 5.0) with hyperfine structure and isotopes:
ges_hfs_iso
(adopted from the software iSpec)This is the default line list if
line_list
is specified when initializingsynth
.No molecular line included.
GES line list (version 5.0) without hyperfine structure and isotopes:
ges_nohfs_noiso
(adopted from the software iSpec)No molecular line included.
VALD line list (February 2015) 300 to 11000 A:
vald_3000_11000
(adopted from the software iSpec)Molecular lines included.
VALD line list (February 2015) 11000 to 24000 A:
vald_11000_24000
(adopted from the software iSpec)Molecular lines included.
Meléndez & Barby line list in J-band:
mb99_j
(adopted from Meléndez & Barbuy 1999)No molecular line included.
Meléndez & Barby line list in K-band:
mb99_k
(adopted from Meléndez & Barbuy 1999)No molecular line included.
Kurucz line list:
kurucz
(adopted from Kurucz website)gfall08oct17.dat, modified in 2017.10.08 with hyperfine structure.
No molecular line included.
A shorter linelist
kurucz_winered
covering 9100-13540A is available.
APOGEE line list:
apogee
(adopted from Shetrone et al. 2015)Molecular lines included.
MOOG seems cannot work with lines having excitation potential larger than 50 eV, so they are removed from the original line lists.
The following figure shows the wavelength coverage of each line list.
Keywords¶
freeform¶
indicates whether or not the linelist will be read in under format control (7e10.3) or will be free-form. If freeform = 0, the default value, then the old-style formatted input will be used; If freeform = 1, unformatted read will be used, BUT the user must then give values for all quantities (that is, explicit zeros will need to be put instead of blank spaces.
RUN¶
signals that there are either multiple syntheses being done or multiple comparisons with observed spectra.
standard_out¶
controls the name of the verbose standard output.
summary_out¶
controls the name of either the EW summary or the raw synthesis output.
hardpost_out¶
controls the name of a postscript plot output.
speccomp_out¶
controls the name of a text file containing the comparisons (wavelength shifts, sigmas, etc.) between observed and synthetic spectra
bin_raw_out¶
controls the name of a file containing the raw synthesis of a spectroscopic binary, with an appropriate velocity difference and luminosity ratio dialed in
bin_smo_out¶
controls the name of a file containing the smoothed synthesis of a spectroscopic binary
summary_in¶
controls the name of the raw synthesis file, created previously, that will be read in for plotting purposes
smoothed_out¶
controls the name of the smoothed synthesis output
keeplines_out¶
controls the name of the list of kept lines for future synthetic spectrum runs
tosslines_out¶
controls the name of the list of discarded lines that are too weak to keep in future synthetic spectrum runs
iraf_out¶
controls the name of the optional IRAF output
model_in¶
controls the name of input model atmosphere file
lines_in¶
controls the name of the input line list
stronglines_in¶
controls the name of the input strong line list
observed_in¶
controls the name of the input observed spectrum
table_in¶
controls the name of the extra input instruction file
table_out¶
controls the name of the extra input instruction file
popsyn_out¶
controls the name of the extra input instruction file
rawbin_out¶
controls the name of the input observed spectrum
smoobin_out¶
controls the name of the input observed spectrum
atmosphere¶
controls the output of atmosphere quantities:
0 = do not print out the atmosphere
1 = print out the standard things about an atmsophere
2 = print standard things and additional stuff like continuous opacities, etc.
molecules¶
controls the molecular equilibrium calculations:
0 = do not do molecular equilibrium
1 = do molecular equilibrium but do not print results
2 = do molecular equilibrium and print results
molset¶
controls the choice of which set of molecules will be used in molecular equilibrium calculations.
1 = the small set involving H, C, N, O, Mg, Ti (DEFAULT)
2 = the large set more useful for very cool stars
deviations¶
controls whether, for synthetic spectrum computations, an ‘obs-comp plot will be made in addition to the normal spectrum plot
0 = do not plot the obs-comp plot
1 = plot the obs-comp plot
lines¶
controls the output of line data
0 = print out nothing about the input lines
1 = print out standard information about the input line list
2 = gory line data print (usually for diagnostic purposes)
gfstyle¶
controls the output of line data
0 = base-10 logarithms of the gf values (DEFAULT)
1 = straight gf values
contnorm¶
allows multiplicative adjustment of the continuum; useful probably only for batch syntheses the numbers employed should be around 1.0; default is 1.000000.
plotpars¶
allows you to set all of the plotting parameters if you know them in advance:
0 = none set (default); user can change in plotting routine
1 = given in following lines as follows
xlow xhi ylo yhi
vshift lamshift obsadd obsmult
smooth-type FWHM-Gauss vsini L.D.C. FWHM-Macro FWHM-Loren
trudamp¶
should moog use the detailed line damping for those transitions that have information stored in subroutine trudamp? (Default is no)
veladjust¶
shoud moog try to do a cross-correlation between observed and synthetic spectra and use that to align the spectra better in wavelength (Default is no)
units¶
controls the units in which moog outputs the final spectrum:
0 = angs
1 = microns
2 = 1/cm
iraf¶
allows the user to output a raw spectrum in a form suitable for IRAF’s rtext input command
0 = don’t do this, make output the normal way.
1 = make an IRAF-compatible output
scat¶
allows the user to employ a source function which has both scattering and absorption components
0 = NO scattering
1 = scattering
flux/int¶
choses integrated flux or central intensity
0 = integrated flux calculations
1 = central intensity calculations
damping¶
here are the calculations to set up the damping; dampingopt is the damping parameter, and dampnum is the damping value read from the line list. For atomic lines there are several options:
dampingopt = 0 and dampnum < 0 —> gammav = 10^{dampnum(i)}(T/10000K)^0.3n_HI
dampingopt = 0 and dampnum = 0 —> c6 = Unsold formula
dampingopt = 0 and dampnum > 10^(-10) —> c6 = (Unsold formula)*dampnum(i)
dampingopt = 0 and dampnum(i) < 10^(-10) —> c6 = dampnum(i)
dampingopt = 1 —> gammav = gamma_Barklem if possible, otherwise use dampingopt=0 options
dampingopt = 2 —> c6 = c6_Blackwell-group
dampingopt = 3 and dampnum <= 10^(-10) —> c6 = c6_NEXTGEN for H I, He I, H2
dampingopt = 3 and dampnum > 10^(-10) —> c6 = (c6_NEXTGEN for H I, He I, H2)*dampnum For molecular lines (lacking a better idea) —> c6 done as in dampingopt = 0
obspectrum¶
controls the file type of the observed spectrum
0 = no observed spectrum is to be input
1 = read a true FITS file with internal read statements
-1 = as if obspectrum = 1, but on a byte-swapping machine
2 = (not implemented yet)
3 = read a true Fits file with the FITSIO package
4 = (not implemented yet)
5 = read a special MONGO style (wavelength, flux pair) file
histogram¶
makes histogram plots of observed spectra if histoyes = 1
terminal¶
gives the sm plotting window type smterm = a character string of the sm window type (see the appropriate sm manual for a list)
plot¶
decides whether or not to make a plot of results c 0 = do not make a plot c For syntheses: 1 = plot only synthetic spectra c 2 = plot synthetic and observed spectra c 3 = smooth the syntheses but don’t plot c For line analyses: # = the minimum number of lines of a c species necessary to trigger a plot c For curves-of-growth: 1 = make plots c For flux curves: 1 = make plots
abundances¶
gives the changes to be applied to the abundances c # = the number of different syntheses to run c (the next line gives the different abundance factors c to use) c minimum error check: numatomsyn must equal numisosyn or code will stop
isotopes¶
gives the isotopes used in the line list and their abundance relative to the parent spiecies. minimum error check: numatomsyn must equal numisosyn or code will stop
lumratio¶
gives the ratio of the luminosity of two stars at a specific wavelength in a binary star system (used only with driver “binary”)
deltaradvel¶
gives the velocity difference between the stars binary star system (used only with driver “binary”)
synlimits¶
gives the wavelength parameters for syntheses; start and sstop are beginning and ending wavelengths, step is the step size in the syntheses, and delta is the wavelength range to either side of a synthesis point to consider for line opacity calculations
fluxlimits¶
gives the wavelength parameters for flux curves; start and sstop are beginning and ending wavelengths, and step is the step size in the flux curve
blenlimits¶
gives the parameters for blended line abundance matches. delwave is the wavelength offset to the blue of first and to the red of the last line in the blend to extend the syntheses; step is the wavelength step size in the computations; cogatom is the name of the element whose abundance should be varied to achieve an EW match with observations.
coglimits¶
gives the log(W/lambda) limits for curves-of-growth rwlow and rwhigh are the beginning and ending points of the log(red.width) values, rwstep is the step in log(red.width), cogatom is the declaration of which element will have its abundance varied (necessary only for spectrum synthesis curves-of-growth, and wavestep is a forced (if desired) step size in wavelength along the line (this applies to single line computations only
limits¶
old limits format…tell the user to change the keyword and quit.
strong¶
for lines which are to be considered for all of the synthesis
opacit¶
which takes the continuus opacity and scales it with the form of kaplam(i)= kaplam(i)((factor10000)/t(i)) in Opacit.f after it calulates the normal kaplam if value is <= 0 then it does not do it.