Navigation Menu

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

Fixed a bug with transform_with_sun_center() #4015

Merged
merged 1 commit into from Apr 13, 2020
Merged

Conversation

ayshih
Copy link
Member

@ayshih ayshih commented Apr 13, 2020

The context manager sun.coordinates.transform_with_sun_center() uses a global variable to control the behavior of transformations, which is set to False at the beginning. There's a bug where the context manager set the global variable to False after it exited, even if the global variable had been True when the context manager was called. The natural way to encounter this bug is a nested call to transform_with_sun_center(). This PR fixes the resetting to the prior value of the global variable.

Not to be backported

@ayshih ayshih added this to the 2.0 milestone Apr 13, 2020
@ayshih ayshih added [BugFix] coordinates Affects the coordinates submodule labels Apr 13, 2020
@ayshih ayshih marked this pull request as ready for review April 13, 2020 19:25
@ayshih ayshih requested a review from a team as a code owner April 13, 2020 19:25
Copy link
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

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

Why would you do this 🤣

@Cadair Cadair merged commit aeba281 into sunpy:master Apr 13, 2020
@ayshih ayshih deleted the twsc_bug branch April 15, 2020 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coordinates Affects the coordinates submodule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants