Skip to content

Commit 6912198

Browse files
committed
Merge branch 'release/2.31.0'
2 parents ad5e3b9 + ebf37b4 commit 6912198

36 files changed

+361
-136
lines changed

brainbox/behavior/dlc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import scipy.interpolate as interpolate
1010
from scipy.stats import zscore
1111

12-
from neurodsp.smooth import smooth_interpolate_savgol
12+
from ibldsp.smooth import smooth_interpolate_savgol
1313
from iblutil.numerical import bincount2D
1414
import brainbox.behavior.wheel as bbox_wheel
1515

brainbox/metrics/electrode_drift.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22

3-
from neurodsp import smooth, utils, fourier
3+
from ibldsp import smooth, utils, fourier
44
from iblutil.numerical import bincount2D
55

66

brainbox/metrics/single_units.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ def quick_unit_metrics(spike_clusters, spike_times, spike_amps, spike_depths,
981981
r.amp_std_dB[ir] = np.array(camp['log_amps'].std())
982982
srp = metrics.slidingRP_all(spikeTimes=spike_times, spikeClusters=spike_clusters,
983983
**{'sampleRate': 30000, 'binSizeCorr': 1 / 30000})
984-
r.slidingRP_viol[srp['cidx']] = srp['value']
984+
r.slidingRP_viol[ir] = srp['value']
985985

986986
# loop over each cluster to compute the rest of the metrics
987987
for ic in np.arange(nclust):

examples/archive/ibllib/synchronisation_ephys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import neurodsp.utils
1+
import ibldsp.utils
22
import spikeglx
33
import ibllib.io.extractors.ephys_fpga
44

@@ -15,7 +15,7 @@
1515

1616
# if the data is needed as well, loop over the file
1717
# raw data contains raw ephys traces, while raw_sync contains the 16 sync traces
18-
wg = neurodsp.utils.WindowGenerator(sr.ns, BATCH_SIZE_SAMPLES, overlap=1)
18+
wg = ibldsp.utils.WindowGenerator(sr.ns, BATCH_SIZE_SAMPLES, overlap=1)
1919
for first, last in wg.firstlast:
2020
rawdata, rawsync = sr.read_samples(first, last)
2121
wg.print_progress()

examples/loading_data/loading_raw_ephys_data.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
"metadata": {},
237237
"outputs": [],
238238
"source": [
239-
"from neurodsp.voltage import destripe\n",
239+
"from ibldsp.voltage import destripe\n",
240240
"# Reminder : If not done before, remove first the sync channel from raw data\n",
241241
"# Apply destriping algorithm to data\n",
242242
"destriped = destripe(raw_ap, fs=sr_ap.fs)"
@@ -445,7 +445,7 @@
445445
"source": [
446446
"## Useful modules\n",
447447
"* [ibllib.io.spikeglx](https://int-brain-lab.github.io/ibl-neuropixel/_autosummary/spikeglx.html)\n",
448-
"* [ibllib.voltage.dsp](https://int-brain-lab.github.io/ibl-neuropixel/_autosummary/neurodsp.voltage.html)\n",
448+
"* [ibllib.voltage.dsp](https://int-brain-lab.github.io/ibl-neuropixel/_autosummary/ibldsp.voltage.html)\n",
449449
"* [brainbox.io.spikeglx.stream](https://int-brain-lab.github.io/iblenv/_autosummary/brainbox.io.spikeglx.html#brainbox.io.spikeglx.stream)\n",
450450
"* [viewephys](https://github.com/oliche/viewephys) to visualise raw data snippets (Note: this package is not within `ibllib` but standalone)"
451451
]

examples/one/histology/coverage_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
33
from one.api import ONE
4-
from neurodsp.utils import fcn_cosine
4+
from ibldsp.utils import fcn_cosine
55

66
import iblatlas.atlas as atlas
77
from ibllib.pipes.histology import coverage

ibllib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
import warnings
44

5-
__version__ = '2.30.0'
5+
__version__ = '2.31.0'
66
warnings.filterwarnings('always', category=DeprecationWarning, module='ibllib')
77

88
# if this becomes a full-blown library we should let the logging configuration to the discretion of the dev

ibllib/ephys/ephysqc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from iblutil.util import Bunch
1212
import spikeglx
1313
import neuropixel
14-
from neurodsp import fourier, utils, voltage
14+
from ibldsp import fourier, utils, voltage
1515
from tqdm import tqdm
1616

1717
from brainbox.io.spikeglx import Streamer

ibllib/ephys/spikes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def ks2_to_alf(ks_path, bin_path, out_path, bin_file=None, ampfactor=1, label=No
142142
"""
143143
m = ephysqc.phy_model_from_ks2_path(ks2_path=ks_path, bin_path=bin_path, bin_file=bin_file)
144144
ac = phylib.io.alf.EphysAlfCreator(m)
145-
ac.convert(out_path, label=label, force=force, ampfactor=ampfactor)
145+
ac.convert(out_path, label=label, force=force, ampfactor=float(ampfactor))
146146

147147

148148
def ks2_to_tar(ks_path, out_path, force=False):

ibllib/ephys/sync_probes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def sync_probe_front_times(t, tref, sr, display=False, type='smooth', tol=2.0):
199199
to the sampling rate of digital channels. The residual is fit using frequency domain
200200
smoothing
201201
"""
202-
import neurodsp.fourier
202+
import ibldsp.fourier
203203
CAMERA_UPSAMPLING_RATE_HZ = 300
204204
PAD_LENGTH_SECS = 60
205205
STAT_LENGTH_SECS = 30 # median length to compute padding value
@@ -214,7 +214,7 @@ def sync_probe_front_times(t, tref, sr, display=False, type='smooth', tol=2.0):
214214
res_filt = np.pad(res_upsamp, lpad, mode='median',
215215
stat_length=CAMERA_UPSAMPLING_RATE_HZ * STAT_LENGTH_SECS)
216216
fbounds = [0.001, 0.002]
217-
res_filt = neurodsp.fourier.lp(res_filt, 1 / CAMERA_UPSAMPLING_RATE_HZ, fbounds)[lpad[0]:-lpad[1]]
217+
res_filt = ibldsp.fourier.lp(res_filt, 1 / CAMERA_UPSAMPLING_RATE_HZ, fbounds)[lpad[0]:-lpad[1]]
218218
tout = np.arange(0, np.max(tref) + SYNC_SAMPLING_RATE_SECS, 20)
219219
sync_points = np.c_[tout, np.polyval(pol, tout) + np.interp(tout, t_upsamp, res_filt)]
220220
if display:

0 commit comments

Comments
 (0)