Thanks folks! rvals is perfect.
Will also try rebin near the aperture edges to estimate the flux better. Cheers, ashish Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125 http://www.astro.caltech.edu/~aam aam at astro.caltech.edu In the beginning there was nothing. God said, 'Let there be light!' And there was light. There was still nothing, but you could see it a whole lot better. -Ellen DeGeneres, (attributed) On Tue, 18 Mar 2008, Derek Lamb wrote: > Hi Ashish, > > What you're probably looking for is 'rvals' and 'where'. Something like: > > $dist = rvals($data,{center=>[$x,$y]}); > $flux = $data->where($dist <= 5.5); > $bkgd = $data->where($dist <= 8.5 & $dist >5.5); > > cheers, > Derek > > Ashish Mahabal wrote: >> Hi, >> >> How does one put a circular aperture on an image in order to measure flux >> within it? >> >> For instance, if in a 2048x2048 fits image I wanted to use a circular >> aperture of size 11 pixels (diameter) and sum the counts, what is the best >> way to go? >> >> How do I collect the "background" by using a larger aperture (say 17) and >> excluding the earlier aperture (i.e. an annulus)? >> >> Cheers, >> -ashish >> >> Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125 >> http://www.astro.caltech.edu/~aam aam at astro.caltech.edu >> >> Do not try to bend the spoon. That's impossible. >> Instead, only try to realize the truth. >> >> _______________________________________________ >> Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
