In [1]:
%matplotlib
import matplotlib.pyplot as plt
import numpy as np
from StellarSpectra.spectrum import DataSpectrum
from StellarSpectra.grid_tools import TRES
from grid_accuracy import AccuracyComparison
from IPython.display import display
In [2]:
myDataSpectrum = DataSpectrum.open("../../data/WASP14/WASP14-2009-06-14.hdf5", orders=np.array([22]))
myInstrument = TRES()
In [3]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_F.hdf5",
"../../libraries/PHOENIX_TRES_F.hdf5",
{"temp":6000, "logg":4.5, "Z":-0.5}, {"temp":10, "logg":0.05, "Z": 0.05})
fig = myComp.plot_quality()
display(fig)
In [4]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_F.hdf5",
"../../libraries/PHOENIX_TRES_F.hdf5",
{"temp":6050, "logg":4.75, "Z":-0.25}, {"temp":10, "logg":0.05, "Z": 0.05})
fig = myComp.plot_quality()
display(fig)
In [15]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_submaster.hdf5",
"../../libraries/PHOENIX_TRES_6000.hdf5",
{"temp":6000, "logg":4.5, "Z":-0.5}, {"temp":5, "logg":0.025, "Z": 0.025})
fig = myComp.plot_quality()
display(fig)
In [16]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_submaster.hdf5",
"../../libraries/PHOENIX_TRES_6000.hdf5",
{"temp":6000, "logg":4.5, "Z":-0.5}, {"temp":1, "logg":0.01, "Z": 0.01})
fig = myComp.plot_quality()
display(fig)
In [13]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_LkCa15.hdf5",
"../../libraries/PHOENIX_TRES_4000.hdf5",
{"temp":4000, "logg":4.0, "Z":-0.5}, {"temp":10, "logg":0.05, "Z": 0.05})
fig = myComp.plot_quality()
display(fig)
In [17]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_LkCa15.hdf5",
"../../libraries/PHOENIX_TRES_4000.hdf5",
{"temp":4000, "logg":4.0, "Z":-0.5}, {"temp":5, "logg":0.025, "Z": 0.025})
fig = myComp.plot_quality()
display(fig)
Measured in order 23
It seems like at this stage, with the Mg b lines, that metallicity contributes to the greatest change in the spectrum.
So this is interesting, a 1.5% change in flux level corresponds to a 0.05 dex change in metallicity.
Measured in order 23
In [14]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_M.hdf5",
"../../libraries/PHOENIX_TRES_2300.hdf5",
{"temp":2300, "logg":4.0, "Z":-0.5}, {"temp":10, "logg":0.05, "Z": 0.05})
fig = myComp.plot_quality()
display(fig)
In [18]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_M.hdf5",
"../../libraries/PHOENIX_TRES_2300.hdf5",
{"temp":2300, "logg":4.0, "Z":-0.5}, {"temp":5, "logg":0.025, "Z": 0.025})
fig = myComp.plot_quality()
display(fig)
In [19]:
myComp = AccuracyComparison(myDataSpectrum, myInstrument, "../../libraries/PHOENIX_M.hdf5",
"../../libraries/PHOENIX_TRES_2300.hdf5",
{"temp":2300, "logg":4.0, "Z":-0.5}, {"temp":1, "logg":0.01, "Z": 0.01})
fig = myComp.plot_quality()
display(fig)
Measured in order 23
Measured in order 41
The previous difference spectra were determined using our most accurate implementation of the spectrum modifier yet, that means using the full-resolution PHOENIX grids and k=5 polynomials, such that the spectra are accurate to within floating point precision. Since we have interpolated near a grid point, this also means that any linear approximation to the spline interpolation should be accurate enough.
To test any new approximate scheme for generating spectra, we want to see whether the residual spectrum will be bounded by the smallest spectrum in the {temp, logg, Z} trio, meaning that any error in the approximation will at most contribute to 10% error in any of {temp, logg, Z}. We can increase this threshold if it makes sense.
In [ ]: