Hi Robin!
We consciously decided against that many many times to avoid a fat interface and ending up in a situation where we have to maintain hundreds of special functions in our interfaces (C++, Python, SLI). I mean, where would you stop? Input_SD.events["times"] could be get_spike_times(), Input_SD.events could be get_events(), and so on... Performing "function calls" via SetStatus is an easy way of achieving a minimal and maintainable interface and I have not yet seen an easier way to achieve the same. I am, however, open to suggestions!
On this specific topic, the documentation should definitely
improved, though.
Cheers,
Jochen!
As an aside, if `Input_SD.n_events = 0` is the canonical way of clearing a spike recorder, maybe a `clear` function could be added. That's a bit easier to document and find?
On Mon, 29 Nov 2021, 22:24 Jochen Martin Eppler, <j.eppler@fz-juelich.de> wrote:
_______________________________________________Dear Maryada,
I have just played a bit with your example (see attachment for a slightly extended and reformatted version) and as far as I can see, NEST behaves exactly as expected (and documented).
Please let me explain:
When using the recording backend
ascii
with the kernel attributeoverwrite_files
set toTrue
, you have to move files away at the location in your script sayingdo something
, otherwise the data files get overwritten by each new call toSimulate()
and you consequently get to see only the results from the last run (which is what you report).If you set
overwrite_files
toFalse
, and did not move the file away, you will get an error upon repeated calls toSimulate()
, as the file to be created by the backend already exists.When using the recording backend
memory
,overwrite_files
is not even considered, as that does not actually write files.Data just accumulates in the recording backend
memory
until it is explicitly cleared by runningInput_SD.n_events = 0
.See the linked backend documentation pages for more information.
I hope this helps to clear up things.
Cheers,
Jochen!On 29.11.21 18:32, Maryada Maryada wrote:
# do something hereDear NEST users,
I am trying to debug my network and I found that my spike_recorder with ascii option isn't working as expected.I am simulating a network for a few milliseconds (say 1000. ms) and then do some structure changes and then re-run for another phase of a few ms (say 4000. ms)
In the compact version, I am trying to see how this sample code would work.import nest
nest.ResetKernel()
nest.SetKernelStatus({
"overwrite_files": True,
"data_path": './Debug-Log',
"data_prefix": 'DEBUG-SPIKE-REC',
})
noise_device = nest.Create("poisson_generator",params={'start': 0.,'rate' : 100.})
sd_params = {
"record_to": 'ascii',
"label": "Input_spike_recorder"
}
Input_SD = nest.Create("spike_recorder",1, params=sd_params)
nest.Connect(noise_device,Input_SD)
nest.Simulate(100.)
nest.Simulate(100.)
Issue: I only get the data recorded from 100th millisecond but for memory, I get all the data from 0-200 ms.
This behavior is consistent for both overwrite_files as True and False.
In the previous version (v2.20) I also used the same approach and had no issues. Is there a newer way to do such a simulation paradigm?I didn't find anything on this on the comparison page of NESTv2.x and NESTv3.x
Am I missing something? It's really important for my work, I hope I could find a solution.
--
Thanks and Regards
Maryada
_______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org-- Dr. Jochen Martin Eppler Phone: +49(2461)61-96653 ---------------------------------- Simulation Laboratory Neuroscience Jülich Supercomputing Centre Institute for Advanced Simulation
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Volker Rieke
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr. Astrid Lambrecht,
Prof. Dr. Frauke Melchior
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org
_______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
-- Dr. Jochen Martin Eppler Phone: +49(2461)61-96653 ---------------------------------- Simulation Laboratory Neuroscience Jülich Supercomputing Centre Institute for Advanced Simulation