How to use the nml.LifNeuron 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
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'],
                            spiking=attr_dict['spiking'],
                            V=attr_dict['V'],
                            Vr=attr_dict['Vr'],
                            Vt=attr_dict['Vt'],
                            R=attr_dict['R'],
                            C=attr_dict['C'])
            module.lif_neurons.append(lif)
    for s in g.edges():
        attr_dict = g.edge[s[0]][s[1]]
        if attr_dict['model'] == 'AlphaSynapse':
            al = AlSynapse(id=attr_dict['name'],
                           class_=attr_dict['class'],
                           ar=attr_dict['ar'],
                           ad=attr_dict['ad'],