suite2p icon indicating copy to clipboard operation
suite2p copied to clipboard

Documentation and refactoring of suite2p/detection/sparsedetect.py

Open nspiller opened this issue 1 year ago • 0 comments

This pull request does not change the functionality, we only restructured the code.

The settings that we usually use for our analysis did not work well anymore for some new data, therefore we wanted to understand in detail how the ROI detection is working. We documented the code in sparsery algorithm in that process. We think this may be useful for others.

This is relevant to #1067

Overview:

  • unified and more descriptive variable names
  • added docstring to most functions in sparsdetect
  • removed unused code: variables, imports

Specifically:

  • simplified iter_extend (kept termination conditions)
  • replaced EstimateMode class with dict
  • moved best scale determination to set_scale_and_thresholds
  • moved downsampling to spatially_downsample
  • commented out part about extract patches, these do not appear to be used

nspiller avatar Jan 26 '24 20:01 nspiller