[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!!
It is true that it won't fall over pretty, but it will fall over.  Putting
checks in the code to check for Quantities puts a lot more ifs in the code
and reduces legibility, IMHO.  If we do these kinds of checks then they
need to be SunPy-wide - I'm not convinced that it (checking for Quantity
input) is necessary.  Is it elsewhere in the code base?

On Tue, Nov 4, 2014 at 4:38 PM, 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')
>
> It wont fall over pretty if you don't pass a Quantity something along the
> lines of "float object has no attribute to" where as "Input must be
> specified as Quantity" is much more useful, we should try and use the same
> error text code wide in SunPy.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/sunpy/sunpy/pull/902/files#r19838075>.
>