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

Calling nest.Disconnect #786

Closed
DaWelter opened this issue Jul 17, 2017 · 5 comments
Closed

Calling nest.Disconnect #786

DaWelter opened this issue Jul 17, 2017 · 5 comments
Assignees
Labels
I: User Interface Users may need to change their code due to changes in function calls S: High Should be handled next T: Bug Wrong statements in the code or documentation ZC: PyNEST DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL

Comments

@DaWelter
Copy link

DaWelter commented Jul 17, 2017

To my understanding it should be possible to call the Disconnect function as follows

import nest
nodes = nest.Create("iaf_psc_alpha", 5)
nest.Connect(nodes,
             nodes,
             { 'rule': 'all_to_all' })
#nest.Disconnect(nodes, nodes) # TypeError: Disconnect() takes exactly 4 arguments (2 given)
#nest.Disconnect(nodes, nodes, "all_to_all") # TypeError: Disconnect() takes exactly 4 arguments (3 given)
#nest.Disconnect(nodes, nodes, "all_to_all", {})  # pynestkernel.NESTError: TypeMismatch in Disconnect_g_g_D_D: The expected datatype is unknown in the current context.
nest.Disconnect(nodes, nodes, {'rule':  "all_to_all"}, {}) # pynestkernel.NESTError: BadProperty in Disconnect_g_g_D_D: Synapse spec must contain synapse model.

However each of these attempts gives the error appended in the comment.

In particular the last attempt appears odd to me because regarding the synapse spec, the documentation states "All parameters are optional and if not specified will use the default values determined by the current synapse model." (http://www.nest-simulator.org/pynest-api/)

Master branch - commit bbcdd91

@terhorstd terhorstd added ZC: PyNEST DO NOT USE THIS LABEL I: User Interface Users may need to change their code due to changes in function calls ZP: Pending DO NOT USE THIS LABEL S: High Should be handled next T: Bug Wrong statements in the code or documentation labels Jul 24, 2017
@Silmathoron
Copy link
Member

This is indeed a bug and a test for the Disconnect function should be added to pynest/nest/tests/test_sp/test_disconnect.py once it's solved.
In the meantime, you can have a look at the DisconnectOneToOne function, though this is only a temporary and not very satisfactory patch... I'm afraid not many people use Disconnect, which is why it stayed undetected.
Could you tell us your use case?

@DaWelter
Copy link
Author

DaWelter commented Aug 7, 2017

Thanks for your help.
I want to experiment with SNN control and machine learning.
I connected a multimeter to output neurons in order to measure their membrane potential over a brief simulation period. I found no way to "clear" the data in the multimeter for the next period. So I figured I might just disconnect the old meter and create a new one. (I don't really know what I am doing ...)
Now I guess a better alternative is to use a IAF neuron with a very high threshold as an integrator.

@abigailm
Copy link
Contributor

abigailm commented Aug 7, 2017 via email

@DaWelter
Copy link
Author

DaWelter commented Aug 7, 2017

Hi,
I'll keep your suggestion in mind. I suppose it will work. But first I will try the idea with the integrator neuron. ;-) Properly configured it could act as a low pass filter I believe. Anyway, I think I'm good.
Thanks again.
Best regards.

@terhorstd
Copy link
Contributor

issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: User Interface Users may need to change their code due to changes in function calls S: High Should be handled next T: Bug Wrong statements in the code or documentation ZC: PyNEST DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL
Projects
None yet
Development

No branches or pull requests

5 participants