Instance-based population with explicit cell placement — 3 iafCells, 2 projections, pulse input
Model: Instance-Based Network
Three iafCell instances with explicit 3D placement. Cell 0 receives a pulse input and connects to cells 1 and 2 via two different expOneSynapse connections.
/Users/leonmartin_bih/tools/tvbo/tvbo/adapters/neuroml.py:2787: UserWarning: synapse 'expOneSynapse' is used with more than one set of parameters; emitting the additional one as 'expOneSynapse_2'. Give each parameterisation its own entry in the dynamics library to choose the names yourself.
syn_id = _unique_component_id(syn_type, assigned_syn_ids, kind="synapse")
3. Run Reference
from tvbo.adapters.neuroml import run_lems_exampleref_outputs = run_lems_example("LEMS_NML2_Ex13_Instances.xml")for name, arr in ref_outputs.items():print(f" {name}: shape={arr.shape}")
auto.dat: shape=(6001, 4)
4. Run TVBO
result = exp.run("neuroml")da = result.integration.dataprint(f"TVBO: {da.dims}, shape={da.shape}")
pyNeuroML >>> 16:48:11 - INFO - Loading LEMS file: tvbo_lems_sim.xml and running with jNeuroML
pyNeuroML >>> 16:48:11 - INFO - Executing: (java -Xmx400M -Djava.awt.headless=true -jar "/Users/leonmartin_bih/tools/tvbo/.venv/lib/python3.12/site-packages/pyneuroml/utils/./../lib/jNeuroML-0.14.0-jar-with-dependencies.jar" tvbo_lems_sim.xml -nogui -I '') in directory: /var/folders/ym/9kw1g21j1nd7kwfn8c0z3st40000gn/T/tmp79ax0r7x
pyNeuroML >>> 16:48:12 - INFO - Command completed successfully!
TVBO: ('time', 'quantity'), shape=(6001, 3)
5. Compare & Plot
from tvbo.adapters.neuroml import plot_lems_comparisonplot_lems_comparison("LEMS_NML2_Ex13_Instances.xml", ref_outputs, result.integration.data, title_prefix="Ex13")