Menu

#154 Reading of fields on an element depends on the width of stimulus applied

async13
closed
nobody
python (3)
1
2015-02-03
2015-01-25
dilawars
No

Two files are attached with this bug: 1) a model file of synapse 2) minimal python script which reproduce the bug.

I am doing the following:

  1. Load the model stargazin_synapse.g file
  2. Apply a pulse of Ca.
  3. Read the Ca conc from synapse.

The readout of Ca does not change according to applied Ca stimulus from the basal level of Ca in one case (when pulse of Ca is less than 5.0 second.) When a pulse is larger than 5.0 second, the Ca++ readout is in accordance of applied Ca++ pulse.

Following is the output in both cases.

~~~~~~~
import pylab
import moose
import numpy as np

modelFile = './stargazin_synapse.g'
modelPathInMoose = 'model'
method = 'old_gssa'

basal level of Ca++ in synapse

basalCaConc = 80e-6
modelId = moose.loadModel(modelFile, modelPathInMoose, method)
ca = moose.element('/model/kinetics/BULK/Ca')
ca.setField('concInit', 5e-2)

High value of Ca++, run for 4 sec.

moose.start(4.0)
ca.setField('concInit', 5e-9)
moose.start(40.0)

Now get the ca-conc

readH = moose.element('/model/graphs/conc1/Ca.Co')
caVec = readH.vector
print caVec
~~~~~~~~~~~~~~~~~~~~

OUTPUT:

Notice the absence of 5e-2 .

[  8.00000000e-05   5.00000000e-09   5.00000000e-09   5.00000000e-09
   5.00000000e-09]

Case 2: When high value was applied for longer than 5.0 sec.

~~~~~~
import pylab
import moose
import numpy as np

Import all helper functions.

modelFile = './stargazin_synapse.g'
modelPathInMoose = 'model'
method = 'old_gssa'
basalCaConc = 80e-6
modelId = moose.loadModel(modelFile, modelPathInMoose, method)
moose.reinit()
ca = moose.element('/model/kinetics/BULK/Ca')
ca.setField('concInit', 5e-2)
moose.start(10.0)
ca.setField('concInit', 5e-9)
moose.start(40.0)

Now get the ca-conc

readH = moose.element('/model/graphs/conc1/Ca.Co')
caVec = readH.vector
print caVec
~~~~~~~~~~

OUTPUT:

I can see 5e-2 here.

~~~~~~~~
[ 8.00000000e-05 5.00000000e-02 5.00000000e-09 5.00000000e-09
5.00000000e-09 5.00000000e-09]

~~~~~~~~~

Is it related with default clock settings? I checked that Shell::doStart is recieving correct values of runtime.

To make things complicated, in one of the other larger script in which I apply 1 sec long pulse of 5e-3 [Ca++] repeated each 20 seconds for over 1000 seconds, readout of [Ca++] is correct.

2 Attachments

Discussion

  • Upi Bhalla

    Upi Bhalla - 2015-01-27
    • status: open --> closed
     
  • Upi Bhalla

    Upi Bhalla - 2015-01-27

    The timestep for the Gsolve here is 10 seconds. So any run of less duration than this will not see any updates. If you set the clocks for the Gsolve and the graphs to, say, 1 second, it will work fine.
    Summary: Not a bug.

     

Anonymous
Anonymous

Add attachments
Cancel