PyNN icon indicating copy to clipboard operation
PyNN copied to clipboard

Fix StepCurrentSource

Open apdavison opened this issue 7 years ago • 2 comments

The test issue512 in test_electrodes.py has many conditional blocks for different backends.

step.times and step.amplitudes should give identical results for all backends, even if the internal representations are different, so we should aim to eliminate these conditional blocks.

apdavison avatar Jun 14 '18 11:06 apdavison

Unfortunately, at the moment step.times and step.amplitudes do not return identical results for all back-ends. For e.g. for: step = StepCurrentSource(times=[0.2, 0.6], amplitudes=[0.2, 0.6]) we get:

BRIAN

[0.0002, 0.0006000000000000001] [2.0000000000000003e-10, 6e-10]

NEST

<larray: base_value=array([0.1, 0.5]) shape=(2,) dtype=<class 'pyNN.parameters.Sequence'>, operations=[]> <larray: base_value=array([200., 600.]) shape=(2,) dtype=<class 'pyNN.parameters.Sequence'>, operations=[(, 1000.0)]>

NEURON

[0.2, 0.6000000000000001] [0.2, 0.6]

#452 also addresses a similar problem in the case of DCSource. So probably this needs to be fixed for all electrode types.

appukuttan-shailesh avatar Jul 05 '18 14:07 appukuttan-shailesh

@apdavison : Just to confirm... if we standardize the output formats across back-ends, do we employ the current NEURON format? (with handling of # of decimal places displayed)

appukuttan-shailesh avatar Jul 11 '18 08:07 appukuttan-shailesh