Phy Waveform Plugin: remove strange waveforms in phy
- Download the plugin files
SettingsPlugin.py
,WaveformPlugin.py
,PSTHPlugin.py
,CorrelationPlugin.py
,SimilarityPlugin.py
on the GitHub repository. - Install
pandas
andneo
.
conda activate phy
pip install pandas
pip install neo
- Edit
C:/Users/UserName/.phy/phy_config.py
(create one if you do not have the directoryC:/Users/UserName/.phy
), and specify the plugin names to load in the GUI:
from phy import IPlugin
c = get_config()
c.TemplateGUI.plugins = ['SingleWaveformViewPlugin', 'SettingsPlugin', 'PSTHViewPlugin', 'CorrelationViewPlugin', 'SimilarityViewPlugin'] # list of plugin names to load in the TemplateGUI
c.Plugins.dirs = [r'C:\Users\jiumao\.phy\plugins'] # the directory where the plugins are located
- Open phy. The plugins will be loaded automatically.
- Click Menubar -> View -> Add SingleWaveformView
Ctrl + Left Click
the waveform inWaveformView
to select the channelCtrl + Click
to select the waveforms that intersect with the line you draw
Note:split
action will be faster with shorter line.
- Press
k
to split clusters or presss
to split clusters and label the minor cluster asnoise
.
- Click Menubar -> View -> Add PSTHView
- Click the menu bar to set the events, t_pre, t_post and bin width. Note: This plugin is only for certain BlackRock recordings.
- You should create
events.csv
andevent_labels.csv
in the data directory. - The event times should match to spike times.
Filename | Notes |
---|---|
events.csv | Each row is the timings of events |
event_labels.csv | Each element is the name of that event |
- The correlation between clusters. High correlation implys that one of the two clusters is misclassified by Kilosort and should be removed.
- Click Menubar -> View -> Add CorrelationView
- Click the menu bar to set the events, t_pre, t_post and bin width.
Ctrl + Click
to select the point and the corresponding clusters will be selected inClusterView
.
- The similarity between clusters. High similarity implys that the two clusters are similar and should be merged.
- Click Menubar -> View -> Add SimilarityMatrixView
- Click the menu bar to set the point size and types of similarity. Similarity of waveform / autocorrelogram / inter-spike interval is supported.
- Click
Change dim
in the menu would change the dimension of the view. Dimension 2 would generate the scatter plot of the two types of similarity from all pairs of good and mua clusters. Ctrl + Click
to select the point and the corresponding clusters will be selected inClusterView
.
- s: split clusters in
SingleWaveformView.py
and label the minor output cluster asnoise
.Undo
twice undo this action. Firstlyundo
the labelling process and secondlyundo
the splitting process. - -: defined in the
SettingsPlugin.py
. Apply the filterContamPct > 150
. - Alias ch: defined in the
SingleWaveformView.py
. Select the channel id in SingleWaveformView. It is useful when the channel of interest is not displayed in WaveformView. - Alias good: defined in the
SettingsPlugin.py
. Filter good clusters. - Alias mua: defined in the
SettingsPlugin.py
. Filter mua clusters. - Alias noise: defined in the
SettingsPlugin.py
. Filter noise clusters. - Alias goodmua or muagood: defined in the
SettingsPlugin.py
. Filter mua and good clusters. - Alias e: defined in the
PSTHView.py
. Change to the next event in PSTHView.
WaveformPlugin.py
: defines theSingleWaveformView
.SettingsPlugin.py
: changes the columns inClusterView
and adds shortcut-
.PSTHPlugin.py
: defines thePSTHView
.CorrelationPlugin.py
: defines theCorrelationView
.SimilarityPlugin.py
: defines theSimilarityMatrixView
.