Skip to content

Barycentric correction when dates are not in chronological order#5

Open
tronsgaard wants to merge 2 commits into
jdeast:masterfrom
tronsgaard:master
Open

Barycentric correction when dates are not in chronological order#5
tronsgaard wants to merge 2 commits into
jdeast:masterfrom
tronsgaard:master

Conversation

@tronsgaard

Copy link
Copy Markdown

I noticed that that BARYCORR() and ZBARYCORR() returns incorrect results when input dates are not in chronological order. This small change seems to resolve the issue.

Before (when swapping the dates):

IDL> barycorr([2457462.12724721d, 2457535.067362d], 293.08995940d, 69.66117649d, 0.0, pmra=598.07d, pmdec=-1738.40d, px=173.77d, rv=26780.0d, lat=28.2983d, long=-16.5094d, alt=2400.0d )
      -2980.7919277653332
       2544.4863678183606

IDL> barycorr([2457535.067362d, 2457462.12724721d], 293.08995940d, 69.66117649d, 0.0, pmra=598.07d, pmdec=-1738.40d, px=173.77d, rv=26780.0d, lat=28.2983d, long=-16.5094d, alt=2400.0d )
       185.17924426851835
      -2980.7919277653332

After:

IDL> barycorr([2457462.12724721d, 2457535.067362d], 293.08995940d, 69.66117649d, 0.0, pmra=598.07d, pmdec=-1738.40d, px=173.77d, rv=26780.0d, lat=28.2983d, long=-16.5094d, alt=2400.0d )
      -2980.7919277653332
       2544.4863678183606

IDL> barycorr([2457535.067362d, 2457462.12724721d], 293.08995940d, 69.66117649d, 0.0, pmra=598.07d, pmdec=-1738.40d, px=173.77d, rv=26780.0d, lat=28.2983d, long=-16.5094d, alt=2400.0d )
       2544.4863678183606
      -2980.7919277653332

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.

1 participant