OttoStruve / muler

A Python package for working with pipeline-produced spectra from IGRINS, HPF, and Keck NIRSPEC
https://muler.readthedocs.io
MIT License
15 stars 9 forks source link

How to handle the sky and LFC fiber? #10

Closed gully closed 3 years ago

gully commented 3 years ago

:building_construction: Should we treat these as meta objects or as their own Spectrum1D/HPFSpectrum instances? Or both!

gully commented 3 years ago

We could also introduce them as property/attributes to the Spectrum1D, so flux --> flux_sky or equivalent. I like the treat them as their own HPFSpectrum instances, but then put those either into meta or as accessible as an attribute:

hpf_spec = HPFSpectrum(file)

hpf_spec.flux # target flux
hpf_spec.sky.flux # sky flux
hpf_spec.lfc.flux # lfc flux

This way methods like .normalize() or .deblaze() can scale all of the other fluxes up and down, for example, or:

hpf_spec.sky_subtract() would not need to take a sky spectrum as an input.