Commit 2c87ba41 authored by Matthias Steffen's avatar Matthias Steffen
Browse files

Initial commit of ff_all.py, test_ff123.py

parents
This diff is collapsed.
import numpy as np
from ff_all import ff1, ff2, ff3
#
t_test=np.array([5000.0, 5500.0, 5900.0, 6300.0, 6500.0])
nt=t_test.size
g_test=np.array([3.5, 4.0, 4.5])
ng=g_test.size
z_test=np.array([-3.0, -2.0, -1.0, -0.5, 0.0])
nz=z_test.size
a_test=np.array([1.0, 2.0, 3.0])
na=a_test.size
#
qiso=0.042
print("qiso : {:8.3f}".format(qiso))
for it in range(nt):
Teff=t_test[it]
for ig in range(ng):
logg=g_test[ig]
for iz in range(nz):
z=z_test[iz]
for ia in range(na):
ALi=a_test[ia]
res1 =ff1( Teff, logg, z, ALi, qiso)
res2 =ff2( Teff, logg, z, ALi, qiso)
EW=np.mean(res2)
print("Teff : {:8.1f}".format(Teff), "K,",
"log g: {:8.1f},".format(logg),
"[Fe/H]: {:8.1f},".format(z),
"log EW: {:12.8f}".format(EW))
res3 =ff3( Teff, logg, z, EW, qiso)
print("Results of FFI, FFII, FFIII:")
txt1="delta_1DNLTE delta_3DNLTE"
txt2=" ALi_1DNLTE ALi_3DNLTE"
txt3="logEW_1DNLTE logEW_3DNLTE"
print(txt1,txt2,txt3)
print("{:12.8f} {:12.8f}".format(res2[0],res2[1]),
"{:12.8f} {:12.8f}".format(res1[0],res1[1]),
"{:12.8f} {:12.8f}".format(res3[0],res3[1]))
#
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment