[AstroPy] Aperture photometry
Ian Crossfield
ianc at ucla.edu
Thu Apr 14 14:16:15 EDT 2011
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.
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
>
More information about the AstroPy
mailing list