<Lems>
<!-- Tell jLEMS/jNeuroML which component is the simulation entry point. -->
<Target component="sim_NeuroML_Ex9__FitzHugh_Nagumo"/>
<Include file="Cells.xml"/>
<Include file="Networks.xml"/>
<Include file="Simulation.xml"/>
<!-- ════════════════════════════════════════════════════════════════
Dynamics ComponentType & Component instances
════════════════════════════════════════════════════════════════ -->
<!-- ════════════════════════════════════════════════════════════════
ComponentType: FitzHughNagumo
Generated from TVBO Dynamics: FitzHughNagumo
════════════════════════════════════════════════════════════════ -->
<ComponentType name="FitzHughNagumo">
<!-- Parameters -->
<Parameter name="I" dimension="none"/>
<!-- Coupling inputs -->
<!-- Initial condition parameters -->
<Parameter name="V_0" dimension="none"/>
<Parameter name="W_0" dimension="none"/>
<!-- Time conversion for derivatives.
When all parameters and state variables carry proper LEMS dimensions,
LEMS handles unit conversion natively (e.g. tau="30 ms" → 0.03 s).
No SEC constant is needed and TimeDerivatives use the RHS directly.
When dimensions are "none" (dimensionless models), / SEC converts
from model time to SI seconds.
all_dimensioned=False needs_sec=False time_scale=s -->
<Constant name="SEC" dimension="time" value="1s"/>
<!-- Exposures (one per state var
3. Run Reference
from tvbo.adapters.neuroml import run_lems_exampleref_outputs = run_lems_example("LEMS_NML2_Ex9_FN.xml")for name, arr in ref_outputs.items():print(f" {name}: shape={arr.shape}")
ex9.dat: shape=(20001, 3)
4. Run TVBO
result = exp.run("neuroml")da = result.integration.dataprint(f"TVBO: {da.dims}, shape={da.shape}")
TVBO: ('time', 'variable'), shape=(20001, 2)
5. Compare & Plot
from tvbo.adapters.neuroml import plot_lems_comparisonplot_lems_comparison("LEMS_NML2_Ex9_FN.xml", ref_outputs, result.integration.data, title_prefix="Ex9")