Hello Alice,
Setting repeated recording windows is currently not possible (but maybe create a feature request on Github). What you can do is the following
n1 = nest.Create('iaf_psc_delta', params={'I_e': 1000.}) n2 = nest.Create('iaf_psc_delta') wr = nest.Create('weight_recorder', params={'origin': 0., 'start': 0, 'stop': 1000}) nest.CopyModel('stdp_synapse', 'stdp_synapse_rec', {'weight_recorder': wr}) nest.Connect(n1, n2, syn_spec={'synapse_model': 'stdp_synapse_rec', 'weight': 20}) nest.Connect(n2, sr)
t_block = 5000
for k in range(10): wr.origin = k * t_block nest.Simulate(t_block)
This will simulate in 5s blocks and record weights only during the first 1s of each block. The actual recording windows are given by (origin+start, origin+stop]. You need to do this with Simulate() calls since you need to change the origin parameter; therefore RunManager + run() does not work.
You could also record to file if that is an option for your workflow, by setting wr.record_to = 'ascii'. If you want to combine that with a loop, you need to set wr.label to a different value for each loop iteration, otherwise data will be overwritten for each round through the loop.
Best, Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser Head, Department of Data Science
Faculty of Science and Technology Norwegian University of Life Sciences PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560 Email hans.ekkehard.plesser@nmbu.nomailto:hans.ekkehard.plesser@nmbu.no Home http://arken.nmbu.no/~plesser
From: Alice Geminiani alice.geminiani@polimi.it Reply to: NEST User Mailing List users@nest-simulator.org Date: Friday, 11 November 2022 at 18:47 To: "users@nest-simulator.org" users@nest-simulator.org Subject: [NEST Users] weight_recorder with large number of synapses
Some people who received this message don't often get email from alice.geminiani@polimi.it. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification Dear NEST users,
I am trying to record weights from a network with about 1.5 million synapses, for simulations of a 30-minute protocol, and using the weight_recorder causes memory errors. Is there a way to record only in specific time instants of the simulation (e.g. every 5 minutes)?
Thanks a lot!
Cheers, Alice
----------------------------
Alice Geminiani, PhD
PostDoctoral Researcher
NeuroEngineering And medical Robotics Laboratory - NEARLab
Department of Electronics, Information and Bioengineering - DEIB
Politecnico di Milano
Neurocomputational laboratory Department of Brain and Behavioral Sciences University of Pavia