Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ test_extractors = [
test_preprocessing = [
"ibllib>=3.4.1;python_version>='3.10'", # streaming IBL
"torch",
# for IBL data fetching
"pooch",
"datalad"
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# pip install ibl-neuropixel
# note the check needs to find package first before submodule otherwise the check will fail if the library
# does not exist
if importlib.util.find_spec("neurodsp") is not None and importlib.util.find_spec("neurodsp.voltage") is not None:
if importlib.util.find_spec("ibldsp") is not None and importlib.util.find_spec("ibldsp.voltage") is not None:
HAVE_NPIX = True
else:
HAVE_NPIX = False
Expand Down Expand Up @@ -157,7 +157,7 @@ def test_detect_bad_channels_ibl(num_channels):
however for testing it is necssary. So before calling the IBL function
we need to rescale the traces to Volts.
"""
import neurodsp.voltage
import ibldsp.voltage

# download_path = si.download_dataset(remote_path='spikeglx/Noise4Sam_g0')
# recording = se.read_spikeglx(download_path, stream_id="imec0.ap")
Expand Down Expand Up @@ -201,7 +201,7 @@ def test_detect_bad_channels_ibl(num_channels):
for i, random_chunk in enumerate(random_data):
traces_uV = random_chunk.T
traces_V = traces_uV * 1e-6
channel_flags, _ = neurodsp.voltage.detect_bad_channels(
channel_flags, _ = ibldsp.voltage.detect_bad_channels(
traces_V,
recording.get_sampling_frequency(),
psd_hf_threshold=psd_cutoff,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_detect_and_interpolate_bad_channel():


@pytest.mark.skipif(
importlib.util.find_spec("neurodsp") is not None or importlib.util.find_spec("spikeglx") or ON_GITHUB,
importlib.util.find_spec("ibldsp") is None,
reason="Only local. Requires ibl-neuropixel install",
)
def test_compare_real_data_with_ibl():
Expand All @@ -66,7 +66,7 @@ def test_compare_real_data_with_ibl():
"""
# Download and load data
import spikeglx
import neurodsp.voltage as voltage
import ibldsp.voltage as voltage

local_path = si.download_dataset(remote_path="spikeglx/Noise4Sam_g0")
si_recording = se.read_spikeglx(local_path, stream_id="imec0.ap")
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_compare_real_data_with_ibl():


@pytest.mark.skipif(
importlib.util.find_spec("neurodsp") is not None or importlib.util.find_spec("spikeglx") is not None,
importlib.util.find_spec("ibldsp") is None,
reason="Requires ibl-neuropixel install",
)
@pytest.mark.parametrize("num_channels", [32, 64])
Expand All @@ -119,7 +119,7 @@ def test_compare_input_argument_ranges_against_ibl(shanks, p, sigma_um, num_chan
Perform an extended test across a range of function inputs to check
IBL and SI interpolation results match.
"""
import neurodsp.voltage as voltage
import ibldsp.voltage as voltage

recording = generate_recording(num_channels=num_channels, durations=[1])

Expand Down