[CLOSED] Referencing time in a TF


#1

Hello,
How can I assign a spike time to a neuron from a transfer function (using nest)? I was trying to use the variable t that is available in TFs and use the following code that adds the current time to the spike_times array of a neuron:

nest.SetStatus(nrp.config.brain_root.pp.neuron, {"spike_times":np.append(nest.GetStatus(nrp.config.brain_root.pp.neuron, "spike_times")[0], [t])})

but I get the following error:

(“BadProperty in SetStatus_id: Setting status of a ‘spike_generator’ with GID 2401: spike_generator: Time point 4.76 is not representable in current resolution.”, ‘BadProperty’, <SLILiteral: SetStatus_id>, “: Setting status of a ‘spike_generator’ with GID 2401: spike_generator: Time point 4.76 is not representable in current resolution.”) (Runtime)

Best regards,
Mikołaj Miękus


#2

Ok, this error is caused by the fact that nests computes time in ms and the NRP in seconds. Is there a way to unify that?

Moreover, how can I make a generator simply spike once in a time step? I can set the rates of NRP’s generators but that is not what need. I tried the following piece of nest code. It works in Jupyter Notebook but not in the NRP.

nest.SetStatus(neuron, {"spike_times":np.append(nest.GetStatus(neuron, 
            "spike_times")[0], [time])})

nest.Simulate(timestep)  # Changing that to proceeding to the next 
time += timestep         # NRP timestep doesn't help
        
nest.GetStatus(spike_detector)[0]["events"]

The spike times are appended (I tried using both the NRP’s time tracker and manual time counting described above) but they do not seem to be executed and no spikes can be detected (neither by nest.GetStatus nor by NRP’s detectors).


#3

Hi, you can’t step nest in a transfer function if that’s what you are trying to do. The only way to spike in a TF is to get a reference on a spike source using nest or nrp api and trigger spike output from there.


#4

I found out that NRP considered the time I tried to assign as one that have already passed, so it did not evoked any spikes. It helped when I assigned a slightly later time.
Best,
Mikołaj