Harmonization of the way we are computing sliding_rp_violations - #4324
Conversation
for more information, see https://pre-commit.ci
|
Ideally, this function should even make use of auto_correlograms, since they will be added in #4307 |
|
@yger what's the status of this? |
|
The problem remains. As said, there are inconsitencies in this function when compared to compute_correlogram. We should harmonize: window_size_s and the problem of the bin size. I don't think this should change too much the results |
| ## I dont get why this line is not giving exactly the same result as the correlogram function. I would question | ||
| # the choice of the bin_size above, but I am not the author of the code... | ||
| # correlogram = compute_correlograms(sorting, 2*window_size_s*1000, bin_size_ms, method=method)[0][0, 0] | ||
| correlogram = compute_correlograms(sorting, window_size_s * 1000, bin_size_ms, method=method)[0][0, 0] |
There was a problem hiding this comment.
As the commented text says, in order to maintain the behavior we should set 2 * window_size_s * 1000, no?
We can make it clear in the params that this is "half" the window_size
There was a problem hiding this comment.
Yes, we should revert to 2window_size1000, and make clear that param is half the window size as opposed to the other way of computing correlogram. My point was that since the computation mostly use the information near 0, I think twice the window size is an overkill here. But happy to keep it as it is, since I do not have time to properly test the numerical difference between the two. I'll edit the PR
for more information, see https://pre-commit.ci
|
The mismatch is due to different rounding: Old code: bin_size = int(0.25/1000 * 30000) = 7 samples → 0.233 ms/bin In both cases though, the I pushed a fix in the last commit: the |
|
Reminder for myself: drop new scatter for reference |


After optimizing all metrics, I realized a slight discrepancies in sliding_rp_violations compared with our way of computing cross-correlograms. This has to do with several things, I think it would be worth harmonizing everything
This PR uses compute_correlograms instead to solve the problem, but this would slightly change the results of the metrics. Who implemented that? Is it a feature, or should it be harmonized?