Example #1
0
                         num_elites =          3,
                         seed =                12345,
                         simulator =           simulator,
                         nogui =               nogui,
                         known_target_values = known_target_values)


    else:
        

        simulator  = 'jNeuroML_NEURON'

        cont = NeuroMLController('RunOnePyr', 
                                 neuroml_file,
                                 'network',
                                 sim_time, 
                                 0.01, 
                                 simulator,
                                 generate_dir = './temp')

        sim_vars = OrderedDict(known_target_values)
        
        t, v = cont.run_individual(sim_vars, show=(not nogui))
        print("Have run individual instance...")

        peak_threshold = 0

        analysis_var = {'peak_delta':     0,
                        'baseline':       0,
                        'dvdt_threshold': 0, 
                        'peak_threshold': peak_threshold}
Example #2
0
            max_evaluations=100,
            num_selected=10,
            num_offspring=10,
            mutation_rate=0.5,
            num_elites=3,
            seed=12345,
            simulator=simulator,
            nogui=nogui,
            known_target_values=known_target_values,
        )

    else:

        simulator = "jNeuroML_NEURON"

        cont = NeuroMLController("RunOnePyr", neuroml_file, "network", sim_time, 0.01, simulator, generate_dir="./temp")

        sim_vars = OrderedDict(known_target_values)

        t, v = cont.run_individual(sim_vars, show=(not nogui))
        print("Have run individual instance...")

        peak_threshold = 0

        analysis_var = {"peak_delta": 0, "baseline": 0, "dvdt_threshold": 0, "peak_threshold": peak_threshold}

        example_run_analysis = analysis.NetworkAnalysis(v, t, analysis_var, start_analysis=0, end_analysis=sim_time)

        analysis = example_run_analysis.analyse()

        pp.pprint(analysis)
Example #3
0
    nogui = '-nogui' in sys.argv

    if '-compare' in sys.argv:

        compare(
            'NT_AllenIzh__s12345_p200_m600_s80_o60_m0.1_e2_Mon_Nov_30_12.30.28_2015/AllenIzh__s12345_p200_m600_s80_o60_m0.1_e2.Pop0.v.dat'
        )

    ####  Run simulation with one HH cell
    elif '-one' in sys.argv:

        simulator = 'jNeuroML_NEURON'
        #simulator  = 'jNeuroML'

        cont = NeuroMLController('AllenTest',
                                 'prototypes/RS/AllenTest.net.nml',
                                 'network_RS', 1500, 0.01, simulator)

        sim_vars = OrderedDict(example_vars_hh)

        t, v = cont.run_individual(sim_vars, show=(not nogui))

    ####  Run simulation with multiple HH cells
    elif '-mone' in sys.argv:

        simulator = 'jNeuroML_NEURON'
        #simulator  = 'jNeuroML'
        dataset = 471141261

        ref = 'network_%s_HH' % (dataset)
        cont = NeuroMLController('AllenTest', 'prototypes/RS/%s.net.nml' % ref,
Example #4
0
                     mutation_rate=mutation_rate,
                     num_elites=num_elites,
                     simulator=simulator,
                     nogui=nogui)


if __name__ == '__main__':

    nogui = '-nogui' in sys.argv

    if '-one' in sys.argv:

        simulator = 'jNeuroML_NEURON'
        #simulator  = 'jNeuroML'

        cont = NeuroMLController(prefix, 'models/RS/SSTest.net.nml',
                                 'network_RS', sim_time, 0.01, simulator)

        sim_vars = OrderedDict([
            ('cell:RS/channelDensity:Na_all/mS_per_cm2', 100),
            ('cell:RS/channelDensity:Kd_all/mS_per_cm2', 20),
            ('cell:RS/channelDensity:LeakConductance_all/mS_per_cm2', 1e-5)
        ])

        t, v = cont.run_individual(sim_vars, show=(not nogui))

    else:

        run_one_optimisation(prefix,
                             123456,
                             population_size=30,
                             max_evaluations=200,
Example #5
0
        'cell:Granule_98/channelDensity:Gran_NaF_98_all/mS_per_cm2':
        55.74495636439219,
        'cell:Granule_98/specificCapacitance:all/uF_per_cm2':
        1.0808061342038033
    }

    sim_vars = OrderedDict(vars)
    #sim_vars = OrderedDict([])

    if '-one' in sys.argv:

        simulator = 'jNeuroML_NEURON'
        #simulator  = 'jNeuroML'

        cont = NeuroMLController('TestGran', 'models/GranuleCell.net.nml',
                                 'network_GranuleCell', sim_time, dt,
                                 simulator)

        t, v = cont.run_individual(sim_vars, show=False)

        analysis = utils.simple_iclamp_analysis(v['Gran/0/Granule_98/v'],
                                                t,
                                                plot=True)

    elif '-mone' in sys.argv:

        simulator = 'jNeuroML_NEURON'
        #simulator  = 'jNeuroML'
        sim_time = 700

        cont = NeuroMLController('TestGranNet',
Example #6
0
     'cell:Granule_98/channelDensity:Gran_H_98_all/mS_per_cm2': 0.03559929171361169,
     'cell:Granule_98/channelDensity:Gran_KDr_98_all/mS_per_cm2': 7.016013314649269,
     'cell:Granule_98/channelDensity:Gran_NaF_98_all/mS_per_cm2': 55.74495636439219,
     'cell:Granule_98/specificCapacitance:all/uF_per_cm2': 1.0808061342038033}
 
 sim_vars = OrderedDict(vars)
 #sim_vars = OrderedDict([])
 
 if '-one' in sys.argv:
     
     simulator  = 'jNeuroML_NEURON'
     #simulator  = 'jNeuroML'
     
     cont = NeuroMLController('TestGran', 
                              'models/GranuleCell.net.nml',
                              'network_GranuleCell',
                              sim_time, 
                              dt, 
                              simulator)
     
     t, v = cont.run_individual(sim_vars, show=False)
     
     analysis = utils.simple_iclamp_analysis(v['Gran/0/Granule_98/v'], t, plot=True)
     
 elif '-mone' in sys.argv:
     
     simulator  = 'jNeuroML_NEURON'
     #simulator  = 'jNeuroML'
     sim_time =         700
     
     cont = NeuroMLController('TestGranNet', 
                              'models/GranuleCellMulti.net.nml',