Ejemplo n.º 1
0
 /// <summary>
 /// Constructs an initialized instance
 /// </summary>
 /// <param name="timeScale">Membrane time scale (ms)</param>
 /// <param name="resistance">Membrane resistance (Mohm)</param>
 /// <param name="restV">Membrane rest potential (mV)</param>
 /// <param name="resetV">Membrane reset potential (mV)</param>
 /// <param name="rheobaseV">Membrane rheobase threshold (mV)</param>
 /// <param name="firingThresholdV">Membrane firing threshold (mV)</param>
 /// <param name="sharpnessDeltaT">Sharpness of membrane potential change (mV)</param>
 /// <param name="adaptationVoltageCoupling">Adaptation voltage coupling (nS)</param>
 /// <param name="adaptationTimeConstant">Adaptation time constant (ms)</param>
 /// <param name="adaptationSpikeTriggeredIncrement">Spike triggered adaptation increment (pA)</param>
 /// <param name="solverMethod">ODE numerical solver method</param>
 /// <param name="solverCompSteps">ODE numerical solver computation steps of the time step</param>
 public AdExpIF(double timeScale,
                double resistance,
                double restV,
                double resetV,
                double rheobaseV,
                double firingThresholdV,
                double sharpnessDeltaT,
                double adaptationVoltageCoupling,
                double adaptationTimeConstant,
                double adaptationSpikeTriggeredIncrement,
                ODENumSolver.Method solverMethod,
                int solverCompSteps
                )
     : base(PhysUnit.ToBase(restV, PhysUnit.MetricPrefix.Milli),
            PhysUnit.ToBase(resetV, PhysUnit.MetricPrefix.Milli),
            PhysUnit.ToBase(firingThresholdV, PhysUnit.MetricPrefix.Milli),
            0,
            solverMethod,
            PhysUnit.ToBase(1, PhysUnit.MetricPrefix.Milli),
            solverCompSteps,
            2,
            PhysUnit.FromBase(1d, PhysUnit.MetricPrefix.Giga),
            PhysUnit.FromBase(1d, PhysUnit.MetricPrefix.Milli)
            )
 {
     _timeScale                         = PhysUnit.ToBase(timeScale, PhysUnit.MetricPrefix.Milli);
     _resistance                        = PhysUnit.ToBase(resistance, PhysUnit.MetricPrefix.Mega);
     _rheobaseV                         = PhysUnit.ToBase(rheobaseV, PhysUnit.MetricPrefix.Milli);
     _sharpnessDeltaT                   = PhysUnit.ToBase(sharpnessDeltaT, PhysUnit.MetricPrefix.Milli);
     _adaptationVoltageCoupling         = PhysUnit.ToBase(adaptationVoltageCoupling, PhysUnit.MetricPrefix.Nano);
     _adaptationTimeConstant            = PhysUnit.ToBase(adaptationTimeConstant, PhysUnit.MetricPrefix.Milli);
     _spikeTriggeredAdaptationIncrement = PhysUnit.ToBase(adaptationSpikeTriggeredIncrement, PhysUnit.MetricPrefix.Piko);
     _evolVars[VarAdaptationOmegaIdx]   = 0;
     return;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs an initialized instance
 /// </summary>
 /// <param name="membraneTimeScale">Membrane time scale (ms)</param>
 /// <param name="membraneResistance">Membrane resistance (Mohm)</param>
 /// <param name="restV">Membrane rest potential (mV)</param>
 /// <param name="resetV">Membrane reset potential (mV)</param>
 /// <param name="rheobaseThresholdV">Membrane rheobase threshold (mV)</param>
 /// <param name="firingThresholdV">Membrane firing threshold (mV)</param>
 /// <param name="sharpnessDeltaT">Sharpness of membrane potential change (mV)</param>
 /// <param name="adaptationVoltageCoupling">Adaptation voltage coupling (nS)</param>
 /// <param name="adaptationTimeConstant">Adaptation time constant (ms)</param>
 /// <param name="spikeTriggeredAdaptationIncrement">Spike triggered adaptation increment (pA)</param>
 /// <param name="stimuliCoeff">Input stimuli coefficient (pA)</param>
 public AdExpIF(double membraneTimeScale,
                double membraneResistance,
                double restV,
                double resetV,
                double rheobaseThresholdV,
                double firingThresholdV,
                double sharpnessDeltaT,
                double adaptationVoltageCoupling,
                double adaptationTimeConstant,
                double spikeTriggeredAdaptationIncrement,
                double stimuliCoeff
                )
     : base(PhysUnit.ToBase(restV, PhysUnit.MetricPrefix.Milli),
            PhysUnit.ToBase(resetV, PhysUnit.MetricPrefix.Milli),
            PhysUnit.ToBase(firingThresholdV, PhysUnit.MetricPrefix.Milli),
            0,
            PhysUnit.ToBase(stimuliCoeff, PhysUnit.MetricPrefix.Piko),
            PhysUnit.ToBase(1, PhysUnit.MetricPrefix.Milli),
            2,
            2)
 {
     _membraneTimeScale                 = PhysUnit.ToBase(membraneTimeScale, PhysUnit.MetricPrefix.Milli);
     _membraneResistance                = PhysUnit.ToBase(membraneResistance, PhysUnit.MetricPrefix.Mega);
     _rheobaseThresholdV                = PhysUnit.ToBase(rheobaseThresholdV, PhysUnit.MetricPrefix.Milli);
     _sharpnessDeltaT                   = PhysUnit.ToBase(sharpnessDeltaT, PhysUnit.MetricPrefix.Milli);
     _adaptationVoltageCoupling         = PhysUnit.ToBase(adaptationVoltageCoupling, PhysUnit.MetricPrefix.Nano);
     _adaptationTimeConstant            = PhysUnit.ToBase(adaptationTimeConstant, PhysUnit.MetricPrefix.Milli);
     _spikeTriggeredAdaptationIncrement = PhysUnit.ToBase(spikeTriggeredAdaptationIncrement, PhysUnit.MetricPrefix.Piko);
     _evolVars[VarAdaptationOmega]      = 0;
     return;
 }