-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the org.neuroml.export wiki!
Welcome to the org.neuroml.export wiki!
##Issues :
The Integrate and Fire Neuron Model with refractory period is defined in Cells.xml
<ComponentType name="iafTauRefCell"
extends="iafTauCell"
description="Integrate and fire cell which returns to its leak reversal potential of _leakReversal with a time course _tau. It has a refractory period of _refract after spiking">
<Parameter name="refract" dimension="time"/>
<Dynamics>
<StateVariable name="v" exposure="v" dimension="voltage"/>
<StateVariable name="lastSpikeTime" dimension="time"/>
<OnStart>
<StateAssignment variable="v" value="reset"/>
</OnStart>
<Regime name="refractory">
<OnEntry>
<StateAssignment variable="lastSpikeTime" value="t" />
<StateAssignment variable="v" value="reset" />
</OnEntry>
<OnCondition test="t .gt. lastSpikeTime + refract">
<Transition regime="integrating" />
</OnCondition>
</Regime>
<Regime name="integrating" initial="true">
<TimeDerivative variable="v" value="(leakReversal - v) / tau" />
<OnCondition test="v .gt. thresh">
<EventOut port="spike"/>
<Transition regime="refractory" />
</OnCondition>
<!--<OnEvent port="in">
<StateAssignment variable="v" value="v + deltaV"/>
</OnEvent>-->
</Regime>
</Dynamics>
</ComponentType>
The equations generated for this model by BrianWriter are :
iafTauRef_eqs=Equations('''
dv/dt = 0 * 1/second : volt
dlastSpikeTime/dt = 0 * 1/second : second
''')
This is because of the following piece of code in BrianWriter :
for(StateVariable svar : dyn.getStateVariables())
{
String localName = prefix + svar.getName();
String units = " " + getBrianSIUnits(svar.getDimension());
if(units.contains(Unit.NO_UNIT)) units = " 1";
if(!stateVars.contains(localName)) // i.e. no TimeDerivative of
// StateVariable
{
stateVars.add(localName);
compInfo.eqns.append(" d" + localName + "/dt = 0 * 1/second : " + units + "\n");
}
}
The above mentioned error has been corrected. However, the action to be taken when a Regime, OnEntry, OnEvent or Transition is encountered needs to be defined.
Regimes are now added to ComponentFlattener : https://github.com/SnigdhaD/jLEMS/commit/2261e9c99217ece8099bd47cef689beefbd5b405 https://github.com/LEMS/jLEMS/commit/dc9f0e0be0dd423535e031336ae720944af6b4f6 https://github.com/LEMS/jLEMS/commit/82860ba63158b7dea1b8a5a40d2afed05b3b9e78
Changes to BrianWriter to incorporate refractoriness : https://github.com/brian-team/org.neuroml.export/commit/e5cdbcc8397cd390cbe74b26b5158f744bb4f54d