cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
314 stars 157 forks source link

Missing Amplitudeview #1242

Open hbirge06 opened 9 months ago

hbirge06 commented 9 months ago

I recently updated my version of Phy to the most recent version using the 'pip install git+https://github.com/cortex-lab/phy.git' command, but now I am unable to see anything in the Amplitudeview box and the window is appearing but it is completely blank apart from the reference grid. It seems to be happening on all the data, including ones that showed the amplitudeview correctly when running Phy in the past (using the previous versions). I'm also not getting any error messages, so any advice on where to look for a solution would be appreciated! Thanks.

Antho2422 commented 9 months ago

Hi @hbirge06,

Can you please send me the dat_path in your params.py file ? I've been experiencing some similar issues and it was due to the fact that the path to my phy folder was too long.

Maybe your issue is similar !

Cheers, Anthony

EricKenjiLee commented 6 months ago

I'm running into the same error but it doesn't seem to do with path name length. Below is my path for params.py and I still receive a blank AmplitudeView. /home/chandlab/Kilosort4 Data/deleteme/params.py.

The error used to occur infrequently but now happens any time I open any file with Phy, even those I've never opened before. I can sometimes get it to load a plot if I switch from "Features" to "Templates" in the AmplitudeView options but the viewer will not update if I select a different cluster even if I change from "Features" to "Templates again (it displays the previously loaded plot from a different cluster).

Here is Phy (Python 3.11.8 on Ubuntu 22.04.3 LTS; ) launched with debug on which seems normal to me.

