[AstroPy] Aperture photometry

Sergio Pascual sergiopr at fis.ucm.es
Thu Apr 14 17:04:42 EDT 2011


Hi Ian

2011/4/14 Ian Crossfield <ianc at ucla.edu>:
> Sergio,
>
> In general, PyRAF is probably your best bet for Python-drive photometry:
> http://www.stsci.edu/resources/software_hardware/pyraf .  This software
> has a long legacy and plenty of users; the learning curve is steep, but
> worth it in the long haul.
>

Well, in fact I want to avoid Iraf completely, probably because I have
used it for years...
On the other hand, as Iraf is the defacto standard, a python aperture
photometry library should have capabilities similar to
apphot. Apphot handles polygonal and circular apertures, with
fractional pixels. What I can't find is how is Iraf handling the
fractional pixels. In the circular case, is it computing exact values?
is it approximating the circle by something else? With Iraf is
difficult to know.

> If you need to avoid IRAF for some reason, I have some homebrew aperture
> photometry routines on my website; e.g.:
> http://astro.ucla.edu/~ianc/python/phot.html#phot.aperphot
> <http://astro.ucla.edu/%7Eianc/python/phot.html#phot.aperphot>
>
> The documentation isn't terrific, but the calling syntax is:
>
>
> import phot
> observation = phot.aperphot(image,  pos=[x0,y0],  dap=[dap_targ,  dap_skyinner,  dap_skyouter])
>
> Where:
> image -- can be the filename of a FITS file, or a numpy array
> pos -- x,y pixel coordinates of the target
> dap -- _diameters_ of apertures for photometry
>
>
> Then, e.g., "observation.phot" will give you the photometric measurement
> and "observation.bg" will give you the background level.
>
> But try PyRAF; you'll ultimately be glad you did.
>
> --
>
> Ian Crossfield
> UCLA Astronomy
> KH 3-145J
> http://www.astro.ucla.edu/~ianc/
>
>
>
>
> On 4/14/11 10:18 AM, Sergio Pascual wrote:
>> Hi
>>
>> Let's say I have an image as a  numpy array and I want to obtain the
>> summed values of the array inside an ellipse inside the image. In
>> other words, I wanto to make aperture photometry. Do you know of any
>> python astronomy package that implements this. It's a fairly basic
>> think, but I haven't found anything.
>>
>> Regards
>>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>



-- 
Sergio Pascual                        http://guaix.fis.ucm.es/~spr
gpg fingerprint: 5203 B42D 86A0 5649 410A F4AC A35F D465 F263 BCCC
Departamento de Astrofísica -- Universidad Complutense de Madrid (Spain)



More information about the AstroPy mailing list