Skip to content

Commit 472d307

Browse files
committed
flake
1 parent 16b2ce8 commit 472d307

File tree

4 files changed

+11
-22
lines changed

4 files changed

+11
-22
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ exclude =
88
data_exploration_gui/
99
launch_phy/
1010
histology/
11-
11+
qt_matplotlib.py

atlaselectrophysiology/ephys_gui_setup.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def init_layout(self, main_window, offline=False):
1616
main_widget = QtWidgets.QWidget()
1717
self.setCentralWidget(main_widget)
1818

19-
#self.init_menubar()
2019
self.init_interaction_features()
2120
self.init_figures()
2221

@@ -107,7 +106,7 @@ def init_menubar(self):
107106
for stim in stim_type:
108107
img = QtGui.QAction(stim, self, checkable=True, checked=False)
109108
img.triggered.connect(lambda checked, item=stim: self.plot_image(
110-
self.img_stim_data[item]))
109+
self.img_stim_data[item]))
111110
img_options.addAction(img)
112111
self.img_options_group.addAction(img)
113112

@@ -138,14 +137,6 @@ def init_menubar(self):
138137
probe_rmsLFP = QtGui.QAction('rms LFP', self, checkable=True, checked=False)
139138
probe_rmsLFP.triggered.connect(lambda: self.plot_probe(self.probe_rms_LFPdata))
140139

141-
142-
143-
#probe_on_rfmap = QtGui.QAction('RF Map - On', self, checkable=True, checked=False)
144-
#probe_on_rfmap.triggered.connect(lambda: self.plot_probe(self.probe_rfmap_on_data,
145-
# bounds=self.rfmap_boundaries))
146-
#probe_off_rfmap = QtGui.QAction('RF Map - Off', self, checkable=True, checked=False)
147-
#probe_off_rfmap.triggered.connect(lambda: self.plot_probe(self.probe_rfmap_off_data,
148-
# bounds=self.rfmap_boundaries))
149140
# Initialise with rms of AP probe plot
150141
self.probe_init = probe_rmsAP
151142

@@ -178,7 +169,6 @@ def init_menubar(self):
178169
probe_options.addAction(probe)
179170
self.probe_options_group.addAction(probe)
180171

181-
182172
# SLICE PLOTS MENU BAR
183173
# Define all coronal slice plot options
184174
slice_hist_rd = QtGui.QAction('Histology Red', self, checkable=True, checked=True)
@@ -489,7 +479,6 @@ def init_interaction_features(self):
489479
ephys_qc_label = QtGui.QLabel("QC for ephys recording")
490480
self.ephys_qc = QtGui.QComboBox()
491481
self.ephys_qc.addItems(["Pass", "Warning", "Critical"])
492-
#ephys_desc_label = QtGui.QLabel("Describe problem with recording")
493482

494483
self.desc_buttons = QtWidgets.QButtonGroup()
495484
self.desc_group = QtWidgets.QGroupBox("Describe problem with recording")
@@ -780,4 +769,4 @@ def handleItemPressed(self, index):
780769
if item.checkState() == QtCore.Qt.Checked:
781770
item.setCheckState(QtCore.Qt.Unchecked)
782771
else:
783-
item.setCheckState(QtCore.Qt.Checked)
772+
item.setCheckState(QtCore.Qt.Checked)

atlaselectrophysiology/plot_data.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ def get_rfmap_data(self):
468468
img = dict()
469469
img['on'] = np.vstack(rfs_svd['on'])
470470
img['off'] = np.vstack(rfs_svd['off'])
471-
yscale = ((np.max(self.chn_coords[:, 1]) - np.min(self.chn_coords[:, 1]))
472-
/ img['on'].shape[0])
471+
yscale = ((np.max(self.chn_coords[:, 1]) - np.min(
472+
self.chn_coords[:, 1])) / img['on'].shape[0])
473473
xscale = 1
474474
levels = np.quantile(np.c_[img['on'], img['off']], [0, 1])
475475

@@ -493,7 +493,7 @@ def get_passive_events(self):
493493
stim_keys = ['valveOn', 'toneOn', 'noiseOn', 'leftGabor', 'rightGabor']
494494
data_img = dict()
495495
if not self.passive_data_status and not self.gabor_data_status:
496-
return data_img
496+
return data_img
497497
elif not self.passive_data_status and self.gabor_data_status:
498498
stim_types = ['leftGabor', 'rightGabor']
499499
stims = self.vis_stim
@@ -515,17 +515,17 @@ def get_passive_events(self):
515515
base_stim=base_stim)
516516

517517
for stim_type, z_score in stim_events.items():
518-
xscale = (post_stim + pre_stim)/z_score.shape[1]
519-
yscale = ((np.max(self.chn_coords[:, 1]) - np.min(self.chn_coords[:, 1]))
520-
/ z_score.shape[0])
518+
xscale = (post_stim + pre_stim) / z_score.shape[1]
519+
yscale = ((np.max(self.chn_coords[:, 1]) - np.min(
520+
self.chn_coords[:, 1])) / z_score.shape[0])
521521

522522
levels = [-10, 10]
523523

524524
stim_data = {stim_type: {
525525
'img': z_score.T,
526526
'scale': np.array([xscale, yscale]),
527527
'levels': levels,
528-
'offset': np.array([-1*pre_stim, 0]),
528+
'offset': np.array([-1 * pre_stim, 0]),
529529
'cmap': 'bwr',
530530
'xrange': [-1 * pre_stim, post_stim],
531531
'xaxis': 'Time from Stim Onset (s)',

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
packages=find_packages(),
1010
include_package_data=True,
1111
install_requires=require
12-
)
12+
)

0 commit comments

Comments
 (0)