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

visualizations.raster improvements #54

Closed
lmcintosh opened this issue Jul 7, 2015 · 3 comments
Closed

visualizations.raster improvements #54

lmcintosh opened this issue Jul 7, 2015 · 3 comments

Comments

@lmcintosh
Copy link
Member

Would be nice if this were simpler; i.e. just take an (n,2) array of spike times and cell / trial ID

@leongjcs
Copy link

leongjcs commented Jul 7, 2015

I agree.

On Tue, Jul 7, 2015 at 2:22 PM Lane McIntosh notifications@github.com
wrote:

Would be nice if this were simpler; i.e. just take an (n,2) array of spike
times and cell / trial ID


Reply to this email directly or view it on GitHub
#54.

@nirum
Copy link
Member

nirum commented Jul 7, 2015

we should split the current code in visualizations.raster into two functions, one that splits a list of spike times into multiple trials given a trial length, and then the raster function should just take something like a two-column ndarray where the first is the spike times and the second is a label or index for that spike time.

e.g.:

raster(spk_array):
   plt.plot(spk_array[:,0], spk_array[:,1], '.');

This lets you use raster if you want to plot a raster across cells instead of trials, for example.

nirum pushed a commit that referenced this issue Jul 12, 2015
… splits a list of spike times into trials (spiketools.split_trials), and a simple raster function that just plots spikes given an array of labels (visualizations.raster). Closes #54
@nirum
Copy link
Member

nirum commented Jul 12, 2015

Thoughts, @bnaecker? This is a breaking change, but makes things simpler. Check out the modifications in the above commit

@nirum nirum closed this as completed Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants