I'm pretty sure I just picked a random date and location, calculated the
values in SSWIDL and SunPy, and then fixed what I thought were a reasonable
number of decimal points.

I'll take another look at all this code.  I made a mistake by recalculating
some quantities and thereby ignoring the DRY principle.  Whilst it is
important to have accurate calculations, I think it is more important to
adhere to the DRY principle, from the point of view of the maintenance of
SunPy,


On Wed, Oct 23, 2013 at 5:10 AM, Stuart Mumford <notifications@github.com>wrote:

> In sunpy/tests/coords/test_util.py:
>
> > +        result = sun_pos('2013-05-14')
> > +        assertion = {'obliq': 23.4358, 'app_long': 53.3683, 'dec': 18.6125,
> > +                     'ra': 50.9796, 'longitude': 53.3705}
> > +        for k in assertion:
> > +            np.testing.assert_almost_equal(result[k], assertion[k], decimal=4)
> > +
> > +    def test_calc_P_B0_SD(self):
> > +        result = calc_P_B0_SD('2012-12-14')
> > +        assertion = {'p': 10.4868, 'b0': -0.8127, 'l0': 0.0000, 'sd': 16.2364}
> > +        for k in assertion:
> > +            np.testing.assert_almost_equal(result[k], assertion[k], decimal=4)
> > +
> > +    def test_rot_hpc(self):
> > +        # testing along the Sun-Earth line, observer is on the Earth
> > +        x, y = rot_hpc(451.4, -108.9, '2012-06-15', '2012-06-15 16:05:23')
> > +        np.testing.assert_almost_equal(x, 573.9, decimal=1)
>
> @wafels <https://github.com/wafels> I changed these by a decimal place or
> two because they were not matching. Where did these values come from?!
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sunpy/sunpy/pull/550/files#r7151268>
> .
>