forked from AOONIH/ephys
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_motion.py
More file actions
26 lines (21 loc) · 815 Bytes
/
plot_motion.py
File metadata and controls
26 lines (21 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import spikeinterface.full as si
import argparse
import yaml
import platform
from io_utils import posix_from_win
from spikeinterface import widgets
parser = argparse.ArgumentParser()
parser.add_argument('config_file')
args = parser.parse_args()
with open(args.config_file,'r') as file:
config = yaml.safe_load(file)
sys_os = platform.system().lower()
ceph_dir = Path(config[f'ceph_dir_{sys_os}'])
folder = ceph_dir / posix_from_win(r'X:\Dammy\ephys\DO79_2024-01-23_18-48-18_003\sorting\drift_corr_a')
motion_info = si.load_motion_info(folder)
motion_plot = si.plot_motion(motion_info,depth_lim=(400, 600),
color_amplitude=True, amplitude_cmap='inferno', scatter_decimate=10)
motion_plot.figure.show()