Aper adding wcs and support for various input data

I think this one needs more work, but can be merge as is if you prefer:

- [x] support more input data types
- [x] add unit test
- [x] add/change documentation
- [x] support more input coordinate formats
- [x] return user input coordinates and pixelcoordinates in the result table

Future:
~~accept non pixel unit for radius etc. when the wcs is provided.~~ Moved to future feature list in #131

But it will be still a question whether this overrides the unit of a
quantity data input, or when the unit is defined in a fits header.


On 16 August 2014 13:46, Thomas Robitaille <notifications@github.com> wrote:

> In photutils/aperture_core.py:
>
> > +                              .format(i), AstropyUserWarning)
> > +                return aperture_photometry(data[i], positions, apertures, wcs,
> > +                                           error, gain, mask, method,
> > +                                           subpixels, pixelcoord,
> > +                                           pixelwise_error, mask_method)
> > +
> > +    # this is basically for NDData inputs and alike
> > +    elif hasattr(data, 'data') and not isinstance(data, np.ndarray):
> > +        datamask = data.mask
> > +        if data.wcs is not None and wcs_transformation is None:
> > +            wcs_transformation = data.wcs
> > +        data = u.Quantity(data.data, unit=data.unit, copy=False)
> > +        data.mask = datamask
> > +
> > +    else:
> > +        data = u.Quantity(data, copy=False)
>
> @bsipocz <https://github.com/bsipocz> - actually you won't need to worry
> about that logic soon, see astropy/astropy#2855
> <https://github.com/astropy/astropy/pull/2855> for an example of a
> decorator that will automatically deal with NDData objects. We can make
> decisions about what overrides what there.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/astropy/photutils/pull/122/files#r16324630>.
>