Skip to content

Dev#64

Merged
ablot merged 63 commits into
mainfrom
dev
Apr 23, 2026
Merged

Dev#64
ablot merged 63 commits into
mainfrom
dev

Conversation

@ablot
Copy link
Copy Markdown
Member

@ablot ablot commented Apr 23, 2026

No description provided.

ablot and others added 30 commits April 12, 2025 16:19
The aim is to isolate the s2p part and make it easier to maintain
They are required for ast neuropil
Gemini suggestions
should still run on neuropil corrected traces, just using the classic instead
- argument order in CLI
- allow for 2d masks
ablot and others added 29 commits September 9, 2025 13:34
Because of some flexilims issue, we have some dataset where np.bool_ have been uploaded as str.
Catch that for the False (true will evaluate to true)
Mostly to ensure proper types but also to avoid divergence between ops and dataset
When re-running the registration the xrange might change. Vcorr shape should then be updated
Suite2p saves the ops given as input argument. So if we run once with register set to 2, it will re-register everytime until we force it back to 1. Fix that
Unsure why it doesn't work with fast disk, but using local is more robust
There was no bug on flexilims, no need to use strings. That also is more consistent with the annotation of suite2p_traces
The current dff estimation crashes if there is a NaN in F. This can happen if one mask is defined outside of the part that suite2p can register(if one provide masks externally).
In this case the F is only NaN. Ensure that in this case dff is also NaN

If a line of f has some nan, but not all, the function will still crash.
It is currently not very useful as we keep using the same but will be needed if we get local disks on nodes
- Add sanity plot for masks
- Bug fix if GMM sanity plot selects an all-NaN roi
- Option to change some options while reextracting
- Fix path issue for registered data and crash if not found
- More verbose log for path
- verify_mask: function to check that masks have 1 roi per cell id and that cell ids are increasing continuously
- relabel_mask: function to relabel the masks with 1 value per cell
I got confused with how suite2p uses fast_disk. reg_path takes precedence, so depending on the option the binaries can be in many places.

Adapt to check:
- The path specified in the original dataset's ops["reg_file"].
- The standard shared location: fast_disk / "suite2p" / f"plane{iplane}" / "data.bin".
-A fallback check for a
data.bin  in the same folder as the original
ops.npy
- The current annotated dataset folder (to allow continuing after a previous failure).
…sioning

- Add docs/ with Sphinx (furo theme), MyST-Parser, sphinx-autoapi, sphinx-copybutton
- Narrative pages: installation, usage (CLI + SLURM + Python API), pipeline overview, changelog
- GitHub Actions workflow: build on PR, deploy to gh-pages on push to main
- setuptools_scm version_file so package exposes __version__ from git tags
- docs/conf.py reads version from git at build time via setuptools_scm.get_version()
- Add docs/_build/ and twop_preprocess/_version.py to .gitignore
- Fix pre-existing SyntaxError in s2p_movie_utils.write_moving_average_tif
  (positional args after default arg)
Conflict resolutions:
1. calcium.py (modify/delete): removed stale monolithic calcium.py from main;
   dev's refactored calcium/ sub-package takes precedence.
2. s2p_movie_utils.py: kept main's simple_open_binaries() body (open binary
   files via keep_movie_raw flag) plus dev's SyntaxError fix in
   write_moving_average_tif (arg order: out_dir, fname before w=100).
3. s2p_plotting_utils.py: dropped dev's mpl.rcParams.update() global side-effect
   block; kept main's complete function bodies for plot_detection_outcome and
   plot_roi_and_neuropil; kept dev's lazy 'from suite2p.extraction import masks'
   inside plot_roi_and_neuropil to keep suite2p optional.
4. sanity_check_utils.py: kept dev's 'return fig' in plot_fluorescence_matrices
   (main omitted it, making the figure inaccessible to callers).
5. zstack.py: kept dev's black-formatted one-liner tuple unpacking; used main's
   correct comment indentation and no trailing whitespace inside the zstack-concat
   list comprehension.
Sphinx-autoapi renders Google-style docstring continuation lines with
extra indentation, which docutils interprets as block quotes and raises
'Unexpected indentation' errors under -W (warnings-as-errors).

Fix: merge wrapped continuation lines onto single lines in:
- calcium_s2p.py: reextract_masks() Returns block
- calcium_utils.py: dFF() Args + Returns, correct_neuropil_standard()
  Args + Returns, calculate_and_save_dFF() summary + Returns
@ablot ablot merged commit dd827c5 into main Apr 23, 2026
1 check passed
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.

3 participants