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

Find and improve all instances of defaulting the Sun-Earth distance to 1 AU #4998

Open
Cadair opened this issue Feb 16, 2021 · 3 comments · Fixed by #6436
Open

Find and improve all instances of defaulting the Sun-Earth distance to 1 AU #4998

Cadair opened this issue Feb 16, 2021 · 3 comments · Fixed by #6436
Labels
coordinates Affects the coordinates submodule Effort Low Requires a small time investment map Affects the map submodule Package Intermediate Requires some knowledge of the internal structure of SunPy physics Affects the physics submodule Priority Low Slow action required

Comments

@Cadair
Copy link
Member

Cadair commented Feb 16, 2021

If I remember correctly we do this in a few places in Map, such as in SXT as was pointed out here: #4926 (comment)

@ayshih Do we still do this anywhere in coordinates?

@Cadair Cadair changed the title Find Find and improve all insatnaces of defaulting the Sun-Earth distance to 1 AU Feb 16, 2021
@nabobalis nabobalis changed the title Find and improve all insatnaces of defaulting the Sun-Earth distance to 1 AU Find and improve all instances of defaulting the Sun-Earth distance to 1 AU Feb 16, 2021
@nabobalis nabobalis added coordinates Affects the coordinates submodule Effort Low Requires a small time investment map Affects the map submodule Package Intermediate Requires some knowledge of the internal structure of SunPy Priority Low Slow action required labels Feb 16, 2021
@ayshih
Copy link
Member

ayshih commented Feb 16, 2021

I'm pretty sure sunpy.coordinates is all safe.

I just tried using grep to find instances anywhere else, and the only one I can find is that SXT one. (A private function in sunpy.instr.goes has it as a default if a date is not provided, but the public function that calls it should always provide a date.) However, there may be insidious implementations that I missed with my grep pattern.

@ayshih
Copy link
Member

ayshih commented Mar 21, 2021

Here's a subtle one. If you request the alternate output of synodic from sunpy.physics.differential_rotation.diff_rot(), it calculates the synodic rotation – the apparent amount of rotation for as seen by an Earth observer – by assuming that the Earth is always at 1 AU.

# Applying this correction assumes that the observer is on the Earth,
# and that the Earth is at the same distance from the Sun at all times
# during the year.
if frame_time == 'synodic':
rotation -= 0.9856 * u.deg / u.day * duration

@dstansby dstansby added the physics Affects the physics submodule label Jun 28, 2021
@Cadair Cadair reopened this Oct 1, 2022
@Cadair
Copy link
Member Author

Cadair commented Oct 1, 2022

Before we close this I would like to make sure we have actually got them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coordinates Affects the coordinates submodule Effort Low Requires a small time investment map Affects the map submodule Package Intermediate Requires some knowledge of the internal structure of SunPy physics Affects the physics submodule Priority Low Slow action required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants