Feature Requests and Tweaks
See original GitHub issueHey Cyrille,
We’ve been continuing to work on phy and we’ve solicited suggestions for changes from a number of other users. Below are some changes that we would love for you to incorporate into the main branch or implement as you see fit. There seems to be a consensus on the following suggestions on our end:
First a couple things which we’ve prototyped implementations of:
-
Normalization of templates before scaling in TemplateView.
Currently, the templates (which start off arbitrarily scaled) are then multiplied twice by amplitude. We think it makes more sense that each template is scaled to the mean waveform amplitude. We fix this with 23e15d5cef0e360a9ba2c3673ca04006d25e699c.
-
Shift+click on TemplateView to select multiple clusters.
Done with 735bc9bd3f7b9db3bac99814cc34448d8416a09c.
Next are some issues and additions relating to Amplitude view. These changes ensure apples-to-apples comparisons between clusters.
- Raw amplitude should show the maximum - minimum on the principle channel of the first selected cluster (by default at least, see #3 below) for all selected clusters, not on the principle channel of each cluster,. If amplitude for a cluster is not available on the principle channel of the first selected cluster (because its far away from the first selected cluster), plot zeros.
def get_spike_raw_amplitudes(self, spike_ids, channel_ids=None, **kwargs):
"""Return the maximum amplitude of the raw waveforms across all channels."""
# WARNING: extracting raw waveforms is long!
waveforms = self.model.get_waveforms(spike_ids, channel_ids)
if waveforms is None:
return
assert waveforms.ndim == 3 # shape: (n_spikes, n_samples, n_channels_loc)
return (waveforms.max(axis=1) - waveforms.min(axis=1)).max(axis=1)
In this function it seems that the raw amplitude is just the largest maximum - minimum considering all channels.
-
Template projections should be the projection of each spike shown onto the first selected cluster’s template, not projections onto its own clusters template
-
It would be good to be able to choose the channel from which AmplitudeView draws data (at least for ‘raw’ and ‘feature’ modes) in the same way that FeatureView responds to a ctrl+click on the WaveformView. That is, raw amplitudes/feature values would be calculated from the clicked channel instead of the principle channel of the first selected cluster. There would be no effect on the template amplitudes since there is only a single template projection (covering many channels) associated with each spike.
Lastly, various issues/requests raised by others:
-
Allow customization of the columns displayed in ClusterView (ordering, which to show, etc.)
-
Define the length of the displayed waveform in the WaveformView (currently a bit too long).
-
Increase default font size from 4 to 6 as in 82cadb79cf49170b4d49008e5d9b91c6ca9dc44d.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Thanks for the explanations and for your code propositions! So all of your suggestions should be implemented now in the dev branch (I merged your branch locally before making some changes so I had to close the pull request). I decided to have the
template
amplitude showing just the numbers saved inamplitudes.npy
with no further modifications, and adding a new amplitude type namedfeature_template
with your proposition (the dot product).Awesome, thanks Cyrille!