Changing Source Parameter from TF


#1

Hi :smile:

I tried to set the starting value of an SpikeSourcePoisson source on an periodic base, but it seems that the population is not a source any more (referring to the parameter from the error). Does someone know an workaround for that issue?

Brain def.:

pop_push = sim.Population(4, sim.SpikeSourcePoisson(rate=50.0, start=1000., duration=7000.))

Bibi def:

<populations population="push" xsi:type="Range" from="0" to="4"/>

TF code:

import hbp_nrp_cle.tf_framework as nrp
@nrp.MapVariable("timer_flag", initial_value=1.0)
@nrp.Robot2Neuron()
def frequent_call(t, timer_flag):
    #log the first timestep (20ms), each couple of seconds
    if (t%10.1>10.0) and (timer_flag.value == 1.0):
        clientLogger.info('ever 10s: ', t)
        timer_flag.value = 0.0     
        new_time = t + 1000.0       
        nrp.config.brain_root.push.set(start = new_time)
    if (t%10.1<1.0) and (timer_flag.value == 0.0):
        clientLogger.info('reset: ', t)
        timer_flag.value = 1.0

error in TF:

start(valid parameter for IF_curr_exp are, i_offset, tau_m, tau_refrac, tau_syn_E, tau_syn_I, v_reset, v_thresh)

#2

Hi,

Your population is named “pop_push”, but you are trying to access is as “push”:
nrp.config.brain_root.push.set(start = new_time)

have you tried
nrp.config.brain_root.pop_push.set(start = new_time) ?


#3

Hi, thanks for your answer.
Yes I tried it, but its giving the feedback:

'module' object has no attribute 'pop_push'

Furthermore, I tried this:

new_time = t + 1.0      
clientLogger.info('new_time: ', new_time)
nrp.config.brain_root.circuit[101:103].set(start = new_time)

It’s not returning any error message this way, but still not working (at least can’t see it spiking in the train). The adjustment of “newtime” might be necessary since time in the TF is in seconds not in ms as in the PyNN brain.