Skip to content

Commit

Permalink
support for openephys
Browse files Browse the repository at this point in the history
  • Loading branch information
oliche committed Dec 6, 2024
1 parent 51cb2dc commit 3e485c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ibldsp/voltage.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def destripe(
if neuropixel_version is not None:
x = fourier.fshift(x, h["sample_shift"], axis=1)
# apply spatial filter only on channels that are inside of the brain
if channel_labels is not None:
if (channel_labels is not None) and (channel_labels is not False):
x = interpolate_bad_channels(x, channel_labels, h["x"], h["y"])
inside_brain = np.where(channel_labels != 3)[0]
x[inside_brain, :] = spatial_fcn(x[inside_brain, :]) # apply the k-filter
Expand Down
8 changes: 4 additions & 4 deletions src/ibldsp/waveforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,10 @@ def iradon(w, sr, offset, fmin=0, fmax=None, slowness=None, N=1, mu=.1):

fmax = 1 / (sr * 2) if fmax is None else fmax
if slowness is None:
ds = 1 / fmax / (np.max(offset) - np.min(offset))
dx = np.median(np.abs(np.diff(offset)))
smax = 1 / dx / fmax
slowness = np.linspace(0, smax, int(np.ceil(smax / ds)))
ds = 1 / fmax / (np.max(offset) - np.min(offset))
dx = np.median(np.abs(np.diff(offset)))
smax = 1 / dx / fmax
slowness = np.linspace(0, smax, int(np.ceil(smax / ds)))

# Decompose les donnees sous la forme d'une somme d'ondes de vitesse 1./slowness
ns, nc = w.shape
Expand Down
1 change: 1 addition & 0 deletions src/spikeglx.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def __init__(
self.channel_conversion_sample2v = {"samples": np.ones(nc) * s2v}
if self._nsync > 0:
self.channel_conversion_sample2v["samples"][-nsync:] = 1
self.geometry = neuropixel.trace_header(version=1)
else:
# normal case we continue reading and interpreting the metadata file
self.file_meta_data = meta_file
Expand Down

0 comments on commit 3e485c7

Please sign in to comment.