Inaccuracy tests with TRES

Basically, how bad of an approximation can we do to the interpolation and still get away with 10% accuracy to the grid points? 10K, 0.05 dex in logg and [Fe/H] ?

As a comparison we need a high quality spectrum generated using our normal interpolation methods.


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


Using matplotlib backend: Qt4Agg

TRES Spectra


In [2]:
myDataSpectrum = DataSpectrum.open("../../data/WASP14/WASP14-2009-06-14.hdf5", orders=np.array([22]))
myInstrument = TRES()

Perturbations about T=6000, logg=4.5, Z = -0.5


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)


Bounds of the grids are
HA {'alpha': (0.0, 0.0), 'temp': (5000, 7000), 'Z': (-1.0, 0.5), 'logg': (2.5, 5.5)}
LA {'alpha': (0.0, 0.0), 'temp': (5000, 6700), 'Z': (-1.0, 0.5), 'logg': (2.5, 5.0)}
Determine Chunk Log: Wl is 8192
Creating OrderModel 0
Wl is 11098
Grid stretches from 5134.978696599707 to 5235.9293774845055
wl_FFT is 0.0480588375883031 km/s
Creating OrderModel 0

Away from a grid point


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)


Bounds of the grids are
HA {'alpha': (0.0, 0.0), 'temp': (5000, 7000), 'Z': (-1.0, 0.5), 'logg': (2.5, 5.5)}
LA {'alpha': (0.0, 0.0), 'temp': (5000, 6700), 'Z': (-1.0, 0.5), 'logg': (2.5, 5.0)}
Determine Chunk Log: Wl is 8192
Creating OrderModel 0
Wl is 11098
Grid stretches from 5134.978696599707 to 5235.9293774845055
wl_FFT is 0.0480588375883031 km/s
Creating OrderModel 0
Deallocating Covariance Matrix
Deallocating GlobalCovarianceMatrix
Deallocating Common
Deallocating Covariance Matrix
Deallocating GlobalCovarianceMatrix
Deallocating Common

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)


Bounds of the grids are
HA {'logg': (3.5, 5.5), 'temp': (5000, 7000), 'Z': (-1.0, 0.0), 'alpha': (0.0, 0.40000000000000002)}
LA {'logg': (4.0, 5.0), 'temp': (5900, 6100), 'Z': (-1.0, 0.0), 'alpha': (0.0, 0.0)}
ss is len 2755
Creating OrderModel 0
Grid stretches from 5134.978696599707 to 5235.9293774845055
wl_FFT is 0.0480588375883031 km/s
Creating OrderModel 0
interpolated fl is len 5509
Deallocating Covariance Matrix
Deallocating GlobalCovarianceMatrix
Deallocating Common
Deallocating Covariance Matrix
Deallocating GlobalCovarianceMatrix
Deallocating Common

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)


Bounds of the grids are
HA {'logg': (3.5, 5.5), 'temp': (5000, 7000), 'Z': (-1.0, 0.0), 'alpha': (0.0, 0.40000000000000002)}
LA {'logg': (4.0, 5.0), 'temp': (5900, 6100), 'Z': (-1.0, 0.0), 'alpha': (0.0, 0.0)}
ss is len 2755
Creating OrderModel 0
Grid stretches from 5134.978696599707 to 5235.9293774845055
wl_FFT is 0.0480588375883031 km/s
Creating OrderModel 0
interpolated fl is len 5509
Deallocating Covariance Matrix
Deallocating GlobalCovarianceMatrix
Deallocating Common
Deallocating Covariance Matrix
Deallocating GlobalCovarianceMatrix
Deallocating Common