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 the observer frame attribute to always use SkyCoord-style transformation #4266

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

ayshih
Copy link
Member

@ayshih ayshih commented Jun 8, 2020

This PR fixes a bug with the observer frame attribute where the automatic transformation to HeliographicStonyhurst would unintentionally depend on the type of input:

  • If a SkyCoord, the transformation would propagate all frame attributes (e.g., obstime) and would work for all coordinate systems.
  • If just a frame and not a SkyCoord, the transformation would not propagate any frame attributes. For the commonly used SunPy frames, our transformations take care of the propagation, so the result would be indistinguishable from using SkyCoord. For the remaining SunPy frames and most Astropy frames, the transformations would error.

This PR always changes the input to a SkyCoord so that only the first path is taken and thus have there will be no transformation errors.

This PR is related to code that inspired #4237, but does not fix it.

@ayshih ayshih added [BugFix] coordinates Affects the coordinates submodule labels Jun 8, 2020
@ayshih ayshih marked this pull request as ready for review June 8, 2020 14:59
@ayshih ayshih requested a review from a team as a code owner June 8, 2020 14:59
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

4 participants