Skip to content

Commit

Permalink
move import in
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Sep 29, 2023
1 parent 93f02e8 commit e0bcb28
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/spikeinterface/extractors/cbin_ibl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
from spikeinterface.extractors.neuropixels_utils import get_neuropixels_sample_shifts
from spikeinterface.core.core_tools import define_function_from_class

try:
import mtscomp

HAVE_MTSCOMP = True
except:
HAVE_MTSCOMP = False


class CompressedBinaryIblExtractor(BaseRecording):
"""Load IBL data as an extractor object.
Expand Down Expand Up @@ -42,7 +35,6 @@ class CompressedBinaryIblExtractor(BaseRecording):
"""

extractor_name = "CompressedBinaryIbl"
installed = HAVE_MTSCOMP
mode = "folder"
installation_mesg = "To use the CompressedBinaryIblExtractor, install mtscomp: \n\n pip install mtscomp\n\n"
name = "cbin_ibl"
Expand All @@ -51,7 +43,10 @@ def __init__(self, folder_path, load_sync_channel=False, stream_name="ap"):
# this work only for future neo
from neo.rawio.spikeglxrawio import read_meta_file, extract_stream_info

assert HAVE_MTSCOMP
try:
import mtscomp
except:
raise ImportError(self.installation_mesg)
folder_path = Path(folder_path)

# check bands
Expand Down

0 comments on commit e0bcb28

Please sign in to comment.