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

Fix numerical slop reading in ASCII profiles, add tests. #1476

Merged
merged 3 commits into from
Dec 16, 2022

Conversation

kerrm
Copy link
Contributor

@kerrm kerrm commented Dec 15, 2022

Julia reported a problem making NICER TOAs after updates to this template fitting code. It was because I had begun to enforce strict parameter bounds, but profiles saved to ASCII templates can lose enough precision to fail the bounds check. This PR:

(1) will no longer silently fail when the likelihood is nonsense (because of a failed parameter check)
(2) will check ASCII profiles and, if they're close enough to parameter bounds, silently skootch them up or down to the bound
(3) adds tests for both changes

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Base: 65.75% // Head: 65.95% // Increases project coverage by +0.20% 🎉

Coverage data is based on head (4351d8f) compared to base (2ac1f72).
Patch coverage: 62.85% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1476      +/-   ##
==========================================
+ Coverage   65.75%   65.95%   +0.20%     
==========================================
  Files          91       91              
  Lines       21260    21286      +26     
  Branches     3664     3674      +10     
==========================================
+ Hits        13979    14039      +60     
+ Misses       6445     6404      -41     
- Partials      836      843       +7     
Impacted Files Coverage Δ
src/pint/templates/lctemplate.py 57.62% <60.60%> (+3.97%) ⬆️
src/pint/templates/lcfitters.py 29.41% <100.00%> (+2.50%) ⬆️
src/pint/templates/lcprimitives.py 40.81% <0.00%> (+0.19%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@paulray
Copy link
Member

paulray commented Dec 15, 2022

Fixes bugs, AND improves coverage... I love it!

@paulray
Copy link
Member

paulray commented Dec 15, 2022

Can you add a CHANGELOG entry?

@paulray paulray merged commit d597bf0 into nanograv:master Dec 16, 2022
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.

2 participants