View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Error calculated by phot

fsidoli wrote on Oct 19, 2007

Hi,

I'm not sure I understand how the errors phot reports are calculated.
The following is given in the help pages, but I do not see how "error" is
derived from "flux". Could you enlighten me? Or do you know of anyone who
can?

flux = sum - area * msky
mag = zmag - 2.5 * log10 (flux) + 2.5 * log10 (itime)
merr = 1.0857 * error / flux
error = sqrt (flux / epadu + area * stdev**2 +
area**2 * stdev**2 / nsky)

Many thanks,
Fabrizio
Post generated using Mail2Forum (http://www.mail2forum.com)

Francisco Valdes wrote on Oct 19, 2007

The error is based on a model of the noise in a digital image. The model is that uncertainty comes from the Poisson statistics of the detected electrons/photons and a constant noise at the sky level.

The term flux/epadu is the conversion of the background subtracted signal to something representing individual photons. The Poisson variance is just then number. Note that epadu is intended to represent the conversion for the image pixel digital units to photons. For a CCD, assuming processing has not affect the levels significantly, epadu is like the detector gain. But it is basically a model parameter which you have to set appropriately for the data given your knowledge of the digital data units.

The next term is the contribution of the error due to the background in the aperture. And the last term is the uncertainty in the estimate of the sky subtracted to compute the flux.

So the error is an formal estimate based on a Poisson detection model.

I hope this help.

Frank Valdes

jofabbri wrote on Oct 19, 2007

Hi,

Am I correct in understanding that the units of flux that PHOT expects is counts (ADU?) and that the gain is in units of electrons per ADU?

I'm having trouble reconciling your comment that the FLUX/EPADU is essentially a measure of individual photons, since surely that would be defined by FLUX * EPADU, if the flux is in units of ADU?

Many thanks,
Jo

Francisco Valdes wrote on Oct 19, 2007

Hi Jo,

Sorry for not replying sooner.

Since a user can modify the image values externally task generally rely on the user providing the parameters to take the image values and convert them to electrons (assumed to be the same as detected photons for CCDs). You can think of the image values as "ADU" and the gain parameter as the number to multiple the image values by to get detected photons/electrons.

I am probably confusing you... The gain is the number you multiply your pixel values to get electrons. This is usually the CCD detector gain expressed in electrons per adu. In this case phot is expecting data in adu and it uses the gain parameter as you said "FLUX * EPADU" for the Poisson statistics.

I hope I am answering your question.

Yours,
Frank

bwp wrote on Oct 19, 2007

Does the error calculation take account of the number of images used to obtain a final image for phot? If I combine median combine 3 exposures, does IRAF reduce the error estimate that it gives me, or do I need to apply this correction myself?

Francisco Valdes wrote on Oct 19, 2007

Hi,

I don't believe the code makes use of any information from the combining. So you will have to manually adjust the noise parameters used by the task by the appropriate factors. While an average would typically be a square root of N type of correction for a median it is less clear. For a median of 3 I would expect the noise to be similar to a single exposure but with cosmic rays and other deviant values eliminated.

Yours,
Frank Valdes

CavasRNC wrote on Oct 19, 2007

Anyone who is interested in reading more on how to estimate the signal-to-noise ratios (SNRs) and the uncertainties in digital photometry can take a look at :

http://www.phys.vt.edu/~jhs/phys3154/snr20040108.pdf

http://adsabs.harvard.edu/abs/1991PASP..103..122N

The IRAF equation for error estimation is an approximation for SNR>>1. If someone doesn't trust that this is valid for all their data, it is better to manually calculate the errors using the SNR (see the first link for a brief explanation and the equations).

Nicolas

Don Schumacher, Jr. wrote on Oct 19, 2007

[size=9:c2cdf63fa2]
valdes

Hi,

I don't believe the code makes use of any information from the combining. So you will have to manually adjust the noise parameters used by the task by the appropriate factors.

Yours,
Frank Valdes
[/size:c2cdf63fa2]

Well if you average or median combined several images together isn't it essentially lowering the background sky stdev and improving the signal of the star? In that case wouldn't you just find new values for "FWHM=" and "sigma=" for your new 'better' combined image? That should take into account that you improved the image and as long as you inform phot of that upfront it would go into effect in the calculated mag_error.

*Opps, I just reread what you said and I think we are saying the same thing now...

Last post on Oct 19, 2007