Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in 2D plotting. #182

Merged
merged 3 commits into from
Jun 19, 2019
Merged

Conversation

DanRyanIrish
Copy link
Member

@DanRyanIrish DanRyanIrish commented Jun 19, 2019

Bug was caused when both data and WCS were 2D. In this case a slice list
was being called, even though that list was only created when the data
was 2D with a >2D WCS with missing axes.

Description

The bug is fixed by only entering the slice_list to the gca_wcs method if the wcs is greater than 2 when the data is 2D.

Fixes #

Bug was caused when both data and WCS were 2D. In this case a slice list
was being called, even though that list was only created when the data
was 2D with a >2D WCS with missing axes.
@ghost
Copy link

ghost commented Jun 19, 2019

Thanks for the pull request @DanRyanIrish! Everything looks great!

@DanRyanIrish DanRyanIrish added this to the 1.2 milestone Jun 19, 2019
@DanRyanIrish DanRyanIrish requested a review from ehsteve June 19, 2019 17:12
Copy link
Member

@ehsteve ehsteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and it works.

@ehsteve
Copy link
Member

ehsteve commented Jun 19, 2019

Screen Shot 2019-06-19 at 2 39 21 PM

Another potential bug though. The axis on this plot are clearly arcsec but then it says deg on the axis labels.

@DanRyanIrish
Copy link
Member Author

Thanks for pointing out that bug @ehsteve. It's unclear whether this is a bug in ndcube, sunpy or astropy or whether it's just unexpected or limited behaviour in sunpy or astropy WCSAxes support.

I'll raise an issue and deal with it in separate PR as it's not an obvious fix.

@DanRyanIrish DanRyanIrish merged commit d05b825 into sunpy:master Jun 19, 2019
@DanRyanIrish DanRyanIrish modified the milestones: 1.2, 1.1.3 Jun 19, 2019
DanRyanIrish added a commit that referenced this pull request Jul 11, 2019
DanRyanIrish added a commit that referenced this pull request Jul 11, 2019
DanRyanIrish added a commit that referenced this pull request Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants