Skip to content

Commit

Permalink
Merge pull request #74 from samuelgarcia/some_fix
Browse files Browse the repository at this point in the history
make WaveformHeatMapView  optional to avoid compute waveforms that delete evything
  • Loading branch information
samuelgarcia authored Jul 19, 2024
2 parents 8a8096d + 1e41813 commit 7c90db9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 4 additions & 8 deletions spikeinterface_gui/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@



# TODO handle recordingless
# TODO handle return_scaled


Expand All @@ -53,13 +52,7 @@ def __init__(self, analyzer=None,parent=None, verbose=False, save_on_compute=Fal
self.external_sparsity = None
self.analyzer_sparsity = self.analyzer.sparsity


# Mandatory extensions : computation forced
wf_ext = self.analyzer.get_extension('waveforms')
if wf_ext is None:
wf_ext = analyzer.compute_one_extension('waveforms')
self.waveforms_ext = wf_ext

# Mandatory extensions : computation forced
ext = analyzer.get_extension('noise_levels')
if ext is None:
print('Force compute "noise_levels" is needed')
Expand All @@ -84,6 +77,9 @@ def __init__(self, analyzer=None,parent=None, verbose=False, save_on_compute=Fal
self.unit_positions = ext.get_data()[:, :2]

# Non mandatory extensions : can be None
wf_ext = self.analyzer.get_extension('waveforms')
self.waveforms_ext = wf_ext

self.pc_ext = analyzer.get_extension('principal_components')
self._pc_projections = None

Expand Down
6 changes: 5 additions & 1 deletion spikeinterface_gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ def __init__(self,analyzer, parent=None, verbose=False, curation=False, curatio

if 'tracemapview' in self.docks:
self.add_one_view('waveformview', tabify='traceview')
elif 'traceview' in self.docks:
self.add_one_view('waveformview', tabify='traceview')
else:
self.add_one_view('waveformview', area='right')

self.add_one_view('waveformheatmapview', tabify='waveformview')
self.add_one_view('isiview', tabify='waveformheatmapview')

next_tab = 'waveformheatmapview' if 'waveformheatmapview' in self.docks else 'waveformview'
self.add_one_view('isiview', tabify=next_tab)
self.add_one_view('crosscorrelogramview', tabify='isiview')
self.add_one_view('spikeamplitudeview', tabify='crosscorrelogramview') # optional

Expand Down
1 change: 1 addition & 0 deletions spikeinterface_gui/waveformheatmapview.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class WaveformHeatMapView(WidgetBase):
#~ {'name': 'sparse_display', 'type': 'bool', 'value' : True },
]

_depend_on = ['waveforms']

def __init__(self, controller=None, parent=None):
WidgetBase.__init__(self, parent=parent, controller=controller)
Expand Down

0 comments on commit 7c90db9

Please sign in to comment.