Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Components for Caiman #783

Merged
merged 33 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
98d984c
added placeholder background functions
pauladkisson Mar 18, 2024
e9f15ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 18, 2024
b23f64d
added first pass of background plane segmentation
pauladkisson Mar 28, 2024
a690ade
added default handling of background_plane_segmentation_name
pauladkisson Mar 28, 2024
ff1528a
added background to fluorescence traces
pauladkisson Mar 28, 2024
fa2f0d7
added parametrized conversion_options to caiman data tests
pauladkisson Mar 29, 2024
6bd1533
refactored background plane segmentation to a separate function
pauladkisson Mar 29, 2024
b489bf0
refactored add_segmentations fns to use a common private method
pauladkisson Mar 29, 2024
e17cc53
refactored add_fluorescence_traces fns to use a common private method
pauladkisson Mar 29, 2024
71ee98e
reparametrized caiman tests
pauladkisson Mar 29, 2024
1056a80
Merge branch 'main' into caiman
pauladkisson Mar 29, 2024
ac9e146
Merge branch 'main' into caiman
pauladkisson Apr 1, 2024
893de17
pinned caiman PR version of roiextractors
pauladkisson Apr 2, 2024
d875d4c
made background optional for other extractors
pauladkisson Apr 2, 2024
53ce8cb
Merge branch 'main' into caiman
pauladkisson Apr 2, 2024
df7e1bd
updated changelog
pauladkisson Apr 2, 2024
1490938
updated requirements
pauladkisson Apr 2, 2024
45fd891
fixed neuropil name bug
pauladkisson Apr 3, 2024
193f679
added test for invalid mask type
pauladkisson Apr 3, 2024
c6f8f3b
Merge branch 'main' into caiman
pauladkisson Apr 3, 2024
fd9020e
moved test for invalid mask type to unit test section
pauladkisson Apr 3, 2024
ad35e41
moved test for invalid mask type to unit test section
pauladkisson Apr 3, 2024
ddb8a30
removed neuropil unit tests from non-background methods
pauladkisson Apr 3, 2024
39f45bc
added neuropil traces to fluorescence unless include_background_segme…
pauladkisson Apr 3, 2024
dc62982
include_background --> include_background_segmentation in tests
pauladkisson Apr 4, 2024
734765f
added extra check for assertionerror
pauladkisson Apr 4, 2024
b71e2b5
Merge branch 'main' into caiman
CodyCBakerPhD Apr 8, 2024
43e91ee
Merge branch 'main' into caiman
pauladkisson Apr 9, 2024
05128cd
Update requirements.txt
pauladkisson Apr 9, 2024
979b076
Merge branch 'main' into caiman
pauladkisson Apr 11, 2024
a0e2ee6
Merge branch 'main' into caiman
CodyCBakerPhD Apr 16, 2024
4db7a48
Merge branch 'main' into caiman
pauladkisson May 3, 2024
bbae94f
comment problematic test
pauladkisson May 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* Manual construction of a `DatasetIOConfiguration` now requires the field `dataset_name`, and will be validated to match the final path of `location_in_file`. Usage via the automated constructors is unchanged. [PR #767](https://github.com/catalystneuro/neuroconv/pull/767)
* Enhance `get_schema_from_method_signature` to extract descriptions from the method docval. [PR #771](https://github.com/catalystneuro/neuroconv/pull/771)
* Avoid writing `channel_to_uV` and `offset_to_uV` in `add_electrodes` [PR #803](https://github.com/catalystneuro/neuroconv/pull/803)
* `BaseSegmentationExtractorInterface` now supports optional background plane segmentations and associated fluorescence traces [PR #783](https://github.com/catalystneuro/neuroconv/pull/783)


# v0.4.7 (February 21, 2024)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def add_to_nwbfile(
metadata: Optional[dict] = None,
stub_test: bool = False,
stub_frames: int = 100,
include_background_segmentation: bool = False,
include_roi_centroids: bool = True,
include_roi_acceptance: bool = True,
mask_type: Optional[str] = "image", # Literal["image", "pixel", "voxel"]
Expand All @@ -130,6 +131,9 @@ def add_to_nwbfile(
The metadata for the interface
stub_test : bool, default: False
stub_frames : int, default: 100
include_background_segmentation : bool, default: False
Whether to include the background plane segmentation and fluorescence traces in the NWB file. If False,
neuropil traces are included in the main plane segmentation rather than the background plane segmentation.
include_roi_centroids : bool, default: True
Whether to include the ROI centroids on the PlaneSegmentation table.
If there are a very large number of ROIs (such as in whole-brain recordings),
Expand Down Expand Up @@ -172,6 +176,7 @@ def add_to_nwbfile(
segmentation_extractor=segmentation_extractor,
nwbfile=nwbfile,
metadata=metadata,
include_background_segmentation=include_background_segmentation,
include_roi_centroids=include_roi_centroids,
include_roi_acceptance=include_roi_acceptance,
mask_type=mask_type,
Expand Down
2 changes: 2 additions & 0 deletions src/neuroconv/tools/roiextractors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from .roiextractors import (
add_background_fluorescence_traces,
add_background_plane_segmentation,
add_devices,
add_fluorescence_traces,
add_image_segmentation,
Expand Down
Loading
Loading