Welcome to iraf.net Sunday, May 19 2024 @ 06:58 PM GMT
iaa |
02/14/2011 06:57PM (Read 2836 times)
|
|
|
Status: offline
Registered: 02/14/2011
Posts: 11
|
I would need to know, when doing photometry, whether one or more pixels in the aperture are above a given threshold—say 50,000 ADUs, after which saturation is considered to have arisen. In other words, I would like to be able to test whether any of the pixels of the star, for a given aperture, are saturated.Unfortunately, after carefully going through the documentation of the qphot task, none of the output parameters seems to be of help, so I was wondering if any of you know of a workaround for this. So far I have been able to achieve this by manually inspecting the value of the pixels in the aperture, but this approach is extremely slow as each star results in a file access.In case nothing can be done, do you think that hacking the IRAF source code would be a feasible option? If you think so, is there any documentation I could refer to in order to get started?
|
|
|
|
AnTaR3s |
02/14/2011 06:57PM
|
|
|
Status: offline
Registered: 10/24/2009
Posts: 58
|
HiI could in principle think of an IRAF script which uses simply the imstat task.
You could read in your coordinate list and produce a script which probes specific regions in a predefined region.You would not be able to use circles (apertures), but you would have to rely on rectangles
Say, you have 2 stars with the coordinates (25/100) and (50/20)
the script would in its simplest appearance look like this:imstat image.fits[15:35,90:110]
imstat image.fits[40:60,10:30]this probes the region within a distance of 10 pixels to the stars. Of course, this is also accesses the images on the drive each time, but at least it would be automated. Furthermore you can think of any type of enhancement of such a script. cheers
|
|
|
|
iaa |
02/14/2011 06:57PM
|
|
|
Status: offline
Registered: 02/14/2011
Posts: 11
|
Thanks, AnTaR3s. That was, actually, what I first tried. The enhancement that followed was to code myself the 'imstat' task, using PyFITS.
In this way, the image is now loaded into memory only once, which results in a tremendous speedup.
|
|
|
|
valdes |
02/14/2011 06:57PM
|
|
|
Status: offline
Registered: 11/11/2005
Posts: 728
|
A better way would be to make a mask of the saturated values. This can be done easily with something like:[code:1:90eadea102]
imexpr "a>50000?1: 0" saturate.pl myimage
[/code:1:90eadea102](The space after the colon is needed to avoid sexigesimal intepretation). You could also output a regular image if you don't like pl format.Once you have this mask "image" you could do photometry on it and if you get a non-zero flux for a particular aperture you know it has saturation. There are probably other methods but this is the first one that occurred to me. This step is quite fast!Frank Valdes
|
|
|
|
iaa |
02/14/2011 06:57PM
|
|
|
Status: offline
Registered: 02/14/2011
Posts: 11
|
Thank you very much, Frank. This is exactly what I was looking for—even though I didn't know it.
|
|
|
|
| |
|
Content generated in: 0.08 seconds |
|