Open dkeller9 opened 2 weeks ago
I agree! This is a wart in the API that's always bugged me. Sadly, this was inherited from how the initial report reading was done, and it's propagated since then. Unfortunately it's not something we can change, as people's analysis would change; we have to keep a stable API.
Perhaps adding a new filter called "filter_exclusive" would preserve earlier analyses and do things according to convention.
That's an idea.
I don't normally like to add parameters to a function, but in this case the correct (in your and my opinion :)) behavior is exclusive_endpoint=True
, but it could be added and set to False
by default, preserving the old behavior.
It might be better if the filter operation does not include the end point of the range. For example, the command:
filtered = spikes.filter(group={'layer':'SP'}, t_start=1, t_stop=100)
will also return spikes happening exactly at t=100. Probably many users would find it more intuitive if the start point but not the end point was included in the range.