From 9856ffe56e10b5cfc29ffcceefa0310f94b685a6 Mon Sep 17 00:00:00 2001 From: Paul Adkisson Date: Fri, 13 Sep 2024 10:28:52 +1000 Subject: [PATCH 1/5] updated requirements to include cv2 and update dev testing locations for neuroconv (#357) * updated requirements to include cv2 * updated dev testing locations * updated changelog --- .github/workflows/dev-testing.yaml | 2 +- CHANGELOG.md | 1 + requirements-full.txt | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-testing.yaml b/.github/workflows/dev-testing.yaml index 9f35c616..38652151 100644 --- a/.github/workflows/dev-testing.yaml +++ b/.github/workflows/dev-testing.yaml @@ -47,4 +47,4 @@ jobs: - name: Run NeuroConv tests run: | - pytest -n auto --dist loadscope neuroconv/tests/test_ophys neuroconv/tests/test_on_data/test_imaging_interfaces.py neuroconv/tests/test_on_data/test_segmentation_interfaces.py + pytest -n auto --dist loadscope neuroconv/tests/test_ophys neuroconv/tests/test_on_data/ophys/test_imaging_interfaces.py neuroconv/tests/test_on_data/ophys/test_segmentation_interfaces.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 856c85f6..62d7ec67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * Change the criteria of determining if Bruker data is volumetric [#342](https://github.com/catalystneuro/roiextractors/pull/342) * Fixes a bug that assumes the channel name is is on the tiff file for `BrukerTiffSinglePlaneImagingExtractor` [#343](https://github.com/catalystneuro/roiextractors/pull/343) * Including `packaging` explicitly in minimal requirements [#347](https://github.com/catalystneuro/roiextractors/pull/347) +* Updated requirements to include cv2 and update dev testing locations for neuroconv: [#357](https://github.com/catalystneuro/roiextractors/pull/357) ### Improvements diff --git a/requirements-full.txt b/requirements-full.txt index 81f42bf2..3d4219ef 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -1,5 +1,8 @@ tifffile>=2018.10.18 scanimage-tiff-reader>=1.4.1.4 neuroconv[video]>=0.4.6 # Uses the VideoCaptureContext class +opencv-python-headless>=4.5.1.48 +opencv-python-headless>=4.5.1.48,<4.7.0.72; sys_platform == 'darwin' +opencv-python-headless>=4.5.1.48,<4.7; sys_platform == 'darwin' and python_version>='3.11' natsort>=8.3.1 isx>=1.0.4 From f507246d187386c5ed889c389c6cc3213a84368a Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Fri, 13 Sep 2024 14:49:34 -0600 Subject: [PATCH 2/5] Correct some spelling errors in `generate_dummy_segmentation_extractor` (#355) * spelling errors * Update src/roiextractors/testing.py Co-authored-by: Paul Adkisson --------- Co-authored-by: Paul Adkisson --- src/roiextractors/testing.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/roiextractors/testing.py b/src/roiextractors/testing.py index 56ee9753..2fd9c69f 100644 --- a/src/roiextractors/testing.py +++ b/src/roiextractors/testing.py @@ -118,23 +118,23 @@ def generate_dummy_segmentation_extractor( num_rois : int, optional number of regions of interest, by default 10. num_frames : int, optional - _description_, by default 30 - num_rows : number of frames used in the hypotethical video from which the data was extracted, optional - number of rows in the hypotethical video from which the data was extracted, by default 25. + Number of frames in the recording, by default 30. + num_rows : int, optional + number of rows in the hypothetical video from which the data was extracted, by default 25. num_columns : int, optional - numbe rof columns in the hypotethical video from which the data was extracted, by default 25. + number of columns in the hypothetical video from which the data was extracted, by default 25. sampling_frequency : float, optional - sampling frequency of the hypotethical video form which the data was extracted, by default 30.0. + sampling frequency of the hypothetical video from which the data was extracted, by default 30.0. has_summary_images : bool, optional - whether the dummy segmentation extractor has summary images or not (mean and correlation) + whether the dummy segmentation extractor has summary images or not (mean and correlation). has_raw_signal : bool, optional - whether a raw fluoresence signal is desired in the object, by default True. + whether a raw fluorescence signal is desired in the object, by default True. has_dff_signal : bool, optional - whether a relative (df/f) fluoresence signal is desired in the object, by default True. + whether a relative (df/f) fluorescence signal is desired in the object, by default True. has_deconvolved_signal : bool, optional whether a deconvolved signal is desired in the object, by default True. has_neuropil_signal : bool, optional - whether a neuropil signal is desiredi n the object, by default True. + whether a neuropil signal is desired in the object, by default True. rejected_list: list, optional A list of rejected rois, None by default. From 60c83a447023115657803f18afca313efd162e85 Mon Sep 17 00:00:00 2001 From: Paul Adkisson Date: Tue, 17 Sep 2024 06:07:53 +1000 Subject: [PATCH 3/5] Update requirements-full.txt to fix security vulnerability (#358) --- requirements-full.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/requirements-full.txt b/requirements-full.txt index 3d4219ef..7dc4aead 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -1,8 +1,6 @@ tifffile>=2018.10.18 scanimage-tiff-reader>=1.4.1.4 neuroconv[video]>=0.4.6 # Uses the VideoCaptureContext class -opencv-python-headless>=4.5.1.48 -opencv-python-headless>=4.5.1.48,<4.7.0.72; sys_platform == 'darwin' -opencv-python-headless>=4.5.1.48,<4.7; sys_platform == 'darwin' and python_version>='3.11' +opencv-python-headless>=4.8.1.78 natsort>=8.3.1 isx>=1.0.4 From dbd9c8305068fd212d2dec2f622a57bf6b4e5f82 Mon Sep 17 00:00:00 2001 From: Paul Adkisson Date: Tue, 17 Sep 2024 10:43:36 +1000 Subject: [PATCH 4/5] Update dev version from 0.5.9 to 0.5.10 (#359) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 443e3305..2ac640cc 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( name="roiextractors", - version="0.5.9", + version="0.5.10", author="Heberto Mayorquin, Szonja Weigl, Cody Baker, Ben Dichter, Alessio Buccino, Paul Adkisson", author_email="ben.dichter@gmail.com", description="Python module for extracting optical physiology ROIs and traces for various file types and formats", From 735a866aa5e82dc7ffbf6cb81ad39d58678ba053 Mon Sep 17 00:00:00 2001 From: Paul Adkisson Date: Wed, 18 Sep 2024 01:55:38 +1000 Subject: [PATCH 5/5] Added specific error message for single-frame scanimage data (#360) * added specific notimplementederror for single-frame case * updated changelog --- CHANGELOG.md | 13 ++++++++++++- .../scanimagetiffimagingextractor.py | 7 ++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62d7ec67..562a132f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ -# Upcoming (v0.5.9) +# Upcoming (v0.5.10) + +### Features + +### Fixes +* Added specific error message for single-frame scanimage data [PR #360](https://github.com/catalystneuro/roiextractors/pull/360) + +### Improvements + +### Testing + +# v0.5.9 ### Deprecations diff --git a/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py b/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py index bdc1bc38..155ace8f 100644 --- a/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py +++ b/src/roiextractors/extractors/tiffimagingextractors/scanimagetiffimagingextractor.py @@ -299,7 +299,12 @@ def __init__( ScanImageTiffReader = _get_scanimage_reader() with ScanImageTiffReader(str(self.file_path)) as io: shape = io.shape() # [frames, rows, columns] - if len(shape) == 3: + if len(shape) == 2: # [rows, columns] + raise NotImplementedError( + "Extractor cannot handle single-frame ScanImageTiff data. Please raise an issue to request this feature: " + "https://github.com/catalystneuro/roiextractors/issues " + ) + elif len(shape) == 3: self._total_num_frames, self._num_rows, self._num_columns = shape if ( self._num_planes == 1