Skip to content

Preprocessing features for re-saving mcorr results in C order#346

Open
ethanbb wants to merge 11 commits intonel-lab:masterfrom
proektlab:save-c-order-features
Open

Preprocessing features for re-saving mcorr results in C order#346
ethanbb wants to merge 11 commits intonel-lab:masterfrom
proektlab:save-c-order-features

Conversation

@ethanbb
Copy link
Copy Markdown
Collaborator

@ethanbb ethanbb commented Apr 6, 2026

This feature adds some new parameters that can be specified under the "preprocessing" top-level key of params (rather than "main") to do extra steps while re-saving the movie in C-order. (This is distinct from the "main.preprocess" namespace for the preprocessing done in CNMF.fit - I couldn't think of a better name, but we could potentially still change it to avoid confusion.

These new parameters are supported under "preprocessing":

  • border_pixels: controls setting border pixels to 0 (as in the border_to_0 argument to save_memmap). Value can be:
    • An int, to set this many pixels on each side to 0
    • A dict with int entries left, right, top, and bottom, plus z_top and z_bottom for 3D movies, for unequal borders
    • None, to infer borders directly from motion correction results (only supported if input is an mcorr mesmerize item)
  • add_to_movie: constant to add to the movie (default is 0.0001, matching save_memmap)
  • highpass_cutoff and highpass_order: Set highpass_cutoff to a float > 0 to high-pass filter the data during transposition to C-order. This is implemented using a zero-phase Butterworth filter of order highpass_order (default 4).

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