Hi Jamie,
When you do a gaussian fitting with IMFIT. It prints out a peak value +/- an error and a total integrated flux value with no error.
What is the error value for the total integrated flux?
Is there a way to calculate that value?
Many thanks,
Catarina
IMFIT - gaussian fitting
Moderator: Mark.Wieringa
-
- ATCA Expert
- Posts: 14
- Joined: Wed Jun 02, 2010 1:11 pm
Re: IMFIT - gaussian fitting
Technically, the uncertainty of the integral can be estimated from uncertainties of the peak and FWHM for a Gaussian. However, just thinking now about this I must say that
I am not entirely sure what integral MIRIAD reports. Is it an integral over component (or components) or measured integral over emission? I suspect the former, so it can also be
calculated analytically. The uncertainty of the true integral of emission may be systematically different from the uncertainty of the integral of the Gaussian component because
the emission may not be well approximated by the Gaussian (or sum of Gaussians).
If the imfit task output is ever going to be changed (although I must say I would have to patch a number of scripts if it happens) it would be nice to report a position ellipse rather than
ra and dec errors as these uncertainties are quite often correlated.
I am not entirely sure what integral MIRIAD reports. Is it an integral over component (or components) or measured integral over emission? I suspect the former, so it can also be
calculated analytically. The uncertainty of the true integral of emission may be systematically different from the uncertainty of the integral of the Gaussian component because
the emission may not be well approximated by the Gaussian (or sum of Gaussians).
If the imfit task output is ever going to be changed (although I must say I would have to patch a number of scripts if it happens) it would be nice to report a position ellipse rather than
ra and dec errors as these uncertainties are quite often correlated.
-
- Posts: 9
- Joined: Sun Dec 18, 2011 2:50 am
Re: IMFIT - gaussian fitting
Hi, everyone,
I am also puzzeled with this problem. I don't know how to estimate the error for this integrated flux?
I hope someone can solve this problem. Thanks!
Hui
I am also puzzeled with this problem. I don't know how to estimate the error for this integrated flux?
I hope someone can solve this problem. Thanks!
Hui
-
- ATCA Expert
- Posts: 298
- Joined: Mon Feb 08, 2010 1:37 pm
Re: IMFIT - gaussian fitting
I just had a look at the code:
tflux = flux(i) * pi/4.0 * fwhm1(i) * fwhm2(i)
if (srctype(i).eq.GAUSSIAN) tflux = tflux / log(2.0)
tflux = tflux / bvol
write(line,35) tflux
35 format(' Total integrated flux:',1pg16.4)
I.e, the total flux is calculated as the product of the fitted peak flux times the fitted component widths (and divided by the beam volume).
As a first approximation the error in the total flux t is thus: st = t*sqrt((sf/f)^2+(sma/ma)^2+(smi/mi)^2), where sf is the error in f, the peak flux, sma is the error in ma, the major axis, and smi is the error in mi, the minor axis. All this assumes the source can actually be fitted by a gaussian, there are no calibration errors/sidelobes and the image noise is gaussian. I could add this noise estimate to the output fairly easily. Changing the position error estimates into an error ellipse will require more work.
The best way to get an estimate of the actual errors is to inject some fake sources in the image (using imgen) in various places and see how they are fitted. This would still not include effects like decorrelation and absolute calibration errors.
Cheers,
Mark
tflux = flux(i) * pi/4.0 * fwhm1(i) * fwhm2(i)
if (srctype(i).eq.GAUSSIAN) tflux = tflux / log(2.0)
tflux = tflux / bvol
write(line,35) tflux
35 format(' Total integrated flux:',1pg16.4)
I.e, the total flux is calculated as the product of the fitted peak flux times the fitted component widths (and divided by the beam volume).
As a first approximation the error in the total flux t is thus: st = t*sqrt((sf/f)^2+(sma/ma)^2+(smi/mi)^2), where sf is the error in f, the peak flux, sma is the error in ma, the major axis, and smi is the error in mi, the minor axis. All this assumes the source can actually be fitted by a gaussian, there are no calibration errors/sidelobes and the image noise is gaussian. I could add this noise estimate to the output fairly easily. Changing the position error estimates into an error ellipse will require more work.
The best way to get an estimate of the actual errors is to inject some fake sources in the image (using imgen) in various places and see how they are fitted. This would still not include effects like decorrelation and absolute calibration errors.
Cheers,
Mark
-
- ATCA Expert
- Posts: 298
- Joined: Mon Feb 08, 2010 1:37 pm
Re: IMFIT - gaussian fitting
Imfit has now been updated to provide an error estimate for the total flux and an error ellipse for the position error.
I've tried to keep the formats as similar as possible so as not to confuse any scripts parsing the output, but be aware some adjustments may be needed.
Cheers,
Mark
I've tried to keep the formats as similar as possible so as not to confuse any scripts parsing the output, but be aware some adjustments may be needed.
Cheers,
Mark