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

BinnedSpiketrain should accept a 0-1 matrix as an input #1

Open
mdenker opened this issue Apr 22, 2015 · 5 comments
Open

BinnedSpiketrain should accept a 0-1 matrix as an input #1

mdenker opened this issue Apr 22, 2015 · 5 comments
Assignees

Comments

@mdenker
Copy link
Member

mdenker commented Apr 22, 2015

Currently, the BinnedSpiketrain class only accepts a list of spiketrains as an input. However, it would be very useful to also be able to convert a numpy array of 01 values into a BinnedSpiketrain object:

a=np.zeros((10,10))
b=BinnedSpiketrain(a,tstart=0s,tstop=10s)

@alperyeg
Copy link

alperyeg commented Apr 24, 2015

First version see: here

@alperyeg alperyeg self-assigned this Jun 12, 2015
@alperyeg alperyeg assigned mdenker and alperyeg and unassigned alperyeg May 9, 2017
@alperyeg
Copy link

alperyeg commented May 9, 2017

Coming back to this function after two years I realized the functionality is a little different than desired from Michael's example. It requires quite a big restructuring of the Binned class and may need discussion, e.g. all internal consistency checks have to be circumvented when the input is a binary matrix.

@mdenker
Copy link
Member Author

mdenker commented May 10, 2017

Yes, I agree -- this means that the input must receive a completely different set of checks in terms of t_start, t_stop, number of bins, and bin width.

@alperyeg
Copy link

alperyeg commented Aug 7, 2017

I started to implement this in a new branch, see here.
It was not as complex as I had imaged and I could use most of the functionality the Binning class provides to check for consistency etc in a straightforward manner.
The functionality is mostly done, just need a few more unit tests.

@alperyeg
Copy link

alperyeg commented Aug 8, 2017

Free to review now.

dizcza pushed a commit that referenced this issue Jan 12, 2021
bibtex citation, doc style
Moritz-Alexander-Kern added a commit that referenced this issue Feb 2, 2022
mdenker pushed a commit that referenced this issue Mar 25, 2024
Total spiking probability edges , fix pep8 issues, refactor unittests
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

2 participants