Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'probe_channel_number' should replace 'local_index' in ecephys_session, line 1244 (_build_mean_waveforms) #2573

Closed
ryan-gorzek opened this issue Oct 10, 2022 · 3 comments
Assignees
Labels
bug vcn Pertaining to visual coding neuropixels

Comments

@ryan-gorzek
Copy link

ryan-gorzek commented Oct 10, 2022

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.

@aamster aamster added the vcn Pertaining to visual coding neuropixels label Oct 10, 2022
@danielsf
Copy link
Contributor

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

#2444

@mikejhuang mikejhuang self-assigned this Nov 15, 2022
@morriscb
Copy link
Contributor

Duplicated by #2594

@morriscb
Copy link
Contributor

morriscb commented Dec 1, 2022

Work completed and bug should now be fixed for upcoming release candidate.

@morriscb morriscb closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug vcn Pertaining to visual coding neuropixels
Projects
None yet
Development

No branches or pull requests

5 participants