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
67 stars 67 forks source link

Issue with EcorrKernelNoise for ultra-wideband data #319

Closed danielreardon closed 1 year ago

danielreardon commented 2 years ago

Hi team,

In the PPTA-dr3 data set, we have an ultra-wideband reciever (UWL) and observe that the jitter noise modelled with ECORR decorrelates across the band for some pulsars. We therefore break the UWL into multiple sub-bands, each of which is channelised. We treat each of these sub-bands as a separate "backend" group for the purpose of white noise modelling, to capture the decorrelation across the band.

However, since all of the UWL sub-bands are recorded simultaneously, we see an error arising from the utils.quant2ind function called by EcorrKernelNoise

ValueError: ERROR: TOAs not sorted properly!

The error appears to be arising because the ToAs from different groups are over-lapping. Attached is a file compiled by Paul Baker, demonstrating the bug with some ppta-dr3 data ecorr_bug.tgz

vhaasteren commented 1 year ago

Ah, so this is the bug we were talking about. I am looking into this. The TOAs are not continuous per backend, which is what causes this. Two solutions:

The second solution of the two is more general, and quite compatible with the rest of the codebase. Bjorn Larsen even had tentative fix. The fastshermanmorrison code would not work with index arrays, so I would need to update that as well. But no showstoppers

vhaasteren commented 1 year ago

@danielreardon , this is now fixed in the dev branch and will get into a future release.

vhaasteren commented 1 year ago

Closing