brian2tools.nmlexport.supporting module¶
- class brian2tools.nmlexport.supporting.NeuroMLPoissonGenerator(poissid, average_rate)[source]¶
Bases:
objectMakes XML of spikeGeneratorPoisson for NeuroML2/LEMS simulation.
- class brian2tools.nmlexport.supporting.NeuroMLSimpleNetwork(id_)[source]¶
Bases:
objectNeuroMLSimpleNetwork class representing network tag in NeuroML syntax as a XML DOM representation.
- class brian2tools.nmlexport.supporting.NeuroMLSimulation(simid, target, length='1s', step='0.1ms')[source]¶
Bases:
objectNeuroMLSimulation class representing Simulation tag in NeuroML syntax as a XML DOM representation.
- add_display(dispid, title='', time_scale='1ms', xmin='0', xmax='1000', ymin='0', ymax='11')[source]¶
Adds a Display element to Simulation.
- add_eventoutputfile(outfileid, filename='recordings.spikes', format_='TIME_ID')[source]¶
Adds an EventOutputFile element to a recently added Display.
- add_eventselection(esid, select, event_port='spike')[source]¶
Adds an EventSelection element to a recently added EventOutputFile.
- add_line(linid, quantity, scale='1mV', time_scale='1ms')[source]¶
Adds a Line element to a recently added Display.
- add_outputcolumn(ocid, quantity)[source]¶
Adds an OutputColumn element to a recently added OutputFile tag.
- build()[source]¶
Builds NeuroML DOM structure of Simulation. It returns DOM object or it can be accessed by object.simulation.
- Returns:
simulation – DOM representation of simulation.
- Return type:
xml.minidom.dom
- class brian2tools.nmlexport.supporting.NeuroMLTarget(component)[source]¶
Bases:
objectMakes XML of target of NeuroML2/LEMS simulation.
- brian2tools.nmlexport.supporting.brian_unit_to_lems(valunit)[source]¶
Returns string representation of LEMS unit where * is between value and unit e.g. “20. mV” -> “20.*mV”.
- brian2tools.nmlexport.supporting.from_string(rep)[source]¶
Returns
Quantityobject from text representation of a value.- Parameters:
rep (
str) – text representation of a value with unit- Returns:
q – Brian Quantity object
- Return type:
Quantity