Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed May 31, 2024
1 parent 56e492c commit b53b35c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from __future__ import annotations

import json
import time
from pathlib import Path
import pickle

import numpy as np
import scipy.interpolate

from spikeinterface.core import get_noise_levels
from spikeinterface.sortingcomponents.peak_detection import detect_peaks
Expand All @@ -16,7 +13,6 @@
from spikeinterface.sortingcomponents.benchmark.benchmark_tools import Benchmark, BenchmarkStudy, _simpleaxis


import matplotlib.pyplot as plt
from spikeinterface.widgets import plot_probe_map

# import MEArec as mr
Expand All @@ -36,6 +32,7 @@ def get_gt_motion_from_unit_displacement(
spatial_bins,
direction_dim=1,
):
import scipy.interpolate

unit_displacements = unit_displacements[:, :, direction_dim]
times = np.arange(unit_displacements.shape[0]) / displacement_sampling_frequency
Expand Down Expand Up @@ -166,6 +163,7 @@ def plot_true_drift(self, case_keys=None, scaling_probe=1.5, figsize=(8, 6)):
self.plot_drift(case_keys=case_keys, tested_drift=False, scaling_probe=scaling_probe, figsize=figsize)

def plot_drift(self, case_keys=None, gt_drift=True, tested_drift=True, scaling_probe=1.0, figsize=(8, 6)):
import matplotlib.pyplot as plt

if case_keys is None:
case_keys = list(self.cases.keys())
Expand Down Expand Up @@ -231,6 +229,7 @@ def plot_drift(self, case_keys=None, gt_drift=True, tested_drift=True, scaling_p
# ax0.set_ylim()

def plot_errors(self, case_keys=None, figsize=None, lim=None):
import matplotlib.pyplot as plt

if case_keys is None:
case_keys = list(self.cases.keys())
Expand Down

0 comments on commit b53b35c

Please sign in to comment.