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

Properly address units in PintPulsar position #370

Merged
merged 5 commits into from
May 9, 2024

Conversation

vhaasteren
Copy link
Member

This fixes #363

By using astropy.units to convert to units.rad, it doesn't matter what units PINT returns, the position is read in radians.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 88.37%. Comparing base (5c1e455) to head (c58f840).
Report is 22 commits behind head on dev.

❗ Current head c58f840 differs from pull request most recent head 7b7eb22. Consider uploading reports for the commit 7b7eb22 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #370      +/-   ##
==========================================
- Coverage   88.44%   88.37%   -0.07%     
==========================================
  Files          13       13              
  Lines        3037     3036       -1     
==========================================
- Hits         2686     2683       -3     
- Misses        351      353       +2     
Files Coverage Δ
enterprise/pulsar.py 91.62% <50.00%> (-0.46%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update daede07...7b7eb22. Read the comment docs.

@vhaasteren
Copy link
Member Author

vhaasteren commented Nov 30, 2023

Note that the lines not covered by tests were already not covered.

I think it's actually worthwhile to include a NG 5yr dataset (say, B1855+09) in the test data (under tests/data/), so we can load a quick PINT pulsar with RAJ/DECJ parameters and also run those tests. PINT also includes that pulsar in its test data. Having a pulsar with RAJ/DECJ that is not 1713 is useful to have for other unit tests that still need to be implemented as wel. Right now we only have 1713.Sep.T2.par/tim

@vhaasteren vhaasteren linked an issue Nov 30, 2023 that may be closed by this pull request
@vhaasteren
Copy link
Member Author

Also note that the designmatrix and model parameter units are not addressed by this PR. That is a separate issue that should be addressed in a more comprehensive PR

@vhaasteren
Copy link
Member Author

This one depends on #382 for the added test to pass. So @tcromartie, this last test I added was missing (uncovered lines). If it had been there from the start, your PR #382 would have never been happening.

Other than that, this PR is ready

@vhaasteren vhaasteren merged commit 0f85dcc into nanograv:dev May 9, 2024
11 checks passed
@vhaasteren vhaasteren mentioned this pull request May 9, 2024
2 tasks
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.

PINTPulsar does not check for coordinate units
2 participants