resolution=p_res[idx], value=current_value[item], sigma=p_std[idx], mean=p_mean[idx])) for item in hz: print("\n\n---------------------------------------- Running %i Hz zap protocol" % item) # Stimulus path stim = np.loadtxt("/Users/Dani/TDK/parameter_estim/stim_protocol2/zap/%i/stim.txt" % item) working_path = "/Users/Dani/TDK/parameter_estim/stim_protocol2/zaps/%i(%i)" % (item,i) # Generate deterministic trace and create synthetic data with noise model _, v = model(stype='custom', custom_stim=stim, Ra=current_value['Ra'], gpas=current_value['gpas'], cm=current_value['cm']) # Generate noise_rep synthetic data (noise_rep portion noise realisation) data = more_w_trace(noise, v, noise_rep) pset = ParameterSet(*current_params) modell = partial(model, stype='custom', custom_stim=stim) inf = IndependentInference(model=modell, noise_std=noise, target_trace=data, parameter_set=pset, working_path=working_path) if __name__ == '__main__': inf.run_moretrace_inf() for item in duration: print("\n\n---------------------------------------- Running %i ms impulse protocol" % item) # Stimulus path stim = np.loadtxt("/Users/Dani/TDK/parameter_estim/stim_protocol2/steps/%i/stim.txt" % item) working_path = "/Users/Dani/TDK/parameter_estim/stim_protocol2/steps/%i(%i)" % (item, i)
print("Parameter space initialization data saved to disk") print(database) database.close() for item in hz: print("\n\n---------------------------------------- Running %i Hz zap protocol" % item) # Stimulus path stim = np.loadtxt("/Users/Dani/TDK/parameter_estim/stim_protocol2/zap/%i/stim.txt" % item) working_path = "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining3/zaps/%i" % item modell = partial(model, stype='custom', custom_stim=stim) # Generate synthetic data for each fixed params and given repetition target_traces = more_w_trace(sigma=noise_std, model=modell, params=fixed_params, rep=noise_rep) if __name__ == '__main__': run_protocol_simulations(model=modell, target_traces=target_traces, noise_std=noise_std, param_set=prior_set, working_path=working_path) for item in duration: print("\n\n---------------------------------------- Running %i ms impulse protocol" % item) # Stimulus path stim = np.loadtxt("/Users/Dani/TDK/parameter_estim/stim_protocol2/steps/%i/stim.txt" % item) working_path = "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining3/steps/%i" % item modell = partial(model, stype='custom', custom_stim=stim) # Generate synthetic data for each fixed params and given repetition