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

Simplify combined_spectrum_misaligned with bin_edges attribute #74

Closed gully closed 2 years ago

gully commented 2 years ago

Specutils has a "bin_edges" attribute--- awesome! We should use it:

spec.spectral_axis.bin_edges.value

This attribute will simplify our combine_spectrum_misaligned method.

gully commented 2 years ago

Hmm, the bin_edges are not consistently preserved in muler, probably because we reset the wcs each time we change the pixel centers--- there's no way for that information to be preserved. We could modify our boolean_masking to somehow preserve the bin_edges. See this figure--- the red dots should have single pixel-wide green bars around them. Instead they consume adjacent masked pixels.

Screenshot from 2021-12-07 13-26-57