nanograv / enterprise

ENTERPRISE (Enhanced Numerical Toolbox Enabling a Robust PulsaR Inference SuitE) is a pulsar timing analysis code, aimed at noise analysis, gravitational-wave searches, and timing model analysis.
https://enterprise.readthedocs.io
MIT License
64 stars 65 forks source link

Fix regression in 1d4975: Pulsar.backend_flags need to be properly sorted #297

Closed vallis closed 2 years ago

vallis commented 2 years ago

In commit 1d4975, I dropped a critical indexing step at line 266 in pulsar.py, which uses the toas sorting index to sort the backend_flags array. This resulted in scrambled selection masks when loading 12.5yr B1937 with PINT (but not with tempo2, which must do some sorting of its own). Aaron found this problem while testing PINT-BayesEphem. This one-line patch fixes the issue.

codecov[bot] commented 2 years ago

Codecov Report

Merging #297 (6dec46a) into master (ffe69bf) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #297   +/-   ##
=======================================
  Coverage   87.00%   87.00%           
=======================================
  Files          13       13           
  Lines        2870     2870           
=======================================
  Hits         2497     2497           
  Misses        373      373           
Impacted Files Coverage Δ
enterprise/pulsar.py 92.36% <100.00%> (ø)

Continue to review full report at Codecov.

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

vallis commented 2 years ago

I'm also changing the content of PintPulsar.toas to match Tempo2Pulsar.toas (baricentered TDB toas). This may affect physics at a very small level.