[Branch]: differential_rotation

This is the feature branch that contains some diff rot code, I think it needs some love so I am opening this so people don't forget about it!!
Ok - let me try that in the differential rotation branch, see if I
understand what youse are talking about!  This could be quite a powerful
checking mechanism.

On Wed, Nov 5, 2014 at 9:45 AM, Stuart Mumford <notifications@github.com>
wrote:

> In sunpy/image/coalignment.py:
>
> > @@ -44,6 +46,18 @@ def _default_fmap_function(data):
> >      return np.float64(data)
> >
> >
> > +def _is_pixel_unit(a):
> > +    """Tests the input to see if it is an astropy Quantity with units in
> > +    pixels."""
> > +    return (isinstance(a, u.Quantity) and a.unit == 'pix')
> > +
> > +
> > +def _is_arcsec_unit(a):
> > +    """Tests the input to see if it is an astropy Quantity with units in
> > +    arcseconds."""
> > +    return (isinstance(a, u.Quantity) and a.unit == 'arcsec')
>
> You could have a decorator which looks like this:
>
> @quantity_input(u.arcsec, u.arcsec, u.km, None)
> def my_sunpy_function(solar_x, solar_y, distance, some_int_parameter)
>
> Which would compare the args to the decorator to the args to the function
> and try and do f_arg[i].to(arg[i]) for each arg and raise an error if
> arg[i] is not None.
>
> I like the idea of the attempt to do the conversion, this also could be
> done in the decorator as above.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/sunpy/sunpy/pull/902/files#r19876590>.
>