import matplotlib.pyplot as plt
from specreduce.calibration_data import load_MAST_calspec

spec = load_MAST_calspec("agk_81d266_stisnic_007.fits")

fig, ax = plt.subplots()
ax.step(spec.spectral_axis, spec.flux, where="mid")
ax.set_yscale('log')
ax.set_xlabel(f"Wavelength ({spec.spectral_axis.unit})")
ax.set_ylabel(f"Flux ({spec.flux.unit})")
ax.set_title("AGK+81 266")
fig.show()