You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two potential bugs in makegp_ecorr: 1. the starting bin of pulsars which has only backend; 2. the empty-epoch crashing in ECORR noise
which is in
# TOAs that do not belong to this mask get index zero, which is ignored below.
# This will fail if there's only one mask that covers all TOAs
In function makegp_ecorr, we first create masks to identify different backends, like
masks = [np.array(backend_flags == backend) for backend in backends]
Then, we bin them like
bins = quantize(psr.toas * mask)
Because the we set the ToAs observed at different bins are False, which means 0,
we need to discard the first bin like
Umats.append(np.vstack([bins == i for i, cnt in zip(uniques[1:], counts[1:]) if cnt > 1]).T)
But, if one pulsar has only one backend needed to consider about ECORR noise,
there is no False / 0 in the bins. We need to consider about the fist bin.
The second one is for the empty-epoch problem.
If we consider about the ECORR noise of backend backend_A in code and we consider about the case of enterprise = True, which means we need to consider about the bins that has more than two ToAs. This problem is also mentioned at ECORR and enterprise=True #96 . We might want to change the least number in bins we consider about. But, for now, if in backend_A, there is no ToAs are observed at the same time and we want to consider about the backend_A. It will arise an error.
There are two potential bugs in
makegp_ecorr: 1. the starting bin of pulsars which has only backend; 2. the empty-epoch crashing in ECORR noisewhich is in
discovery/src/discovery/signals.py
Line 159 in ebd7edb
It has been mentioned in
discovery/src/discovery/signals.py
Lines 168 to 169 in ebd7edb
In function
makegp_ecorr, we first create masks to identify different backends, likeThen, we bin them like
Because the we set the ToAs observed at different bins are
False, which means0,we need to discard the first bin like
But, if one pulsar has only one backend needed to consider about
ECORRnoise,there is no
False/0in the bins. We need to consider about the fist bin.If we consider about the ECORR noise of backend
backend_Ain code and we consider about the case ofenterprise = True, which means we need to consider about the bins that has more than two ToAs. This problem is also mentioned at ECORR and enterprise=True #96 . We might want to change the least number in bins we consider about. But, for now, if inbackend_A, there is no ToAs are observed at the same time and we want to consider about thebackend_A. It will arise an error.I am preparing a PR to fix these in the PR.