Welcome to iraf.net Thursday, March 28 2024 @ 09:21 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 fractional pixels in aperture area (apphot)
   
evert
 06/03/2008 03:17PM (Read 2913 times)  
+----
Newbie

Status: offline


Registered: 01/24/2006
Posts: 8
Hi folks,I was wondering how IRAF/apphot deals with the aperture area and calculating fractional pixels. I noticed that the area of the aperture differs slightly from source to source (0.1-0.2 pixels^2). It actually appears to depend on the fractional (x,y) position in the image. Ie, if I have two sources, one at 123.123, 123.123 and one at 456.123, 456.123, the source areas are the same. If the second source, however, is at 456.456, 456.456, the source areas are slightly different.Estimating the flux, by calculating SUM-AREA*MSKY, gives the correct value whatever positions are used. That is, IRAF/apphot appears to correct for the change in area by an increase/decrease in SUM (total counts) per aperture.
This is ok for general use, but in this specific case, I'm looking at the distribution of SUM, which then goes bad, since the spread is larger (because of the varying area) than the actual spread.The obvious work-around is to keep the fractional position the same for every aperture, but it did make me wonder if there's not something I'm overlooking, and just in general how IRAF calculates the SUM (and AREA). Looks like it doesn't use an idealised circle and grid. Any reason for that, if so?Thanks for any answers/suggestions/pointers.Evert

 
Profile Email Website
 Quote
fitz
 06/03/2008 03:17PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The fractional pixel calculation is done only as an approximation. In the specifications for the package (apphot$doc/specs/apphot.spc) I found the following comments on this:[quote:398cabbdf8]
3.3.5.8. The PHOT Aperture Integration Algorithm The integral of the flux within a circular aperture is
computed by fractional pixel techniques. Pixels are assumed
to be square apertures arranged in a rectangular grid. The
fraction of a pixel which lies within the circular APPHOT
aperture is computed by an approximation, and all such con-
tributions are summed to produce the total integral. The inclusion of a partial pixel inside the aperture is
done as follows.1. If the distance of the current pixel from the center of
the star, r, is exactly equal to the radius of the
aperture R then one-half the counts in the pixel are
included.2. If r < R - 0.5 the entire pixel is included while if r
> R + 0.5 the pixel is wholly excluded.3. In between the fraction of the counts varies linearly.
A circular aperture is approximated by an irregular
polygon. The simplicity of aperture photometry limits the amount
of information available for error analysis. The following
three sources of error are considered.1. The error due to sky noise in the aperture. $error sub 1 ~=~ sigma sub sky ~*~ {A sub apert} sup {1/2}$
2. The error in the aperture sum. $error sub 2 ~=~ ( {A sub "sum" ~/~ phpadu} ) sup {1/2}$
3. The mean error of the sky. $error sub 3 ~=~ sigma sub sky ~*~ A sub apert ~/~ nsky sup {1/2}$
where $sigma sub sky$ is either computed by the back-
ground fitting algorithm or set by the user, and $A sub
apert$ is the fractional pixel area of the aperture.
[/quote:398cabbdf8]I would have to verify that the code still implements things this way, there have been a few revisions notes made the this algorithm was 'improved for accuracy' over the years, but the original author was pretty meticulous in her work.Others on this forum are better qualified to discuss the correctness of this approach, until they chime in I hope this helps.Cheers,
-Mike

 
Profile Email
 Quote
evert
 06/03/2008 03:17PM  
+----
Newbie

Status: offline


Registered: 01/24/2006
Posts: 8
Thanks Mike. I now know where in the future, the look for details :-)The specs help somewhat, although it does puzzle me about this excluding/including. Eg, according to rule 1, if r = R, half the pixel value is included. Assuming the distance measurement is from pixel center to pixel center, that doesn't seem to take into account any curvature of the (circular) aperture across the pixel. That's fine for large apertures/well sampled data, but occasionally one is stuck with apertures of about 3 pixel radius (I like to set my aperture to the estimated FWHM, although perhaps I shouldn't for those cases).
And of course, any details on how the polygonal approximation is done (linear across a single pixel?) aren't there. Well, I could dig into the code, but that's going to be really messy.Anyway, it does seem IRAF does it all correct in the end (from previous experience), so I'll happily use it for most of my photometry. But, as said, it does make me wonder about these inner workings of apphot.Cheers,Evert

 
Profile Email Website
 Quote
   
Content generated in: 0.08 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login