PHOT: exposure time skewing?
spacermase wrote on Jun 09, 2010
Hello all,
I am running apphot.phot in batch mode, looking at a series of images of Iapetus. I've discovered recently, however, that the exposure time appears to be affecting the relative magnitude values generated by phot. I entered the exptime header keyword into datapar early on, and assumed that the phot algorithms compensated for exposure time, but nonetheless, the value of the magnitude definitely changes with the exposure time. Particularly, it actually *increases* with a longer exposure time, which is somewhat counter-intuitive.
Does anyone have any suggestions for what my be causing this, and how I might be able to work around it?
Thanks!
I am running apphot.phot in batch mode, looking at a series of images of Iapetus. I've discovered recently, however, that the exposure time appears to be affecting the relative magnitude values generated by phot. I entered the exptime header keyword into datapar early on, and assumed that the phot algorithms compensated for exposure time, but nonetheless, the value of the magnitude definitely changes with the exposure time. Particularly, it actually *increases* with a longer exposure time, which is somewhat counter-intuitive.
Does anyone have any suggestions for what my be causing this, and how I might be able to work around it?
Thanks!
Mike Fitzpatrick wrote on Jun 09, 2010
I was hoping your earlier post would get a reply, unfortunately I dont' have a firm answer since I'm not a photometry expert. My best guess is that there may be something going wrong in the background/sky estimation, i.e. with longer exposure times the background level is raised an so the relative flux of the target appears to decrease.
The docs links has some useful cookbooks and guides, I'd also suggest searching past forum posts for previous advice. With luck you'll get other replies with some suggestions to try. It might help if you posted a sample image and parameters in case it is something obvious.
The docs links has some useful cookbooks and guides, I'd also suggest searching past forum posts for previous advice. With luck you'll get other replies with some suggestions to try. It might help if you posted a sample image and parameters in case it is something obvious.
spacermase wrote on Jun 09, 2010
Sure!
Datapars is as follows:
PACKAGE = apphot
TASK = datapars
(scale = 1.) Image scale in units per pixel
(fwhmpsf= 5.) FWHM of the PSF in scale units
(emissio= yes) Features are positive ?
(sigma = INDEF) Standard deviation of background in counts
(datamin= INDEF) Minimum good data value
(datamax= INDEF) Maximum good data value
(noise = poisson) Noise model
(ccdread= ) CCD readout noise image header keyword
(gain = ) CCD gain image header keyword
(readnoi= 0.) CCD readout noise in electrons
(epadu = 1.) Gain in electrons per count
(exposur= EXPTIME) Exposure time image header keyword
(airmass= AIRMASS) Airmass image header keyword
(filter = FILTERS) Filter image header keyword
(obstime= TIME) Time of observation image header keyword
(itime = 1.) Exposure time
(xairmas= 1.) Airmass
(ifilter= INDEF) Filter
(otime = INDEF) Time of observation
(mode = ql)
($nargs = 0)
The images are from one of the .fits files showing the most discrepancy. Iapetus is circled in green.
[img:96d068ad13]http://i986.photobucket.com/albums/ae345/spacermase/76d2.jpg[/img:96d068ad13]
Zoom on Iapetus
[img:96d068ad13]http://i986.photobucket.com/albums/ae345/spacermase/76d.jpg[/img:96d068ad13]
Datapars is as follows:
PACKAGE = apphot
TASK = datapars
(scale = 1.) Image scale in units per pixel
(fwhmpsf= 5.) FWHM of the PSF in scale units
(emissio= yes) Features are positive ?
(sigma = INDEF) Standard deviation of background in counts
(datamin= INDEF) Minimum good data value
(datamax= INDEF) Maximum good data value
(noise = poisson) Noise model
(ccdread= ) CCD readout noise image header keyword
(gain = ) CCD gain image header keyword
(readnoi= 0.) CCD readout noise in electrons
(epadu = 1.) Gain in electrons per count
(exposur= EXPTIME) Exposure time image header keyword
(airmass= AIRMASS) Airmass image header keyword
(filter = FILTERS) Filter image header keyword
(obstime= TIME) Time of observation image header keyword
(itime = 1.) Exposure time
(xairmas= 1.) Airmass
(ifilter= INDEF) Filter
(otime = INDEF) Time of observation
(mode = ql)
($nargs = 0)
The images are from one of the .fits files showing the most discrepancy. Iapetus is circled in green.
[img:96d068ad13]http://i986.photobucket.com/albums/ae345/spacermase/76d2.jpg[/img:96d068ad13]
Zoom on Iapetus
[img:96d068ad13]http://i986.photobucket.com/albums/ae345/spacermase/76d.jpg[/img:96d068ad13]
Francisco Valdes wrote on Jun 09, 2010
The fact that the magnitude increases with longer exposures is a good thing since I think that tells you the exposure time IS being taken into account. :roll:
In seeing the images it strikes me that you are working in a challenging regime with lots of stray light. I suspect this is the source of the the behavior. I would suggest you try to use smaller apertures.
Frank Valdes
In seeing the images it strikes me that you are working in a challenging regime with lots of stray light. I suspect this is the source of the the behavior. I would suggest you try to use smaller apertures.
Frank Valdes
Don Schumacher, Jr. wrote on Jun 09, 2010
Given what the IRAF help files say on the output of the phot task and the parameter set for datapars the magnitudes should be compensated for exposure time by default.
Here is an excerpt from the phot task help page:
[size=9:f21f4d4f49]Rapert, sum, area, and flux are the radius of the aperture in scale units, the total number of counts including sky in the aperture, the area of the aperture in square pixels, and the total number of counts excluding sky in the aperture. Mag and merr are the magnitude and error in the magnitude in the aperture (see below).
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)[/size:f21f4d4f49]
Notice how the calculation for the magnitudes depends on the zmag, flux, and itime (or exposure header keyword if defined). Since flux is just adding up all the counts the time has to be compensated for in the 3rd term. So as you increased exposure time flux would increase and itime would increase, but the flux term lowers mag while the itime term increases mag thus cancelling out the effect of different exposure times.
From the datapars parameter help page:
[size=9:f21f4d4f49]The magnitudes are normalized to an exposure time of 1 timeunit using the value of the exposure time in the image header parameter exposure or itime. If exposure is undefined or not present in the image header the value of itime is used. Itime can be in arbitrary units. Setting either exposure or itime will simplify future analysis steps.[/size:f21f4d4f49]
So based on this information if you had your header parameter for "exposure=" indeed set right then it should override the "itime=" and be giving you correct magnitudes normalized in time- ie if the object was at constant brightness then it would have the same mag independent of exposure time. However, if it was wrong then it defaults to "itime=1" which would make IRAF think all your exposures were already at 1 second when in reality they are not.
Then again if that were the case then increasing exposure would give smaller magnitude values (ie brighter magnitudes)...
Here is an excerpt from the phot task help page:
[size=9:f21f4d4f49]Rapert, sum, area, and flux are the radius of the aperture in scale units, the total number of counts including sky in the aperture, the area of the aperture in square pixels, and the total number of counts excluding sky in the aperture. Mag and merr are the magnitude and error in the magnitude in the aperture (see below).
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)[/size:f21f4d4f49]
Notice how the calculation for the magnitudes depends on the zmag, flux, and itime (or exposure header keyword if defined). Since flux is just adding up all the counts the time has to be compensated for in the 3rd term. So as you increased exposure time flux would increase and itime would increase, but the flux term lowers mag while the itime term increases mag thus cancelling out the effect of different exposure times.
From the datapars parameter help page:
[size=9:f21f4d4f49]The magnitudes are normalized to an exposure time of 1 timeunit using the value of the exposure time in the image header parameter exposure or itime. If exposure is undefined or not present in the image header the value of itime is used. Itime can be in arbitrary units. Setting either exposure or itime will simplify future analysis steps.[/size:f21f4d4f49]
So based on this information if you had your header parameter for "exposure=" indeed set right then it should override the "itime=" and be giving you correct magnitudes normalized in time- ie if the object was at constant brightness then it would have the same mag independent of exposure time. However, if it was wrong then it defaults to "itime=1" which would make IRAF think all your exposures were already at 1 second when in reality they are not.
Then again if that were the case then increasing exposure would give smaller magnitude values (ie brighter magnitudes)...
Last post on Jun 09, 2010