def get_tests(): # get neuronunit tests # and select out the tests that are more about waveform shape # and less about electrophysiology of the membrane. # We are more interested in phenomonogical properties. electro_path = str(os.getcwd()) + '/pipe_tests.p' assert os.path.isfile(electro_path) == True with open(electro_path, 'rb') as f: electro_tests = pickle.load(f) electro_tests = get_neab.replace_zero_std(electro_tests) electro_tests = get_neab.substitute_parallel_for_serial(electro_tests) test, observation = electro_tests[0] tests = copy.copy(electro_tests[0][0]) tests_ = [] tests_ += [tests[0]] tests_ += tests[4:7] return tests_, test, observation
} #ca1_pyr = { 'nlex_id':'830368389'} ca1_pyr = { "id": 85, "name": "Hippocampus CA1 pyramidal cell", "neuron_db_id": 258, "nlex_id": "sao830368389" } pipe = [fi_basket, olf_mitral, ca1_pyr, purkinje] electro_path = 'pipe_tests.p' try: assert os.path.isfile(electro_path) == True with open(electro_path, 'rb') as f: electro_tests = pickle.load(f) electro_tests = get_neab.replace_zero_std(electro_tests) electro_tests = get_neab.substitute_parallel_for_serial(electro_tests) except: electro_tests = [] for p in pipe: p_tests, p_observations = get_neab.get_neuron_criteria(p) electro_tests.append((p_tests, p_observations)) electro_tests = get_neab.replace_zero_std(electro_tests) electro_tests = get_neab.substitute_parallel_for_serial(electro_tests) with open('pipe_tests.p', 'wb') as f: pickle.dump(electro_tests, f) #MU = 4; NGEN = 3; CXPB = 0.9 USE_CACHED_GA = False