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

Make recording a mechanism #151

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Make recording a mechanism #151

merged 1 commit into from
Nov 3, 2023

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Nov 3, 2023

Update API to insert recordings. The new way is closer to how NEURON does it and it allows removing some boilerplate code.

Old API

recs = [nx.Recording(cell_ind, 0, 0.0) for cell_ind in range(num_cells)]
s = nx.integrate(network, stimuli=stims, recordings=recs, delta_t=dt)

New API

for cell_ind in range(num_cells):
    network.cell(cell_ind).branch(0).comp(0.0).record()

s = nx.integrate(network, stimuli=stims, delta_t=dt)

@michaeldeistler
Copy link
Contributor Author

@coschroeder FYI

@michaeldeistler michaeldeistler merged commit 3046bf7 into main Nov 3, 2023
1 check passed
@michaeldeistler michaeldeistler deleted the rec-mech branch November 3, 2023 15:17
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

Successfully merging this pull request may close these issues.

1 participant