Overview of all models in the TVBO database, organised by category.
Examples & Use-Cases·Quick examples
Models from the TVBO database simulated for 100 ms and plotted by category. Each panel shows the first state variable; colours are sampled from the viridis colourmap.
Models that fail to integrate are skipped rather than reported as failures, so the gallery below is not necessarily complete. The summary table at the end gives the honest tally: Available models per category versus how many actually Plotted.
Code
import warnings, loggingwarnings.filterwarnings("ignore")logging.disable(logging.WARNING)import numpy as npimport matplotlib.pyplot as pltfrom matplotlib.colors import Normalizefrom matplotlib.cm import ScalarMappablefrom tvbo import Dynamics, SimulationExperiment
Code
DURATION =100.0# msCATEGORIES = [ ("mean_field", "Mean-Field Models"), ("neural_mass", "Neural-Mass Models"), ("phase_oscillator", "Phase-Oscillator Models"), ("phenomenological", "Phenomenological Models"), ("spiking", "Spiking / Single-Neuron Models"), ("generic", "Generic Dynamical Systems"),]results = {} # model_type -> [(name, data_array)]for cat, _ in CATEGORIES: results[cat] = []for name in Dynamics.list_db(model_type=cat):try: d = Dynamics.from_db(name) exp = SimulationExperiment(dynamics=d) exp.integration.duration = DURATION r = exp.run() da = r.integration.data results[cat].append((name, da))exceptException:pass# skip models that fail to run