astropy/photutils — pull request #1 by kbarbary (2012-04-11 20:33:34+00:00)
Title: Draft API for five photometry functions

This is a draft API for five functions: photometry in circular apertures, circular annuli, elliptical apertures and elliptical annuli, as well as a background estimation function. I've implemented the elliptical annuli function (as it is the most general of the four photometry functions), but the others are not yet implemented. Comments? In particular...

* Function names? (I'm not really satisfied with the aperture/annuli function names.)
* `annulus_ell` handles either scalar, 1-d or 2-d arrays for the annulus parameters. Is the meaning of each clear enough?
* I haven't settled on an elegant and efficient way to call `annulus_ell` from the other functions. For example, simply giving an inner radius of 0 to `annulus_ell` from `aper_ell` would result in unnecessary array manipulations. Similarly for going from circles to ellipses.
* All the shape checking in the beginning of `annulus_ell` should be done in each function so that relevant exceptions can be raised, but we don't want to repeat this when `annulus_ell` is called. Perhaps a `verify` keyword should be included so this checking can be overridden? The other option would be for all four of these public functions to do their own shape checking and then call a private function.