1
$\begingroup$

I want to calculate the S/N of an galaxy absorption spectrum. enter image description here

I therefore chose a part of the spectrum which contains very little to none absorption features and should be only made up of noise and the continuum flux (see the region in next plot).enter image description here.

I then fitted a 4th degree polynomial to that data using np.polyfit(). enter image description here

If I understand the situation correctly the signal should be the fitted polynomial, since this is the spectral continuum in this region. And the noise would correspond to the deviations from that continuum (blue curve in plot). Then I would calculate the S/N = polynom / flux. Is this the right approach ? And how do I get only one value for the S/N since just dividing the polynom by the flux will give me a S/N value for each pixel. Maybe I mixed something up but I can not get my head arround it. I am grateful for any tips.

$\endgroup$

1 Answer 1

1
$\begingroup$

The average signal-to-noise would be the average level of the spectrum signal divided by the RMS difference of the fit to the polynomial. i.e. You want $${\rm RMS} = \left(\frac{1}{N}\sum_i^{N} (y_p - y_i)^2 \right)^{1/2} \ , $$ where $y_i$ are the pixel data values and $y_p$ is the polynomial model value at that pixel.

The signal-to-noise ratio of a spectrum is in general wavelength-dependent. The way you have done this could give you a wavelength-dependent value if you split the spectrum into smaller pieces and fit a polynomial to the continuum of each piece.

You cannot get a pixel-by-pixel value using this method, since the RMS is not well-defined for single pixels (or even for a few pixels). For that you should have propagated the uncertainty of each pixel during all the spectrum extraction steps.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .