Skip to content

Fixed missing induced velocity for helioecliptic transforms - #10970

Merged
mhvk merged 2 commits into
astropy:masterfrom
ayshih:bary_sun_pos
Nov 4, 2020
Merged

mhvk merged 2 commits into
astropy:masterfrom
ayshih:bary_sun_pos

Conversation

@ayshih

@ayshih ayshih commented Oct 30, 2020

Copy link
Copy Markdown
Contributor

The affine transformations between ICRS and any of the helioecliptic frames (HeliocentricMeanEcliptic, HeliocentricTrueEcliptic, and HeliocentricEclipticIAU76) are missing the induced-velocity offset if the to-be-transformed coordinate has differentials. I move the code from the ICRS<->HCRS transformations to a separate function in astropy.coordinates.utils and used it for all of the transformations.

@pllim

pllim commented Oct 30, 2020

Copy link
Copy Markdown
Member

Hello. Is this a bug fix or enhancement? Thanks!

@ayshih

ayshih commented Oct 30, 2020 •

Copy link
Copy Markdown
Contributor Author

Bug fix: the velocity transformations between ICRS and any of the helioecliptic frames are currently not accurate (by a shift of the velocity of the Sun: ~15 m/s)

@pllim pllim added the Bug label Oct 30, 2020
@ayshih
ayshih marked this pull request as ready for review October 30, 2020 18:13
@mhvk mhvk added this to the v4.0.4 milestone Nov 3, 2020

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks very good! Since it is a bug fix, I think we should backport to 4.0.4. Could you add a changelog entry?

I don't really have any substantial comments, except that I'm not very keen on the names! But admittedly I don't really have good alternative suggestions either.

return earth_pv, earth_heliocentric


def offset_sun_from_barycenter(time, include_velocity=False, reverse=False):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is very annoying that representations cannot be simply negated, as that would avoid reverse here. In principle, that is not difficult to solve, but would be a new feature, so not so helpful here (but see #10987). Looking at solar_system, I also think that, really, get_body_barycentric itself should have the include_velocity option. We could consider calling it get_sun_barycentric(time, include_velocity=False, reverse=False) here (and then later deprecate reverse).

Comment thread astropy/coordinates/builtin_frames/ecliptic_transforms.py Outdated
@ayshih

ayshih commented Nov 4, 2020

Copy link
Copy Markdown
Contributor Author

Comment thread astropy/coordinates/builtin_frames/utils.py Outdated

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good modulo the typo noted - can just be a [skip ci] commit.

@ayshih

ayshih commented Nov 4, 2020

Copy link
Copy Markdown
Contributor Author

Whoops! Typo fixed

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK, looks all good now! Merging...

@mhvk
mhvk merged commit feee7e5 into astropy:master Nov 4, 2020
@ayshih
ayshih deleted the bary_sun_pos branch November 5, 2020 05:00
bsipocz pushed a commit that referenced this pull request Nov 6, 2020
Fixed missing induced velocity for helioecliptic transforms
bsipocz pushed a commit that referenced this pull request Nov 7, 2020
Fixed missing induced velocity for helioecliptic transforms
bsipocz pushed a commit that referenced this pull request Nov 7, 2020
Fixed missing induced velocity for helioecliptic transforms
astrofrog pushed a commit that referenced this pull request Nov 10, 2020
Fixed missing induced velocity for helioecliptic transforms
bsipocz pushed a commit that referenced this pull request Nov 23, 2020
Fixed missing induced velocity for helioecliptic transforms
bsipocz pushed a commit that referenced this pull request Nov 23, 2020
Fixed missing induced velocity for helioecliptic transforms
bsipocz pushed a commit that referenced this pull request Nov 25, 2020
Fixed missing induced velocity for helioecliptic transforms
dhomeier pushed a commit that referenced this pull request Nov 26, 2020
Fixed missing induced velocity for helioecliptic transforms
dhomeier pushed a commit to dhomeier/astropy that referenced this pull request Nov 26, 2020
Fixed missing induced velocity for helioecliptic transforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants