-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard code synchony_sizes
#3559
Hard code synchony_sizes
#3559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple requests and one discussion point along with Alessio's comment. :)
@@ -520,18 +520,18 @@ def compute_sliding_rp_violations( | |||
) | |||
|
|||
|
|||
def get_synchrony_counts(spikes, synchrony_sizes, all_unit_ids): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does change the order in order to have the default. I guess I don't see a way around this, so it's okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do we event need the auto default if the user api already feeds this. We could have this be the same, but private no? Something to think about @alejoe91 @chrishalcrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think you're right. The function is only used in compute_synchrony_metrics
, and this allows people to use get_synchrony_counts
with the synchrony_sizes
in another context and keeps the order in tact. Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good by me now!
Fix #3549
Currently there is one metric,
synchony
, whose column names depends on a kwarg:synchony_sizes
. If the user inputssynchony_sizes = [3,5,7]
the columns in thequality_metrics
dataframe aresync_spikes_3
,sync_spikes_5
andsync_spikes_7
. This is a bit awkward to deal with in a few places. Computing these customsynchrony_sizes
are a bit of an edge case, so me @alejoe91 and @zm711 decided to just hard code the default values ofsynchony_sizes = [2,4,8]
.To help users who really want to compute custom synchony sizes, I've left the
_compute_synchonry_counts
function (which is called by the user-facingcompute_synchrony_metrics
function) with the ability to do this, but made it private.No backwards compatibility issues spring to mind: using this PR you can still load an old
sorting_analyzer
withsync_spikes_3
columns. Also, it shouldn't be breaking: if you pass thesynchony_sizes
kwarg tocompute_synchrony_metrics
it still computes, just with a warning.