mapcube.py typo in SunPy 0.70

14 views
Skip to first unread message

allyn....@gmail.com

unread,
Jun 8, 2016, 2:25:41 PM6/8/16
to SunPy

Using SunPy 0.70, if I try to animate, i.e, use the plot method on a datacube and using the default annotate=True it crashes trying to call the units method.  Simple comparison with other routines that work suggest that the units should have been called spatial_units.  Here are the actual diffs to make the code work:

 diff mapcube.orig mapcube.py
183c183
<                 xlabel = 'X-position [{xpos}]'.format(xpos=self[i].units.x)
---
>                 xlabel = 'X-position [{xpos}]'.format(xpos=self[i].spatial_units.x)
189c189
<                 ylabel = 'Y-position [{ypos}]'.format(ypos=self[i].units.y)
---
>                 ylabel = 'Y-position [{ypos}]'.format(ypos=self[i].spatial_units.y)

Which fixes my problem.

Stuart Mumford

unread,
Jun 9, 2016, 8:39:08 AM6/9/16
to su...@googlegroups.com

Hi,

Thanks for the heads up! I also noticed this yesterday.

We have merged a fix for this into the 0.7 branch (https://github.com/sunpy/sunpy/pull/1821), I have one more patch for another bug to write then I will do a 0.7.1 release to get the fix out.

Thanks again,

Stuart

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at https://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages