def test_profile_singlepop(): dv = .0001 update_method = 'approx' tol = 1e-14 run_dict = {'dt':.0001, 't0':0, 'tf':.2} simulation = get_network(dv=dv, update_method=update_method, tol=tol) profile_result = profile_network(simulation, run_dict) run_time = extract_value(profile_result, 'network.py', 'run')
def test_profile_singlepop(): dv = .0001 update_method = 'approx' approx_order = None tol = 1e-14 run_dict = {'dt':.0001, 't0':0, 'tf':.2} simulation = get_network(dv=dv, update_method=update_method, approx_order=approx_order, tol=tol) profile_result = profile_network(simulation, run_dict) run_time = extract_value(profile_result, 'network.py', 'run')
# Create neuroml doc: nml_doc = nml.NeuroMLDocument(id=doc_id) # Append types: # nml_doc.iaf_cells.append(nml.IafCell0) population_type_list = {} for p in network.population_list: curr_population_name = p.__class__.__name__ if curr_population_name == 'InternalPopulation': print neuroml_internal_population_parameter_dict_adapter(p) elif curr_population_name == 'ExternalPopulation': pass # print neuroml_external_population_parameter_dict_adapter(p) else: raise Exception( 'Population Type (%s) not recognize when converting to NeuroML' % curr_population_name) if __name__ == "__main__": warnings.warn('NeuroML adapter is in prototype stage and not debugged.') from dipde.examples.singlepop import get_network network = get_network(tol=1e-14) network_to_neuroml(network, 'temp.net.nml')
# Create neuroml doc: nml_doc = nml.NeuroMLDocument(id=doc_id) print nml_doc validate_neuroml2(nml_doc) # Append types: # nml_doc.iaf_cells.append(nml.IafCell0) population_type_list = {} for p in network.population_list: curr_population_name = p.__class__.__name__ if curr_population_name == 'InternalPopulation': output = neuroml_internal_population_parameter_dict_adapter(p) elif curr_population_name == 'ExternalPopulation': pass # print neuroml_external_population_parameter_dict_adapter(p) else: raise Exception('Population Type (%s) not recognize when converting to NeuroML' % curr_population_name) if __name__ == "__main__": warnings.warn('NeuroML adapter is in prototype stage and not debugged.') from dipde.examples.singlepop import get_network network = get_network(tol=1e-14) network_to_neuroml(network, 'temp.net.nml')