Skip to content

Documentation and refactoring of suite2p/detection/sparsedetect.py#1085

Open
nspiller wants to merge 5 commits intoMouseLand:mainfrom
the-wang-lab:main
Open

Documentation and refactoring of suite2p/detection/sparsedetect.py#1085
nspiller wants to merge 5 commits intoMouseLand:mainfrom
the-wang-lab:main

Conversation

@nspiller
Copy link

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

@carsen-stringer carsen-stringer force-pushed the main branch 3 times, most recently from 0df2cc3 to a993e7b Compare February 21, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant