Skip to content

Commit 1e73452

Browse files
committed
https://github.com/int-brain-lab/iblenv/issues/261
1 parent 7d39ba4 commit 1e73452

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

brainbox/behavior/wheel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
from numpy import pi
66
import scipy.interpolate as interpolate
7-
from scipy.signal import convolve, gaussian
7+
from scipy.signal import convolve, windows
88
from scipy.linalg import hankel
99
import matplotlib.pyplot as plt
1010
from matplotlib.collections import LineCollection
@@ -114,7 +114,7 @@ def velocity_smoothed(pos, freq, smooth_size=0.03):
114114
std_samps = np.round(smooth_size * freq) # Standard deviation relative to sampling frequency
115115
N = std_samps * 6 # Number of points in the Gaussian covering +/-3 standard deviations
116116
gauss_std = (N - 1) / 6
117-
win = gaussian(N, gauss_std)
117+
win = windows.gaussian(N, gauss_std)
118118
win = win / win.sum() # Normalize amplitude
119119

120120
# Convolve and multiply by sampling frequency to restore original units
@@ -274,7 +274,7 @@ def movements(t, pos, freq=1000, pos_thresh=8, t_thresh=.2, min_gap=.1, pos_thre
274274
peak_amps = np.fromiter(peaks, dtype=float, count=onsets.size)
275275
N = 10 # Number of points in the Gaussian
276276
STDEV = 1.8 # Equivalent to a width factor (alpha value) of 2.5
277-
gauss = gaussian(N, STDEV) # A 10-point Gaussian window of a given s.d.
277+
gauss = windows.gaussian(N, STDEV) # A 10-point Gaussian window of a given s.d.
278278
vel = convolve(np.diff(np.insert(pos, 0, 0)), gauss, mode='same')
279279
# For each movement period, find the timestamp where the absolute velocity was greatest
280280
peaks = (t[m + np.abs(vel[m:n]).argmax()] for m, n in zip(onset_samps, offset_samps))

ibllib/atlas/atlas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ def xyz2ccf(self, xyz, ccf_order='mlapdv'):
781781
"""
782782
Converts coordinates to the CCF coordinates, which is assumed to be the cube indices
783783
times the spacing.
784-
:param xyz: mlapdv coordinates in um, origin Bregma
784+
:param xyz: mlapdv coordinates in meters, origin Bregma
785785
:param ccf_order: order that you want values returned 'mlapdv' (ibl) or 'apdvml'
786786
(Allen mcc vertices)
787787
:return: coordinates in CCF space um, origin is the front left top corner of the data

0 commit comments

Comments
 (0)