How to use the nml.MLNeuron function in nml

To help you get started, we’ve selected a few nml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neurokernel / neurokernel / neurokernel / neuroml / utils.py View on Github external
Undirected graph containing a module's interface ports.
    id : str
        Module identifier.

    Returns
    -------
    module : neurokernel.neuroml.Module
        Module instance.
    """

    module = Module(id=id)

    for n in g.nodes():
        attr_dict = g.node[n]
        if attr_dict['model'] == 'MorrisLecar':
            ml = MLNeuron(id=attr_dict['name'],
                          extern=attr_dict['extern'],
                          public=attr_dict['public'],
                          spiking=attr_dict['spiking'],
                          V1=attr_dict['V1'],
                          V2=attr_dict['V2'],
                          V3=attr_dict['V3'],
                          V4=attr_dict['V4'],
                          phi=attr_dict['phi'],
                          offset=attr_dict['offset'],
                          init_v=attr_dict['initV'],
                          initn=attr_dict['initn'])
            module.ml_neurons.append(ml)
        elif attr_dict['model'] == 'LeakyIAF':
            lif = LifNeuron(id=n,
                            extern=attr_dict['extern'],
                            public=attr_dict['public'],