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

[Feature request] - Add neural responses to events on GUI to align histology/ephys #16

Closed
GaelleChapuis opened this issue Aug 24, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request working-on-it

Comments

@GaelleChapuis
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Add RF mapping / plotting auditory response in the GUI for aligning ephys-histology.

Describe the solution you'd like
Receptive fields for single units (or multi-unit per depth, TBD) ; auditory responses per unit (raster+Psth; separately for GoCue and NoiseCue)

Describe alternatives you've considered
Datajoint view, but not as practical to use during the alignment process.

Additional context
Recycle code from certification for RF.
https://github.com/int-brain-lab/iblapps/tree/develop/atlaselectrophysiology

@GaelleChapuis GaelleChapuis added the enhancement New feature or request label Aug 24, 2020
@nsteinme
Copy link

For RF maps suggest to bin spikes by depth to get multi-unit of all neurons in a certain depth bin (e.g. use 80 µm). Then plot map and response, like in this image. The way you do this is count spikes for the unit at each time offset (e.g. use 10 ms bin size in the window -0.05 to 0.2) around each stimulus flash, then average across all trials separately for each stimulus position. This gives you a matrix of average counts that is size nPositions x nTimeBins. Take the SVD of this matrix. Reshape the first spatial component to make a 2d matrix and plot it as an image (the map). Plot the first temporal component as the response over time.
image

@nsteinme
Copy link

nsteinme commented Aug 25, 2020

For auditory responses, just bin the spikes as before and plot the mean PSTH following auditory stimulus onset (I would consider goCue, noiseCue, and rewardValve - and use the passive time window for this). Plot this PSTH matrix as an image, like this
image

@nsteinme
Copy link

Worth thinking about how to make the GUI extensible. E.g. providing RF map data should be its own thing and the user should just be required to provide a three-column matrix with columns X position, Y position, and time of flash. But for event PSTHs you could have a generic mode where they provide any number of vectors containing event times, e.g. with filenames like "event_gocue.npy" and it can plot them with a label of whatever's after "event_".

@GaelleChapuis
Copy link
Collaborator Author

Plots are now integrated in the GUI for sessions with PassiveCW data extracted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request working-on-it
Projects
None yet
Development

No branches or pull requests

3 participants