Closed ryan-gorzek closed 1 year ago
Thanks for the proactive diagnosis @gorzek-ryan
Whoever fixes this on main
is probably going to need to support both local_index
and probe_channel_number
, since we will still have legacy data out there that uses local_index
.
See discussion in
Duplicated by #2594
Work completed and bug should now be fixed for upcoming release candidate.
Running this code (from the ecephys_session example notebook):
units_of_interest = high_snr_unit_ids[:35]
waveforms = {uid: session.mean_waveforms[uid] for uid in units_of_interest} peak_channels = {uid: session.units.loc[uid, 'peak_channel_id'] for uid in units_of_interest}
plot_mean_waveforms(waveforms, units_of_interest, peak_channels) plt.show()
Results in KeyError: 'local_index', tracing back to line 1244 of /allensdk/brain_observatory/ecephys/ecephys_session.py.
I dug around a bit and from my understanding, 'local_index' was replaced by 'probe_channel_number' in some instances. I changed this instance of 'local_index' to 'probe_channel_number' in my local copy and was able to plot the mean waveforms without any error being thrown.