You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am getting an assertion error while writing the cluster ID . it shd be an integer. Its also said it can be obtained using command line arguments.. i am struggling to find which argument is this?
Thanks in advance
The text was updated successfully, but these errors were encountered:
import sys
import matplotlib.pyplot as plt
from phylib.io.model import load_model
from phylib.utils.color import selected_cluster_color
First, we load the TemplateModel.
model = load_model(sys.argv[1]) # first argument: path to params.py
We obtain the cluster id from the command-line arguments.
cluster_id = int(sys.argv[2]) # second argument: cluster index
We get the waveforms of the cluster.
waveforms = model.get_cluster_spike_waveforms(cluster_id)
n_spikes, n_samples, n_channels_loc = waveforms.shape
We get the channel ids where the waveforms are located.
channel_ids = model.get_cluster_channels(cluster_id)
We plot the waveforms on the first four channels.
f, axes = plt.subplots(1, min(4, n_channels_loc), sharey=True)
for ch in range(min(4, n_channels_loc)):
axes[ch].plot(waveforms[::100, :, ch].T, c=selected_cluster_color(0, .05))
axes[ch].set_title("channel %d" % channel_ids[ch])
plt.show()
this is the code given in (https://phy.readthedocs.io/en/latest/visualization/)
i am getting an assertion error while writing the cluster ID . it shd be an integer. Its also said it can be obtained using command line arguments.. i am struggling to find which argument is this?
Thanks in advance
The text was updated successfully, but these errors were encountered: