spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

`SortingAnalyzer` issues

Open khl02007 opened this issue 8 months ago • 7 comments

@alejoe91 @samuelgarcia I just started trying the new sorting analyzer and wanted to share some issues that I have encountered:

  • It seems that every time you run sorting_analyzer.compute, you recompute all the extensions. I think that it would be better if it first checks if the extension exists with the same parameters and not re-do it if possible. Maybe there could be a recompute=True parameter that you can pass.
  • Some of the extensions depend on other extensions. For example, computing PC metrics requires the principal components extension. But the parameters passed may differ. For example, principal_components extension could be computed with n_components=5, but a PC metric that depends on it may ask for n_components=10. In that case it seems like the user should get at least a warning, or a error message saying that the parameters are not compatible.
  • Another idea is for the user to just be able to compute the quality metrics from the sorting analyzer, and the sorting analyzer to silently compute the extensions if they don't exist. I prefer this, as I don't really want to think about what kind of extensions are required for me to get my metrics.
  • In general from the user's perspective it is very opaque as to how the extensions depend on one another. Perhaps this can be better documented.
  • I feel that si.load_sorting_analyzer should have load_extensions=False by default (rather than load all the extensions by default, which could take a long time)
  • I'm not sure how I can add / attach a recording back to a sorting analyzer. I created a sorting analyzer with a sorting and a recording, and computed some extensions. Then later I tried to load the sorting analyzer and compute more extensions. But when I loaded the sorting analyzer with load_sorting_analyzer and tried to compute the extensions, I got an error saying that it requires a recording and the sorting analyzer doesn't have one. I can load the recording independently, but I don't know how it can be associated with the loaded sorting analyzer again. Would I 'recreate' the sorting analyzer again with create_sorting_analyzer again in that case?

khl02007 avatar Jun 14 '24 20:06 khl02007