Conversation
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
for calcium_utils
…ten by cli argument
- argument order in CLI - allow for 2d masks
It worked only with str
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
They are arrays
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
We need to pad
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.