phy template-gui params.py --debug 20:56:09.848 [D] init:68 Start capturing exceptions. 20:56:10.204 [D] model:619 Loading spike clusters. 20:56:10.358 [W] model:625 Unreferenced clusters found in spike_clusters (generally not a problem) 20:56:10.508 [D] model:569 No channel shank file found. 20:56:10.508 [D] model:692 Loading templates. 20:56:10.512 [D] model:724 Templates are dense. 20:56:11.587 [D] model:671 Loading spikes subset waveforms to avoid fetching waveforms from raw data. 20:56:11.590 [D] model:730 Loading the whitening matrix. 20:56:11.591 [D] model:737 Loading the inverse of the whitening matrix. 20:56:11.591 [D] model:766 Loading features. 20:56:11.591 [D] model:803 Loading template features. 20:56:11.597 [D] model:530 Load spike_detection_templates.npy. 20:56:11.613 [D] model:530 Load spike_positions.npy. 20:56:11.614 [D] model:504 Load cluster_KSLabel.tsv. 20:56:11.614 [D] model:504 Load cluster_Amplitude.tsv. 20:56:11.615 [D] model:504 Load cluster_group.tsv. 20:56:11.615 [D] model:504 Load cluster_ContamPct.tsv. 20:56:11.699 [D] context:100 Initialize joblib cache dir at /home/chandlab/Kilosort4 Data/deleteme/.phy. 20:56:11.699 [D] context:101 Reducing the size of the cache if needed. 20:56:11.713 [D] base:102 Add filter high_pass. 20:56:11.713 [D] config:31 Load config file /home/chandlab/.phy/phy_config.py. 20:56:11.713 [D] plugin:74 Scanning /home/chandlab/.phy/plugins. 20:56:11.713 [D] plugin:78 Found plugin module umap_view.py. 20:56:11.713 [D] plugin:36 Register plugin umap_view.ExampleWaveformUMAPPlugin. 20:56:11.714 [D] plugin:145 Loading 1 plugins. 20:56:11.714 [W] plugin:151 The plugin umap_view couldn't be found. 20:56:11.714 [D] context:126 Load memcache for phy.apps.base._get_mean_waveforms. 20:56:11.714 [D] context:126 Load memcache for phy.apps.base._get_mean_waveforms. 20:56:11.714 [D] context:126 Load memcache for phy.apps.base._get_template_waveforms. 20:56:11.714 [D] context:126 Load memcache for phy.apps.base.get_mean_spike_template_amplitudes. 20:56:11.714 [D] context:126 Load memcache for phy.apps.base.get_template_counts. 20:56:11.714 [D] context:126 Load memcache for phy.apps.base.get_template_for_cluster. 20:56:11.715 [D] context:126 Load memcache for phy.apps.template.gui.get_template_amplitude. 20:56:11.715 [D] context:126 Load memcache for phy.apps.base.get_cluster_amplitude. 20:56:11.715 [D] context:126 Load memcache for phy.apps.base.get_mean_firing_rate. 20:56:11.715 [D] context:126 Load memcache for phy.apps.base.get_best_channel. 20:56:11.715 [D] context:126 Load memcache for phy.apps.template.gui.get_best_channels. 20:56:11.716 [D] context:126 Load memcache for phy.apps.base.get_channel_shank. 20:56:11.716 [D] context:126 Load memcache for phy.apps.base.get_probe_depth. 20:56:11.716 [D] context:126 Load memcache for phy.apps.base.peak_channel_similarity. 20:56:11.795 [D] context:185 Save data to /home/chandlab/Kilosort4 Data/deleteme/.phy/spikes_per_cluster.pkl. 20:56:11.864 [D] gui:463 Creating GUI. 20:56:11.867 [D] state:46 Load /home/chandlab/.phy/TemplateGUI/state.json for GUIState. 20:56:11.867 [D] state:46 Load /home/chandlab/Kilosort4 Data/deleteme/.phy/state.json for GUIState. 20:56:11.929 [D] gui:718 Add view ClusterView to GUI. 20:56:11.931 [D] gui:718 Add view SimilarityView to GUI. 20:56:11.945 [D] gui:718 Add view WaveformView to GUI. 20:56:11.946 [D] base:337 Set state for WaveformView. 20:56:11.951 [D] gui:718 Add view CorrelogramView to GUI. 20:56:11.952 [D] base:337 Set state for CorrelogramView. 20:56:11.962 [D] gui:718 Add view ISIView to GUI. 20:56:11.963 [D] base:337 Set state for ISIView. 20:56:11.968 [D] gui:718 Add view FeatureView to GUI. 20:56:11.969 [D] base:337 Set state for FeatureView. 20:56:11.978 [D] gui:718 Add view AmplitudeView to GUI. 20:56:11.979 [D] base:337 Set state for AmplitudeView. 20:56:11.989 [D] gui:718 Add view FiringRateView to GUI. 20:56:11.989 [D] base:337 Set state for FiringRateView. 20:56:12.295 [D] gui:718 Add view TraceView to GUI. 20:56:12.296 [D] base:337 Set state for TraceView. 20:56:12.296 [D] base:494 Set color scheme to random. 20:56:12.512 [D] base:1626 Adding default color schemes to TraceView. 20:56:12.713 [D] gui:718 Add view ProbeView to GUI. 20:56:12.714 [D] base:337 Set state for ProbeView. 20:56:12.726 [D] gui:718 Add view ClusterScatterView to GUI. 20:56:12.727 [D] base:337 Set state for ClusterScatterView. 20:56:12.727 [D] base:494 Set color scheme to random. 20:56:12.728 [D] base:1626 Adding default color schemes to ClusterScatterView. 20:56:12.745 [D] gui:718 Add view SpikePositionsView to GUI. 20:56:12.745 [D] base:337 Set state for SpikePositionsView. 20:56:12.757 [D] gui:519 Load the geometry state. 20:56:13.043 [D] supervisor:817 Clusters selected: [248] (253)

gkBCCN commented 6 months ago

Hey @EricKenjiLee. I had a similar issue and your post helped me to fix it (partially). So first of all, thanks for that! It's actually so simple that maybe you overlooked it as I did:

  1. Make sure that the refresh button is clicked in the AmplitudeView (looks like recycle circle). It should be gray like the other refresh buttons in the other views.
  2. Make sure that you are using template amplitude instead of feature amplitude. Even if you have template selected, it won't show if you don't have refresh activated from the first step.

In my case, I'm having some feature loading issues, so anything that is related to features won't work, including the feature amplitude. That may not be your problem, but if so this will allow you to at least view the template amplitude.