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

add inscopix imaging extractor and test #856

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions src/neuroconv/datainterfaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
from .ophys.cnmfe.cnmfedatainterface import CnmfeSegmentationInterface
from .ophys.extract.extractdatainterface import ExtractSegmentationInterface
from .ophys.hdf5.hdf5datainterface import Hdf5ImagingInterface
from .ophys.inscopix.inscopiximaginginterface import InscopixImagingInterface
from .ophys.micromanagertiff.micromanagertiffdatainterface import (
MicroManagerTiffImagingInterface,
)
Expand Down Expand Up @@ -146,6 +147,7 @@
BrukerTiffSinglePlaneImagingInterface,
MicroManagerTiffImagingInterface,
MiniscopeImagingInterface,
InscopixImagingInterface,
# Behavior
VideoInterface,
AudioInterface,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from ..baseimagingextractorinterface import BaseImagingExtractorInterface
from ....utils import FilePathType


class InscopixImagingInterface(BaseImagingExtractorInterface):
"""Interface for Inscopix imaging data."""

display_name = "HDF5 Imaging"
associated_suffixes = (".isxd",)
info = "Interface for HDF5 imaging data."
bendichter marked this conversation as resolved.
Show resolved Hide resolved

def __init__(self, file_path: FilePathType, verbose: bool = True):
"""

Parameters
----------
file_path : FilePathType
Path to .h5 or .hdf5 file.
bendichter marked this conversation as resolved.
Show resolved Hide resolved
verbose : bool, default: True
"""
super().__init__(file_path=file_path, verbose=verbose)
2 changes: 1 addition & 1 deletion src/neuroconv/datainterfaces/ophys/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
roiextractors>=0.5.7
roiextractors>=0.6.0
9 changes: 9 additions & 0 deletions tests/test_on_data/test_imaging_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
BrukerTiffMultiPlaneImagingInterface,
BrukerTiffSinglePlaneImagingInterface,
Hdf5ImagingInterface,
InscopixImagingInterface,
MicroManagerTiffImagingInterface,
MiniscopeImagingInterface,
SbxImagingInterface,
Expand Down Expand Up @@ -805,3 +806,11 @@ def check_incorrect_folder_structure_raises(self):
exc_type=AssertionError, exc_msg="The main folder should contain at least one subfolder named 'Miniscope'."
):
self.data_interface_cls(folder_path=folder_path)


class TestInscopixImagingInterface(ImagingExtractorInterfaceTestMixin, TestCase):
data_interface_cls = InscopixImagingInterface
interface_kwargs = dict(
file_path=str(OPHYS_DATA_PATH / "imaging_datasets" / "inscopix" / "movie_longer_than_3_min.isxd")
)
save_directory = OUTPUT_PATH
Loading