Try out the interpolator and see if the error spectra make sense
In [1]:
%load_ext autoreload
%autoreload 2
In [5]:
import matplotlib.pyplot as plt
import numpy as np
from StellarSpectra.grid_tools import HDF5Interface, Interpolator
import StellarSpectra.constants as C
from StellarSpectra.spectrum import DataSpectrum
from StellarSpectra.utils import saveall
In [6]:
#interface = HDF5Interface("../libraries/PHOENIX_F.hdf5")
interface = HDF5Interface("../libraries/PHOENIX_TRES_F.hdf5")
dataspec = DataSpectrum.open("../data/WASP14/WASP14-2009-06-14.hdf5", orders=np.array([22]))
interpolator = Interpolator(interface, dataspec, trilinear=True)
In [10]:
params = {"temp":6150, "logg":4.29, "Z":-0.4}
fl, errspec = interpolator(params)
In [27]:
wl = interpolator.wl
ind = (wl > 5160) & (wl < 5164)
wl_raw = wl[ind]
In [28]:
for spec in errspec:
plt.plot(wl_raw, spec[ind])
plt.show()
In [ ]: