Skip to content

WIP: incorporate inpop ephemeris - #2021

Open
dlakaplan wants to merge 7 commits into
nanograv:masterfrom
dlakaplan:inpop
Open

WIP: incorporate inpop ephemeris#2021
dlakaplan wants to merge 7 commits into
nanograv:masterfrom
dlakaplan:inpop

Conversation

@dlakaplan

Copy link
Copy Markdown
Contributor

#784

This uses an external package to handle the inpop data (https://github.com/marcelhesselberth/Inpop/tree/main). It has some peculiarities: it is not vectorized, and it has strict handling of the file names. So we have to loop over the input data and do something sort of kludgy to use the astropy caching (we cache the file and then set up a tempfile symlink with the right extension, which goes away).

This works, although I am not fully convinced that it is correct. In particular I see position differences of up to 100km for the Earth-SSB, or ~1us for a test pulsar in residual differences.
inpop_diff
ephem_difference_de440
(I repeated this for different JPL versions and they are all similar).

So is this just the expected level of ephemeris difference? Or is there an error in the time handling or units or ...?

@dlakaplan

Copy link
Copy Markdown
Contributor Author

Right now some of the CI is failing for reasons unrelated to the actual PR:
marcelhesselberth/Inpop#3

@dlakaplan

Copy link
Copy Markdown
Contributor Author

Here is an update where I refit the model (RA, Dec, F0, F1):
inpop_diff
It goes from chi^2=97/94 (original) to 2706/94 (INPOP) to 88/94 (INPOP refit). The rms of the difference is 30ns. Parameter differences:

PARAMETER                                    Model 1                           Model 2   Diff_Sigma1   Diff_Sigma2
-------------------     ----------------------------   -------------------------------   -----------   -----------
RAJ                      17h48m52.74997507s +/-   3e-05    17h48m52.74996363s +/-   3e-05         -0.38         -0.38
DECJ                    -20d21m29.00002704s +/- 0.00011   -20d21m28.99977036s +/- 0.00011          2.29          2.29
F0                                61.48547655399987(33)             61.48547655400124(33)          4.06          4.06 !
F1                                 -1.1809990(22)×10⁻¹⁵              -1.1810004(22)×10⁻¹⁵         -0.62         -0.62

So this is plausible, but I would have expected more of a change in the position and less in the spin params (e.g., based on https://arxiv.org/pdf/2304.14677) but I haven't done a deep dive yet.

@dlakaplan

Copy link
Copy Markdown
Contributor Author

The separation between the fitted positions is 240 uas in RA, 280 uas in Dec. Those are plausible given Figure 4 in the Liu paper above.

@dlakaplan

Copy link
Copy Markdown
Contributor Author

Repeating that for a grid of input positions:
inpop_diffgrid
the arrows are the position offsets in uas, and the symbol size is the change in F0 (color is sign). So this looks relatively smooth/well-behaved, likely a rotation/offset as discussed elsewhere.

@dlakaplan

Copy link
Copy Markdown
Contributor Author

Note that I have a new standalone INPOP implementation that will avoid the CI errors above (and lead to some speed improvements). But I am waiting to see which is better to use.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.29134% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.47%. Comparing base (c39716e) to head (2a4ff6c).
⚠️ Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
src/pint/solar_system_ephemerides.py 69.29% 53 Missing and 25 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2021      +/-   ##
==========================================
+ Coverage   70.43%   70.47%   +0.03%     
==========================================
  Files         109      109              
  Lines       25750    25994     +244     
  Branches     4110     4149      +39     
==========================================
+ Hits        18136    18318     +182     
- Misses       6446     6485      +39     
- Partials     1168     1191      +23     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dlakaplan dlakaplan added enhancement awaiting review This PR needs someone to review it so it can be merged labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review This PR needs someone to review it so it can be merged enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant