Skip to content

Commit 09d0930

Browse files
committed
correct path for passive data, filter passive based on units
1 parent 4caf135 commit 09d0930

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

atlaselectrophysiology/ephys_atlas_gui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,8 @@ def filter_unit_pressed(self, type):
11881188
self.img_corr_data = self.plotdata.get_correlation_data_img()
11891189
self.img_fr_data = self.plotdata.get_fr_img()
11901190
self.line_fr_data, self.line_amp_data = self.plotdata.get_fr_amp_data_line()
1191+
self.probe_rfmap, self.rfmap_boundaries = self.plotdata.get_rfmap_data()
1192+
self.img_stim_data = self.plotdata.get_passive_events()
11911193
self.img_init.setChecked(True)
11921194
self.line_init.setChecked(True)
11931195
self.probe_init.setChecked(True)
@@ -1546,7 +1548,6 @@ def qc_button_clicked(self):
15461548
if button.isChecked():
15471549
ephys_desc.append(button.text())
15481550

1549-
#ephys_desc = self.ephys_desc.currentText()
15501551
self.loaddata.upload_dj(align_qc, ephys_qc, ephys_desc)
15511552
self.complete_button_pressed()
15521553

atlaselectrophysiology/plot_data.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from brainbox.task import passive
88
import scipy
99
from PyQt5 import QtGui
10-
from scipy.linalg import svd
1110

1211
N_BNK = 4
1312
BNK_SIZE = 10
@@ -59,7 +58,8 @@ def __init__(self, alf_path, ephys_path):
5958
self.lfp_data_status = False
6059

6160
try:
62-
self.rf_map = alf.io.load_object(self.alf_path, object='passiveRFM', namespace='ibl')
61+
self.rf_map = alf.io.load_object(self.alf_path.parent, object='passiveRFM',
62+
namespace='ibl')
6363
if len(self.rf_map) == 2:
6464
self.rfmap_data_status = True
6565
else:
@@ -70,7 +70,7 @@ def __init__(self, alf_path, ephys_path):
7070
self.rfmap_data_status = False
7171

7272
try:
73-
self.aud_stim = alf.io.load_object(alf_path, object='passiveStims',
73+
self.aud_stim = alf.io.load_object(self.alf_path.parent, object='passiveStims',
7474
namespace='ibl')['table']
7575
if len(self.aud_stim) > 0:
7676
self.passive_data_status = True
@@ -79,7 +79,7 @@ def __init__(self, alf_path, ephys_path):
7979
self.passive_data_status = False
8080

8181
try:
82-
gabor = alf.io.load_object(alf_path, object='passiveGabor',
82+
gabor = alf.io.load_object(self.alf_path.parent, object='passiveGabor',
8383
namespace='ibl')['table']
8484
self.vis_stim = dict()
8585
self.vis_stim['leftGabor'] = gabor['start'][(gabor['position'] == 35) &
@@ -463,7 +463,7 @@ def get_rfmap_data(self):
463463
passive.get_rf_map_over_depth(rf_map_times, rf_map_pos, rf_stim_frames,
464464
self.spikes['times'][self.spike_idx][self.kp_idx],
465465
self.spikes['depths'][self.spike_idx][self.kp_idx],
466-
D_BIN=160)
466+
d_bin=160)
467467
rfs_svd = passive.get_svd_map(rf_map)
468468
img = dict()
469469
img['on'] = np.vstack(rfs_svd['on'])

0 commit comments

Comments
 (0)