From e5af50def85af5f2bc6eb29afcbf48bf85b314b7 Mon Sep 17 00:00:00 2001 From: alexanderott Date: Wed, 3 Feb 2021 14:17:15 +0100 Subject: [PATCH] prepare for fit on kraken --- AnalysisMasterScript.py | 13 +++++++++++++ Figure_constants.py | 3 +++ run_Fitter.py | 19 +++++++++++-------- test.py | 21 ++++++++++++++++++--- 4 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 AnalysisMasterScript.py diff --git a/AnalysisMasterScript.py b/AnalysisMasterScript.py new file mode 100644 index 0000000..05ac118 --- /dev/null +++ b/AnalysisMasterScript.py @@ -0,0 +1,13 @@ + +import os +import Figures_Baseline +import Figures_Stimuli +import Figures_Model +import Figures_results + + +def main(): + pass + +if __name__ == '__main__': + main() diff --git a/Figure_constants.py b/Figure_constants.py index e5f3545..295b6eb 100644 --- a/Figure_constants.py +++ b/Figure_constants.py @@ -5,6 +5,9 @@ from plottools.axes import labelaxes_params SAVE_FOLDER = "./thesis/figures/" +SAVE_FOLDER_FIGURES = "./figures/analysis/" +SAVE_FOLDER_PREANALYSIS = "./temp/" + FIG_SIZE_SMALL = (2, 2) FIG_SIZE_MEDIUM = (4, 4) FIG_SIZE_LARGE = (6, 6) diff --git a/run_Fitter.py b/run_Fitter.py index b849357..f4cee5b 100644 --- a/run_Fitter.py +++ b/run_Fitter.py @@ -14,7 +14,7 @@ from my_util.helperFunctions import plot_errors import multiprocessing as mp -SAVE_DIRECTORY = "./results/final_sam2/" +SAVE_DIRECTORY = "./results/sam_cells/" # SAVE_DIRECTORY_BEST = "./results/final_sam2_best/" # SAVE_DIRECTORY = "./results/ref_and_tau/no_dend_tau/" @@ -94,7 +94,10 @@ def fit_cell_parallel(cell_data, start_parameters): print(cell_path) core_count = mp.cpu_count() - pool = mp.Pool(core_count - 1) + # normal + # pool = mp.Pool(core_count - 1) + # kraken (24 cores with 6 used by dennis atm) + pool = mp.Pool(16) parameters = [] for i, p in enumerate(start_parameters): @@ -116,13 +119,13 @@ def iget_start_parameters(): # mem_tau, input_scaling, noise_strength, dend_tau, # expand by tau_a, delta_a ? - mem_tau_list = [0.001] - input_scaling_list = [80] - noise_strength_list = [0.01] - dend_tau_list = [0.002] + mem_tau_list = [0.001, 0.002, 0.004] + input_scaling_list = [20, 200] + noise_strength_list = [0.01, 0.04] + dend_tau_list = [0.002, 0.005] delta_a_list = [0.01, 0.03, 0.065] - tau_a_list = [0.02, 0.04] - ref_time_list = [0.00065, 0.0012] + tau_a_list = [0.05, 0.12] + ref_time_list = [0.00065, 0.001] for mem_tau in mem_tau_list: for input_scaling in input_scaling_list: diff --git a/test.py b/test.py index 39676ad..96c0833 100644 --- a/test.py +++ b/test.py @@ -4,15 +4,30 @@ import numpy as np from fitting.ModelFit import ModelFit, get_best_fit # from plottools.axes import labelaxes_params import matplotlib.pyplot as plt - +from run_Fitter import iget_start_parameters colors = ["black", "red", "blue", "orange", "green"] def main(): # sam_tests() + # cells = 40 + number = len([i for i in iget_start_parameters()]) + single_core = number * 1400 / 60 / 60 + print("start parameters:", number) + print("single core time:", single_core, "h") + print("single core time:", single_core/24, "days") + + cores = 16 + cells = 40 + + print(cores, "core time:", single_core/cores, "h") + print(cores, "core time:", single_core / 24 / cores, "days") + print(cores, "core time all", cells, "cells:", single_core / 24 / cores * cells, "days") + + print("left over:", number%cores) - fit = get_best_fit("results/final_sam2/2012-12-20-ae-invivo-1/") - fit.generate_master_plot() + # fit = get_best_fit("results/final_sam2/2012-12-20-ae-invivo-1/") + # fit.generate_master_plot() def sam_tests():