Adding RectangularAnnulus aperture, and do_rectangular_photometry function

This PR logically belongs to the previous API refactoring:
 * it defines ``do_rectangular_photometry`` in ``aperture_funcs`` and moves the actual photometry computation from the ``RectangularAperture`` class, similarly to the other classes
 * defines ``RectangularAnnulus`` aperture class


I thought that doing it gradually might be easier.

On 14 September 2014 17:24, Thomas Robitaille <notifications@github.com>
wrote:

> In photutils/aperture_funcs.py:
>
> > +                                                x_min[i]:x_max[i]] ** 2
> > +                            if gain is not None:
> > +                                subvariance += (data[y_min[i]:y_max[i],
> > +                                                     x_min[i]:x_max[i]] /
> > +                                                gain[y_min[i]:y_max[i],
> > +                                                     x_min[i]:x_max[i]])
> > +                            # Make sure variance is > 0
> > +                            fluxvar[i] = max(np.sum(subvariance * fraction), 0)
> > +                        else:
> > +                            local_error = error[int((y_min[i] + y_max[i]) / 2 + 0.5),
> > +                                                int((x_min[i] + x_max[i]) / 2 + 0.5)]
> > +                            fluxvar[i] = max(local_error ** 2 * np.sum(fraction), 0)
> > +                            if gain is not None:
> > +                                local_gain = gain[int((y_min[i] + y_max[i]) / 2 + 0.5),
> > +                                                  int((x_min[i] + x_max[i]) / 2 + 0.5)]
> > +                                fluxvar[i] += flux[i] / local_gain
>
> @bsipocz <https://github.com/bsipocz> - you don't need to rebase against
> my latest branches btw, we can merge yours first. Unless you would prefer
> if we merge yours *after* #165
> <https://github.com/astropy/photutils/pull/165>, #166
> <https://github.com/astropy/photutils/pull/166>, and #167
> <https://github.com/astropy/photutils/pull/167>?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/astropy/photutils/pull/149/files#r17520696>.
>