Precise onset and offset on DC_Source mapping


#1

Hi,

I need to send a strong inhibitory signal that lasts a few milliseconds (from 4.0 ms to 15 ms) to a layer in my neural network. However, the transfer function tick time is 20 ms.

I thought something like this could do the trick (the three last lines of the TF are the trick):

@nrp.MapSpikeSource(‘groupDampInput’, nrp.map_neurons(range(nrp.config.brain_root.nOrinrp.config.brain_root.oriRowsnrp.config.brain_root.oriCols), lambda i: nrp.brain.V2Layer23Int[i]), nrp.dc_source, amplitude=0.0)
@nrp.MapVariable( ‘isGrouping’, scope=nrp.GLOBAL, initial_value=False)
@nrp.Robot2Neuron()
def LAM2_trigger_groups(t, groupDampInput, isGrouping):

# Triggers grouping mechanism after a saccade
if isGrouping.value:
    # Parameters initialization
    nOri      = nrp.config.brain_root.nOri
    nRows     = nrp.config.brain_root.oriRows
    nCols     = nrp.config.brain_root.oriCols
    dampInput = nrp.config.brain_root.dampingInput
    # Damping delays for maximum 8 orientations
    dampingDelays = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0]  # in ms
    # Send the grouping signal for each orientation
    for k in range(nOri):
        if dampingDelays[k] > 0.0:
            for i in range(k*nRows*nCols,(k+1)*nRows*nCols):
                groupDampInput[i].amplitude = -dampInput
                groupDampInput[i].start     = t*1000.0  # TF time (t) is in seconds, but "start" time is in ms
                groupDampInput[i].stop      = t*1000.0+dampingDelays[k]

But this did not work… Actually the amplitude is set successfully, but the inhibitory input just never stops.

Anyone has an idea of why this fails, or of how I could go around the tick time problem?

Thanks a lot for any help!
Alban


Spike Injection in the NRP
#2

Hi Alban,

You can customize the NRP timestep in the bibi file with the following tag:

500
sets it to 500 ms for example.

Hope this helps


#3

Hi Alban,

I would also point out, maybe the DC source is not what you need for this purpose.
You can check out the other possibilities there:

https://bitbucket.org/hbpneurorobotics/cle/src/development/hbp_nrp_cle/hbp_nrp_cle/brainsim/pynn/devices/

There’s a __PyNNFixedSpikeGenerator.py but I am not sure if this works, I think it has not been used in a while.


#4

@vonarnim ok thanks: do you think it will have an huge effect on simulation performance? to be really precise, I would need a 1ms second precision

@jacques cool! what I want is to mimic exactly the NEST version of my neural network. So I need a DCSource. But of course, the same behaviour could be retrieved with a spike generator.

I still have a question… do you have any idea why the solution presented in my first post does not work? Why is the DCSource.stop parameter not taken into account? I thought that PyNN running in the background had its own simulation time step (1ms for me)?

Thanks for the help in any case


#5

1ms will most certainly not work properly and have huge task switching kind of overhead. But you can try it and report here.