View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

how are poisson corrections calculated in reject algorithms?

Eduardo Fernandez del Peloso wrote on Jul 12, 2010

Hi everyone!

I am trying to understand how the sigclip algorithm in the noao.onedspec.scombine task works, because I am trying to implement it in C.

If I understood it correctly, it works more or less the following way:

0) Scale all spectra to a common level, setting the scale and/or the zero parameters. I prefer to use scale=median and zero=none. This means that each spectrum is divided by its own median.

1) Compute the average (or the median, if mclip=yes) of the pixels in the spectra being averaged. If there are 5 spectra being combined, for example, we compute the average/mean of 5 pixels for each wavelength.

2) Compute the sigma (= standard deviation?) for the 5 pixels, for each wavelength.

So now I have an average/median and a sigma for each pixel. If my 5 spectra have 1000 pixels each, now I have 1000 averages and 1000 sigmas.

3) Eliminate pixels that deviate from the average/median by more than a certain number of sigmas (> average + hsigma * sigma or < average - lsigma * sigma).

4) Go to step 1, unles no more pixels are eliminated or only nkeep pixels remain for each wavelength.

In short, the procedure is much like that used in eliminating pixels during a robust regression.

Now comes my problem... :-(

In the help for the task, it is said that "poisson corrections are made to the computation of a sigma for images with different scale factors".

I have no idea how this correction is calculated and applied...
Can anyone please explain me?
Or at least forward me to a reference (preferably in the Internet)?

Thank you.

Cheers,
Eduardo.

P.S.: I would like to thank you people for the help with my previous questions. This forum has been very useful to me, and I have found the community that frequents it to be rather kind and patient.

Francisco Valdes wrote on Jul 12, 2010

Hi,

I did this a long time ago and I'm not sure why this made sense at the time. What this means is that the computation of the standard deviation in your step 2 uses poisson weights computed as the reciprocal of the square root of the average scaled to the count level of each spectrum.

Frank Valdes

</u>

Last post on Jul 12, 2010