Open eteq opened 6 years ago
@eteq can you expand on how this might be implemented? If we have a spectrum like
spec = Spectrum1D(flux=[10, 5, 3, 7] * u.Jy,
spectral_aixs=[1, 2, 3, 4] * u.um)
and want the flux between 2.5 u.um
and 3.25 um
, would we interpolate onto a finer grid before doing the summation?
This issue builds off of discussions in #235, #314, and #324.
To summarize: #324 implemented a "quick and dirty" way of doing line flux measurements - basically it only considers whole-pixels. The "right" way is to also include the fractions of pixels that are on the edges. For a more in-depth discussion of this with math and everything see https://github.com/astropy/specutils/issues/314#issuecomment-421109230 .
This issue is to improve the
line_flux
function to account for the fractional edge pixel. I think the linked comment above lays that out reasonably thoroughly, but if more clarification is needed/changes proposed, we can hash it out in this issue.By reference this will also affect
equivalent_width
,SNR
, etc., I think which is a good thing.