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

[ENH] - Add spike time implementation of circular shuffle #199

Open
TomDonoghue opened this issue Mar 28, 2024 · 1 comment
Open

[ENH] - Add spike time implementation of circular shuffle #199

TomDonoghue opened this issue Mar 28, 2024 · 1 comment

Comments

@TomDonoghue
Copy link
Member

TomDonoghue commented Mar 28, 2024

From @LucaKolibius (but he didn't want to open an issue....)

Suggestion: have an option / implementation for circular shuffle that operates on spike times (adding different offsets) without converting to spike trains.

@LucaKolibius
Copy link

LucaKolibius commented Mar 28, 2024

(How I implemented it):
startRec = 0
endRec = np.max(task.session['end_time']) # Or however you store recording end
random_int = np.random.randint(startRec, endRec + 1) ## add a random time (this should be floats, but I doubt it makes a difference
spikes_shuf = spikes + random_int # spikes in timestamps
spikes_shuf[spikes_shuf > endRec] -= endRec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants