Markdown exporter ================= This is the developer documentation for `~brian2tools.mdexport` package, that provides information about understanding `~brian2tools.baseexport`'s standard dictionary, standard markdown expander `~brian2tools.mdexport.expander.MdExpander` and writing custom expand functions. .. contents:: Overview :local: Standard dictionary ------------------- The package `~brian2tools.baseexport` collects all the required Brian model information and arranges them in an intuitive way, that can potentially be used for various exporters and use cases. Therefore, understanding the representation will be helpful for further manipulation. The dictionary contains a list of ``run`` dictionaries with each containing information about the particular run simulation. .. code:: python # list of run dictionaries [ . . . . { # run dictionary duration: , components: { . . . }, initializers_connectors: [. . .], inactive: [ . . .] }, . . . . ] Typically, a ``run`` dictionary has four fields, - ``duration``: simulation length - ``components``: dictionary of network components like `~brian2.groups.neurongroup.NeuronGroup`, `~brian2.synapses.synapses.Synapses`, etc. - ``initializers_connectors``: list of initializers and synaptic connections - ``inactive``: list of components that were inactive for the particular run All the Brian `~brian2.core.network.Network` components that are under ``components`` field, have components like, `~brian2.groups.neurongroup.NeuronGroup`, `~brian2.synapses.synapses.Synapses`, etc and would look like, .. code:: python { 'neurongroup': [. . . .], 'poissongroup': [. . . .], 'spikegeneratorgroup': [. . . .], 'statemonitor': [. . . .], 'synapses': [. . . .], . . . . } Each component field has a list of objects of that component defined in the run time. The dictionary representation of `~brian2.groups.neurongroup.NeuronGroup` and its similar types would look like, .. code:: python neurongroup: [ { 'name': , 'N': , 'user_method': , 'equations': { '':{ 'unit': , 'type': 'var_type': 'expr': , 'flags': } . . . } 'events': { '':{'threshold':{'code': , 'when': , 'order': , 'dt': }, 'reset':{'code': , 'when': , 'order': , 'dt': }, 'refractory': } . . . } 'run_regularly': [ { 'name': 'code': 'dt': 'when': 'order': } . . . ] 'when': , 'order': , 'identifiers': {'': , . . . } } ] Similarly, `~brian2.monitors.statemonitor.StateMonitor` and its similar types are represented like, .. code:: python statemonitor: [ { 'name': , 'source': , 'variables': , 'record': , 'dt':