Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
julienboussard committed Jan 19, 2024
2 parents 58e9e3a + 8b19706 commit c29f13f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/dartsort/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from .config import *
from .localize.localize_util import (localize_amplitude_vectors, localize_hdf5,
localize_waveforms)
from .main import (DARTsortSorting, ObjectiveUpdateTemplateMatchingPeeler,
SubtractionPeeler, check_recording, cluster, dartsort,
match, run_peeler, split_merge, subtract)
from .peel.grab import GrabAndFeaturize
from .transform import WaveformPipeline
from .util.waveform_util import make_channel_index
2 changes: 1 addition & 1 deletion src/dartsort/cluster/relocate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def relocated_waveforms_on_static_channels(
)
rescaling = target_amplitudes / original_amplitudes
shifted_waveforms *= rescaling[:, None, :]

if two_d:
shifted_waveforms = shifted_waveforms[:, 0, :]

Expand Down
5 changes: 3 additions & 2 deletions src/dartsort/util/data_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,15 @@ def from_peeling_hdf5(
channels_dataset="channels",
labels_dataset="labels",
load_simple_features=True,
labels=None,
):
channels = labels = None
channels = None
with h5py.File(peeling_hdf5_filename, "r") as h5:
times_samples = h5[times_samples_dataset][()]
sampling_frequency = h5["sampling_frequency"][()]
if channels_dataset in h5:
channels = h5[channels_dataset][()]
if labels_dataset in h5:
if labels_dataset in h5 and labels is None:
labels = h5[labels_dataset][()]

n_spikes = len(times_samples)
Expand Down

0 comments on commit c29f13f

Please sign in to comment.