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

Feedback from user testing with @astrocaroline #17

Open gully opened 3 years ago

gully commented 3 years ago

Today we conducted valuable user testing with @astrocaroline. Key insights:

HPFSpectrum(file) Does not work out of the box: file is a kwarg and not just an arg. I think that choice is baked-in by Spectrum1D accepting Spectrum1D(wavelength, flux, error), but that use case is extremely rare for our custom HPFSpectrum, and would indeed break most of our methods that assume certain metadata from the get-go. I propose we:

HPFSpectrum(file=file, order=???) we currently default to order=19, to ensure that we reutrn back a single echelle order. We have intentionally made the single order the default pattern for most applications. Eventually, we should consider support for stitching orders. But then the spectra become too bulky to plot at full native resolution. We may one day want to support a scenario where the user passes order='all' or order=[1,2,5], we return a SpectrumList object (which we already support), and then the user can stitch the orders together.

Or maybe we state that HPF spectrum defaults to returning a SpectrumList (aka order='all'), but then the common usage pattern is: spec.get_order(10).normalize().... That's great because we can implement a method .get_order(wavelength=1.0830*u.micron) that fetches the single order of interest. I like this idea the most.

Finally, we found that the order of operations matters, which we knew, but that such ordering should be explained better or maybe trigger a warning? For example deblazing caused problems when it was not previously normalized.