diff --git a/examples/run_gr.py b/examples/run_gr.py index 61f60c76ec3cefb06511f1a6778369a784302cd1..159dbca212b55b4541a5e73bbba2f5f91d764105 100644 --- a/examples/run_gr.py +++ b/examples/run_gr.py @@ -14,11 +14,11 @@ datasets = [ # 1. It is better to run dataloader first to generate a tsv file. # Alternatively, to run directly on h5 files, add use_tsv=False. -# 2. First run with run_GP = True, batch=False, and max_no_cells = 20 +# 2. First run with run_GP = True, multiprocess=False, and max_no_cells = 20 # to check visually the results. -# 3. Then run with max_no_cells=None and batch=True for multiprocessing. +# 3. Then run with max_no_cells=None and multiprocess=True for multiprocessing. # The results are saved in a pkl file. -# No figures are produced unless batch=False. +# No figures are produced unless multiprocess=False. # Any figures are saved in a pdf file. # 4. Finally run with run_GP = False. # This load the pkl file and integrates into dataloader's data frame. @@ -32,7 +32,7 @@ for dataname in datasets: dataname, max_no_cells=20, wdir=wdir, - batch=False, + multiprocess=False, convert_to_hours=False, mother_bounds={1: (1, 6), 2: (-1, 4)}, ) diff --git a/growth_rate.py b/growth_rate.py index 885048cefbb91ce61b967bdf51743dfe4e7c06e8..9b654620fad9962f0206783e2bd417b42a9a91ad 100644 --- a/growth_rate.py +++ b/growth_rate.py @@ -20,7 +20,7 @@ def find_all_grs( use_tsv=True, bud_bounds=None, mother_bounds=None, - batch=False, + multiprocess=False, convert_to_hours=True, ): """ @@ -45,7 +45,7 @@ def find_all_grs( mother_bounds: dict, optional To change bounds on the hyperparameters for the Gaussian process applied to mothers. - batch: boolean, optional + multiprocess: boolean, optional If True, use multiprocessing, but no plots are then produced. convert_to_hours: boolean If True, divide time values by 60. @@ -78,7 +78,7 @@ def find_all_grs( buddings, max_no_cells=max_no_cells, bounds=bud_bounds, - batch=batch, + multiprocess=multiprocess, convert_to_hours=convert_to_hours, ) if save: @@ -91,7 +91,7 @@ def find_all_grs( m_vol, max_no_cells=max_no_cells, bounds=mother_bounds, - batch=batch, + multiprocess=multiprocess, convert_to_hours=convert_to_hours, ) if save: @@ -107,7 +107,7 @@ def find_gr( bounds=None, noruns=10, verbose=True, - batch=False, + multiprocess=False, max_no_cells=None, convert_to_hours=True, ): @@ -158,9 +158,9 @@ def find_gr( else: no_cells = volume.shape[0] # loop over cells - if batch: + if multiprocess: config["verbose"] = False - res = run_batch(t, volume, buddings_df, buddings, no_cells, config) + res = run_parallel(t, volume, buddings_df, buddings, no_cells, config) else: res = run_series(t, volume, buddings_df, buddings, no_cells, config) # convert results into dataframes @@ -215,7 +215,7 @@ def run_series(t, volume, buddings_df, buddings, no_cells, config): return res -def run_batch(t, volume, buddings_df, buddings, no_cells, config): +def run_parallel(t, volume, buddings_df, buddings, no_cells, config): """ Use multiprocessing to speed GPs.