import matplotlib.pyplot as plt
from specreduce.calibration_data import AtmosphericExtinction, SUPPORTED_EXTINCTION_MODELS

fig, ax = plt.subplots(2, 1, sharex=True)
for model in SUPPORTED_EXTINCTION_MODELS:
    ext = AtmosphericExtinction(model=model)
    ax[0].plot(ext.spectral_axis, ext.extinction_mag, label=model)
    ax[1].plot(ext.spectral_axis, ext.transmission)
ax[0].legend(fancybox=True, shadow=True)
ax[1].set_xlabel("Wavelength (Angstroms)")
ax[0].set_ylabel("Extinction (mag)")
ax[1].set_ylabel("Transmission")
plt.tight_layout()
fig.show()