netpyne.conversion.neuromlFormat

Module for importing and exporting NeuroML 2

Functions:

H(x)

Short description of netpyne.conversion.neuromlFormat.H

exportNeuroML2(reference[, connections, ...])

Exports the current NetPyNE network to NeuroML format

importNeuroML2(fileName, simConfig[, ...])

Import network from NeuroML2 and convert internally to NetPyNE format

Classes:

NetPyNEBuilder(netParams[, simConfig, verbose])

Works with libNeuroML's NeuroMLXMLParser and/or NeuroMLHdf5Parser to parse the NML & build equivalent in NetPyNE

netpyne.conversion.neuromlFormat.H(x)[source]

Short description of netpyne.conversion.neuromlFormat.H

Parameters:

x

Short description of x

Default: Required

Options:

netpyne.conversion.neuromlFormat.exportNeuroML2(reference, connections=True, stimulations=True, format='xml', default_cell_radius=5)[source]

Exports the current NetPyNE network to NeuroML format

Parameters:
  • reference (str) – Will be used for id of the network

  • connections (bool) – Should connections also be exported? Default: True

  • stimulations (bool) – Should stimulations (current clamps etc) also be exported? Default: True

  • format (str) – Which format, xml or hdf5 Default: 'xml' Options: 'xml' Export as XML format 'hdf5' Export as binary HDF5 format

default_cell_radiusint

For abstract cells, e.g. izhikevich, what value should be used in the optional radius property of a population, which can be used in 3D visualizations, etc. Default: 5

class netpyne.conversion.neuromlFormat.NetPyNEBuilder(netParams, simConfig=None, verbose=False)[source]

Bases: DefaultNetworkHandler

Works with libNeuroML’s NeuroMLXMLParser and/or NeuroMLHdf5Parser to parse the NML & build equivalent in NetPyNE

Attributes:

cellParams

popParams

pop_ids_vs_seg_ids_vs_segs

pop_ids_vs_components

pop_ids_vs_use_segment_groups_for_neuron

pop_ids_vs_ordered_segs

pop_ids_vs_cumulative_lengths

projection_infos

connections

popStimSources

stimSources

popStimLists

stimLists

gids

next_gid

stochastic_input_count

Methods:

finalise()

handle_network(network_id, notes[, temperature])

handle_population(population_id, component, ...)

handle_location(id, population_id, ...)

handle_projection(projName, prePop, postPop, ...)

handle_connection(projName, id, prePop, ...)

handle_input_list(inputListId, ...[, ...])

handle_single_input(inputListId, id, cellId)

cellParams = {}
popParams = {}
pop_ids_vs_seg_ids_vs_segs = {}
pop_ids_vs_components = {}
pop_ids_vs_use_segment_groups_for_neuron = {}
pop_ids_vs_ordered_segs = {}
pop_ids_vs_cumulative_lengths = {}
projection_infos = {}
connections = {}
popStimSources = {}
stimSources = {}
popStimLists = {}
stimLists = {}
gids = {}
next_gid = 0
stochastic_input_count = 0
finalise()[source]
handle_network(network_id, notes, temperature=None)[source]
handle_population(population_id, component, size, component_obj, properties={})[source]
handle_location(id, population_id, component, x, y, z)[source]
handle_projection(projName, prePop, postPop, synapse, hasWeights=False, hasDelays=False, type='projection', synapse_obj=None, pre_synapse_obj=None)[source]
handle_connection(projName, id, prePop, postPop, synapseType, preCellId, postCellId, preSegId=0, preFract=0.5, postSegId=0, postFract=0.5, delay=0, weight=1)[source]
handle_input_list(inputListId, population_id, component, size, input_comp_obj=None)[source]
handle_single_input(inputListId, id, cellId, segId=0, fract=0.5, weight=1.0)[source]
netpyne.conversion.neuromlFormat.importNeuroML2(fileName, simConfig, simulate=True, analyze=True, return_net_params_also=False)[source]

Import network from NeuroML2 and convert internally to NetPyNE format

Parameters:
  • fileName (str) – The filename of the NeuroML file Default: Required

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: Required

  • simulate (bool) – Go ahead and run a simulation of it already Default: True

  • analyze (bool) – Run sim.saveData() and sim.analysis.plotData() Default: True