Пример #1
0
    def combinations(self, comb_lists, output_dirs):
        """
        Multiplies likelihoods from different protocols and plots results.
        :param comb_lists: list of list of protocol names to combine \ struct: [ ["step3", "step100"], ["sin10", "sin100"] ]
        :param output_dirs: directory for the output of combinations (inside root dir) \ for examp: ["steps/comb", "sins/comb"]
        :return: Saves and plots the combinations of protocols to disk
        """

        # create lists for combine_likelihoods function
        comb_lists = [[(self.rootdir+elem) for elem in comb_lists[i]] for i in range(len(comb_lists))]
        out_dirs = [(self.rootdir+subdir) for subdir in output_dirs]

        print("Combination lists:")
        print(comb_lists)

        for idx, comblist in enumerate(comb_lists):
            combine_likelihood(comblist, numfp=self.nfp, num_mult_single=self.nrep/len(comblist), out_path=out_dirs[idx])
            plot_combined_results(out_dirs[idx], self.nfp, self.pinit)
Пример #2
0
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/1", numfp=10, num_mult=30)
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/3", numfp=10, num_mult=30)
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/20", numfp=10, num_mult=30)
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/200", numfp=10, num_mult=30)

# Create combine path_lists:
steps_list = ["/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/3",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/20",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/200"]

zaps_list = ["/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/1",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/10",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/100"]

# Create combinations
combine_likelihood(zaps_list, numfp=10, num_mult_single=10,
                   out_path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/comb")
combine_likelihood(steps_list, numfp=10, num_mult_single=10,
                   out_path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/comb")

plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/100", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/10", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/1", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/zaps/comb", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/3", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/20", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/200", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/comb", 10, dbs=pinit)

path_list = ["/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/3",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/20",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining4/steps/200",
Пример #3
0
mult_likelihood(path="/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/1", numfp=10, num_mult=30)
mult_likelihood(path="/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/3", numfp=10, num_mult=30)
mult_likelihood(path="/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/20", numfp=10, num_mult=30)
mult_likelihood(path="/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/200", numfp=10, num_mult=30)

# Create combine path_lists:
steps_list = ["/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/3",
             "/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/20",
             "/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/200"]

sins_list = ["/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/1",
             "/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/10",
             "/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/100"]

# Create combinations
combine_likelihood(sins_list, numfp=10, num_mult_single=10,
                   out_path="/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/comb")
combine_likelihood(steps_list, numfp=10, num_mult_single=10,
                   out_path="/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/comb")

plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/100", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/10", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/1", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/sins/comb", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/3", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/20", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/200", 10, dbs=pinit)
plot_combined_results("/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/comb", 10, dbs=pinit)

path_list = ["/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/3",
             "/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/20",
             "/home/szabolcs/parameter_inference/stim_protocol2_v24/comb_colored_dend_gpas-dens/steps/200",
Пример #4
0
# Multiply likelihoods for each fixed parameter
mult_likelihood(path=".../sins/100", numfp=10, num_mult=30)
mult_likelihood(path=".../sins/10", numfp=10, num_mult=30)
mult_likelihood(path=".../sins/1", numfp=10, num_mult=30)
mult_likelihood(path=".../steps/3", numfp=10, num_mult=30)
mult_likelihood(path=".../steps/20", numfp=10, num_mult=30)
mult_likelihood(path=".../steps/200", numfp=10, num_mult=30)

# Create combine path_lists:
steps_list = [".../steps/3", ".../steps/20", ".../steps/200"]

sins_list = [".../sins/1", ".../sins/10", ".../sins/100"]

# Create combinations
combine_likelihood(sins_list,
                   numfp=10,
                   num_mult_single=10,
                   out_path=".../sins/comb")
combine_likelihood(steps_list,
                   numfp=10,
                   num_mult_single=10,
                   out_path=".../steps/comb")

plot_combined_results(".../sins/100", 10, dbs=pinit)
plot_combined_results(".../sins/10", 10, dbs=pinit)
plot_combined_results(".../sins/1", 10, dbs=pinit)
plot_combined_results(".../sins/comb", 10, dbs=pinit)
plot_combined_results(".../steps/3", 10, dbs=pinit)
plot_combined_results(".../steps/20", 10, dbs=pinit)
plot_combined_results(".../steps/200", 10, dbs=pinit)
plot_combined_results(".../steps/comb", 10, dbs=pinit)
Пример #5
0
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/1", numfp=10, num_mult=30)
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/3", numfp=10, num_mult=30)
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/20", numfp=10, num_mult=30)
mult_likelihood(path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/200", numfp=10, num_mult=30)

# Create combine path_lists:
steps_list = ["/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/3",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/20",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/200"]

sins_list = ["/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/1",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/10",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/100"]

# Create combinations
combine_likelihood(sins_list, numfp=10, num_mult_single=10,
                   out_path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/comb")
combine_likelihood(steps_list, numfp=10, num_mult_single=10,
                   out_path="/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/comb")

plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/100", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/10", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/1", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/sins/comb", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/3", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/20", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/200", 10, dbs=pinit)
plot_combined_results("/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/comb", 10, dbs=pinit)

path_list = ["/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/3",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/20",
             "/Users/Dani/TDK/parameter_estim/stim_protocol2/combining_colored_dend-soma/steps/200",