README.md 3.07 KB
Newer Older
Matthias Steffen's avatar
Matthias Steffen committed
1
**Python 3 and IDL scripts for evaluating fitting functions FFI, FFII, and FFII**
Matthias Steffen's avatar
Matthias Steffen committed
2 3 4
developed in the paper

**Improving spectroscopic lithium abundances. Fitting functions for 3D non-LTE corrections in FGK stars of different metallicity**
Matthias Steffen's avatar
Matthias Steffen committed
5
by A. Mott et al. (2020, Astronomy & Astrophysics 638, A58, https://ui.adsabs.harvard.edu/link_gateway/2020A%26A...638A..58M/PUB_PDF)
Matthias Steffen's avatar
Matthias Steffen committed
6

Matthias Steffen's avatar
Matthias Steffen committed
7
The three python functions are defined in `ff_all.py`, the IDL functions in `ff1.pro`, `ff2.pro`, `ff3.pro`.
Matthias Steffen's avatar
Matthias Steffen committed
8
They are called in the example script `test_ff123.py` (`test_ff123.pro`) that produces the output file `test_ff123_py.out` (`test_ff123_idl.out`)
Matthias Steffen's avatar
Matthias Steffen committed
9
(see description of the contents of the output file below)
Matthias Steffen's avatar
Matthias Steffen committed
10

Matthias Steffen's avatar
Matthias Steffen committed
11
With Teff = effective temperature, log g = surface gravity, Z = metallicity [Fe/H], qiso = lithium isotopic ratio 6Li/7Li,
Matthias Steffen's avatar
Matthias Steffen committed
12
the call to evaluate fitting function **FFI** is:
Matthias Steffen's avatar
Matthias Steffen committed
13 14 15

`ff1_out=ff1(Teff,logg,Z,ALi_LTE,qiso)`

Matthias Steffen's avatar
Matthias Steffen committed
16
where ff1_out is a two-element array returning the (logarithmic) lithium abundance corrections
Matthias Steffen's avatar
Matthias Steffen committed
17

Matthias Steffen's avatar
Matthias Steffen committed
18 19
`ff1_out[0] = 1D_NLTE correction`
`ff1_out[1] = 3D_NLTE correction`
Matthias Steffen's avatar
Matthias Steffen committed
20

Matthias Steffen's avatar
Matthias Steffen committed
21 22
for a given LTE lithium abundance ALi_LTE

Matthias Steffen's avatar
Matthias Steffen committed
23
The call to evaluate fitting function **FFII** is:
Matthias Steffen's avatar
Matthias Steffen committed
24 25 26

`ff2_out=ff2(Teff,logg,Z,ALi,qiso)`

Matthias Steffen's avatar
Matthias Steffen committed
27
where ff2_out is a two-element array returning the (logarithmic) non-LTE equivalent widths, log_10(EW/mA)
Matthias Steffen's avatar
Matthias Steffen committed
28

Matthias Steffen's avatar
Matthias Steffen committed
29 30
`ff2_out[0] = 1D_NLTE log_10(EW/mA)`
`ff2_out[1] = 3D_NLTE log_10(EW/mA)`
Matthias Steffen's avatar
Matthias Steffen committed
31

Matthias Steffen's avatar
Matthias Steffen committed
32
for a given lithium (logarithmic) abundance ALi, where A(Li)=log_10(N(Li)/N(H)) + 12 
Matthias Steffen's avatar
Matthias Steffen committed
33

Matthias Steffen's avatar
Matthias Steffen committed
34
The call to evaluate fitting function **FFIII** is:
Matthias Steffen's avatar
Matthias Steffen committed
35 36 37

`ff3_out=ff3(Teff,logg,Z,EW,qiso)`

Matthias Steffen's avatar
Matthias Steffen committed
38
where ff3_out is a two-element array returning the (logarithmic) 1D NLTE and 3D NLTE lithium abundances
Matthias Steffen's avatar
Matthias Steffen committed
39

Matthias Steffen's avatar
Matthias Steffen committed
40
`ff3_out[0] = ALi_1DNLTE`
Matthias Steffen's avatar
Matthias Steffen committed
41 42
`ff3_out[1] = ALi_3DNLTE`

Matthias Steffen's avatar
Matthias Steffen committed
43
for a given (logarithmic) equivalent width log_10(EW/mA).
Matthias Steffen's avatar
Matthias Steffen committed
44

Matthias Steffen's avatar
Matthias Steffen committed
45
The output files produced by `test_ff123.py` and `test_ff123.pro` are identical.
Matthias Steffen's avatar
Matthias Steffen committed
46

Matthias Steffen's avatar
Matthias Steffen committed
47 48
**Contents of the output file**

Matthias Steffen's avatar
Matthias Steffen committed
49 50 51
The output file written by test_ff123.py (and test_ff123.pro) show the following results for the grid
of stellar parameters treated in the related paper:

Matthias Steffen's avatar
Matthias Steffen committed
52
**Col.(1):** A*(Li), the 1D LTE Li abundance used as input to the fitting function `FFI`
Matthias Steffen's avatar
Matthias Steffen committed
53

Matthias Steffen's avatar
Matthias Steffen committed
54
**Col.(2):** del_1, the 1D NLTE correction for given 1D LTE Li abundance A*(Li) provided by the fitting function `FFI_1DNLTE`
Matthias Steffen's avatar
Matthias Steffen committed
55 56 57

**Col.(3):** A1(Li) = A*(Li) + del_1, the 1D NLTE Li abundance for given 1D LTE Li abundance A*(Li)

Matthias Steffen's avatar
Matthias Steffen committed
58
**Col.(4):** EW1, the 1D NLTE (log) equivalent width provided by the fitting function `FFII_1DNLTE` for given 1DNLTE Li abundance A1(Li) 
Matthias Steffen's avatar
Matthias Steffen committed
59

Matthias Steffen's avatar
Matthias Steffen committed
60
**Col.(5):** A1_inv, the 1D NLTE Li abundance provided by the fitting function `FFIII_1DNLTE` for given 1D NLTE equivalent width EW1 
Matthias Steffen's avatar
Matthias Steffen committed
61

Matthias Steffen's avatar
Matthias Steffen committed
62
**Col.(6):** del_3, the 3D NLTE correction for given 1D LTE Li abundance A*(Li) provided by the fitting function `FFI_3DNLTE`
Matthias Steffen's avatar
Matthias Steffen committed
63 64 65

**Col.(7):** A3(Li) = A*(Li) + del_3, the 3D NLTE Li abundance for given 1D LTE Li abundance A*(Li)

Matthias Steffen's avatar
Matthias Steffen committed
66
**Col.(8):** EW3, the 3D NLTE (log) equivalent width provided by the fitting function `FFII_3DNLTE` for given 3D NLTE Li abundance A3(Li) 
Matthias Steffen's avatar
Matthias Steffen committed
67

Matthias Steffen's avatar
Matthias Steffen committed
68
**Col.(9):** A3_inv, the 3D NLTE Li abundance provided by the fitting function `FFIII_3DNLTE` for given 3D NLTE equivalent width EW3 
Matthias Steffen's avatar
Matthias Steffen committed
69

Matthias Steffen's avatar
Matthias Steffen committed
70

Matthias Steffen's avatar
Matthias Steffen committed
71