@will-waalkes identified some deeply weird behavior. Sometimes, the first time get_phoenix_photons gets called with wavelength=, it seems not to be loading the correct resolution background library, but often it fixes itself for subsequent calls.
A small example showing this:
from chromatic import *
for i in range(2):
w = np.linspace(.7, .71, 1000)*u.micron
wamb, s_amb = get_phoenix_photons(temperature=int(3900.), wavelength = w,logg=4.4, metallicity=0.0)
wspot, s_spot = get_phoenix_photons(temperature=int(3100.), wavelength = w,logg=4.4, metallicity=0.0)
plt.plot(wspot,s_spot)
plt.plot(wamb,s_amb)
plt.show();
I think I need to go through and carefully check the web of ifs and trys that are supposed to handle the background library management.
OK, @will-waalkes , I think I fixed this bug with #183 . Please try pulling down the latest version of develop and using it. When I run the code snippet above, now the plots look like:
@will-waalkes identified some deeply weird behavior. Sometimes, the first time
get_phoenix_photons
gets called withwavelength=
, it seems not to be loading the correct resolution background library, but often it fixes itself for subsequent calls.A small example showing this:
I think I need to go through and carefully check the web of
if
s andtry
s that are supposed to handle the background library management.