-
-
Notifications
You must be signed in to change notification settings - Fork 132
Description
The equivalent_width function already in specutils only accepts a spectrum, with no keywords to "cut out" parts of an existing spectrum. I think that's a feature not a bug, and flux should be done the same way... we need to implement easy ways to do "cut outs", but we should do that instead of baking it into the analysis functions.
That said, one thing that is useful for both fluxes and (to some extent) equivalent width measurements, is to be able to specify passbands on either sides of a line, which are then fit as a continuum (usually linear, but possibly constant or possibly something like a higher degree polynomial) and then the measurement is done on the line either continuum-sutracted or continuum-normalized. That "pre-operation" of taking a larger spectrum, fitting a continuum, subtracting/dividing by it, and then cutting out just the "line" part, should be provided as a high-level convenience function. It should use the same continuum-fitting machinery we will need for full-spectrum (and single line) fitting, but should be available as a one-liner because it's a very commonly-needed operation.