You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import numpy as np
import Starfish
from Starfish.grid_tools import PHOENIXGridInterfaceNoAlpha
grid = PHOENIXGridInterfaceNoAlpha(wl_range=[900, 50000], air=False)
wl = grid.wl
print("Air is {}: Maximum change in wavelength {:.3f} AA".format(False, np.max(np.diff(wl))))
print("Air is {}: Minimum change in wavelength {:.3f} AA".format(False, np.min(np.diff(wl))))
print()
grid = PHOENIXGridInterfaceNoAlpha(wl_range=[900, 50000], air=True)
wl = grid.wl
print("Air is {}: Maximum change in wavelength {:.3f} AA".format(True, np.max(np.diff(wl))))
print("Air is {}: Minimum change in wavelength {:.3f} AA".format(True, np.min(np.diff(wl))))
Output
Air is False: Maximum change in wavelength 0.225 AA
Air is False: Minimum change in wavelength 0.006 AA
Air is True: Maximum change in wavelength 743.863 AA
Air is True: Minimum change in wavelength -1293.716 AA
Obviously, the wavelength grid should be monotonic. I'm not really sure what's causing this, but it seems to be related to applying the vacuum_to_air method to a larger range of wavelengths than just the optical.
The text was updated successfully, but these errors were encountered:
It seems like there's a resonance feature that reorders the wavelengths at one index location:
Not sure how to handle this, though these are exceptionally short wavelengths, so it's unlikely that you have data there. Still it's problematic if you're trying to integrate the function or something.
Ah, your plot makes the issue clearer. I think the problem is that the vacuum to air conversion we are using is not valid outside of optical wavelengths.
The Ciddor 1996 formula used is valid for the wavelength range between 0.23 and 1.7μm. Found in the conclusion here as the actual paper is behind a paywall.
Steps to reproduce:
Output
Obviously, the wavelength grid should be monotonic. I'm not really sure what's causing this, but it seems to be related to applying the
vacuum_to_air
method to a larger range of wavelengths than just the optical.The text was updated successfully, but these errors were encountered: