Getting a strange error when attempting to use the method myexp.select_units() to access only inter-neuronal or pyramidal units by spike width.
Seems like the code is raising an error in the following region of pixels:
@_cacheable
def get_spike_waveforms(self, units=None):
from phylib.io.model import load_model
from phylib.utils.color import selected_cluster_color
if units is None:
units = self.select_units()
paramspy = self.processed / 'sorted_stream_0' / 'params.py'
if not paramspy.exists():
raise PixelsError(f"{self.name}: params.py not found")
model = load_model(paramspy) <--------------------------------- Here --------------------------
rec_forms = {}
for unit in units:
# get the waveforms from only the best channel
spike_ids = model.get_cluster_spikes(unit)
best_chan = model.get_cluster_channels(unit)[0]
u_waveforms = model.get_waveforms(spike_ids, [best_chan])
if u_waveforms is None:
raise PixelsError(f"{self.name}: unit {unit} - waveforms not read")
rec_forms[unit] = pd.DataFrame(np.squeeze(u_waveforms).T)
assert rec_forms
df = pd.concat(
rec_forms,
axis=1,
names=['unit', 'spike']
)
# convert indexes to ms
rate = 1000 / int(self.spike_meta[0]['imSampRate'])
df.index = df.index * rate
return df
This is possibly due to phylib failing to load the file from the path in question? Unclear how to fix this though.
Getting a strange error when attempting to use the method
myexp.select_units()
to access only inter-neuronal or pyramidal units by spike width.Seems like the code is raising an error in the following region of pixels:
This is possibly due to phylib failing to load the file from the path in question? Unclear how to fix this though.