desihub / fastspecfit

Fast spectral synthesis and emission-line fitting of DESI spectra.
https://fastspecfit.readthedocs.org
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Signal-to-noise ratio of narrow-line emission #124

Closed yuvoonng closed 1 year ago

yuvoonng commented 1 year ago

When FastSpecFit calculates the uncertainty of the amplitude, for spectra with narrow-line emission, it only uses a few pixels, which might lead to underestimating the uncertainty. As shown in the attached file, they do not appear as strong in the spectra as calculated. sn_amp2.pdf sn_amp.pdf

moustakas commented 1 year ago

Thank you for the ticket @yuvoonng.

Here are some notes I sent on Slack, which I'm copying for reference:

Thank you, I agree that 4 pixels is definitely not sufficient for determining the scatter in the pixels. By default, the code uses the pixels that are +/-3*sigma of the line-center and only falls back to 4 pixels when the line is very narrow. When I was developing this part of the code, I thought this choice would be sufficient and would only affect a small fraction of objects/lines, but this is obviously. pretty important for a narrow-line sample like yours.

In the meantime I have a few suggestions:

  • One, you could spin through the spectra and remeasure the scatter in the (emission-line subtracted) spectrum using a larger window (maybe 10 pixels or so would be sufficient?).
  • Second, you could investigate using a combination of S/N on the amplitude and the flux to flag actual non-detections.
  • Or, third, we could fix this in the code and then refit all the objects in your sample.
  • Your idea here!
moustakas commented 1 year ago

@yuvoonng I'd like to address this issue soon. Do you have a sense of whether 10 pixels or so is sufficient for estimating the uncertainty in the continuum level around the narrow lines you've been studying?

yuvoonng commented 1 year ago

@moustakas Upon investigation for some sources, 10 pixels are sufficient to estimate the signal-to-noise ratio. Thank you.

moustakas commented 1 year ago

Addressed in #137.