From f891ff614ad8dbc2e651903d6441e5c8dd82006b Mon Sep 17 00:00:00 2001 From: Impact <pascal.mouquet@ird.fr> Date: Tue, 10 Nov 2020 15:44:17 +0400 Subject: [PATCH] comment old functions --- sen2chain/multi_processing.py | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sen2chain/multi_processing.py b/sen2chain/multi_processing.py index 2794147..a5549d0 100644 --- a/sen2chain/multi_processing.py +++ b/sen2chain/multi_processing.py @@ -39,35 +39,35 @@ def l2a_multiprocessing(process_list, nb_proc=4): pool.join() return True -def multi_cldidx(indice_list, l2a_identifier): - l2a = L2aProduct(l2a_identifier) - l2a.process_cloud_mask_v2() - l2a.process_indices(indice_list, True, True) +#~ def multi_cldidx(indice_list, l2a_identifier): + #~ l2a = L2aProduct(l2a_identifier) + #~ l2a.process_cloud_mask_v2() + #~ l2a.process_indices(indice_list, True, True) -def cldidx_multiprocessing(process_list, indice_list=["NDVI", "NDWIGAO", "NDWIMCF"], nb_proc=4): - """ """ - nb_proc = max(min(len(os.sched_getaffinity(0))-1, nb_proc), 1) - pool = multiprocessing.Pool(nb_proc) - results = [pool.map(partial(multi_cldidx, indice_list), process_list)] - pool.close() - pool.join() - return True +#~ def cldidx_multiprocessing(process_list, indice_list=["NDVI", "NDWIGAO", "NDWIMCF"], nb_proc=4): + #~ """ """ + #~ nb_proc = max(min(len(os.sched_getaffinity(0))-1, nb_proc), 1) + #~ pool = multiprocessing.Pool(nb_proc) + #~ results = [pool.map(partial(multi_cldidx, indice_list), process_list)] + #~ pool.close() + #~ pool.join() + #~ return True -def multi_cld(l2a_identifier): - l2a = L2aProduct(l2a_identifier) - try: - l2a.process_cloud_mask_v2() - except: - pass +#~ def multi_cld(l2a_identifier): + #~ l2a = L2aProduct(l2a_identifier) + #~ try: + #~ l2a.process_cloud_mask_v2() + #~ except: + #~ pass -def cld_multiprocessing(process_list, nb_proc=4): - """ """ - nb_proc = max(min(len(os.sched_getaffinity(0))-1, nb_proc), 1) - pool = multiprocessing.Pool(nb_proc) - results = [pool.map(multi_cld, process_list)] - pool.close() - pool.join() - return True +#~ def cld_multiprocessing(process_list, nb_proc=4): + #~ """ """ + #~ nb_proc = max(min(len(os.sched_getaffinity(0))-1, nb_proc), 1) + #~ pool = multiprocessing.Pool(nb_proc) + #~ results = [pool.map(multi_cld, process_list)] + #~ pool.close() + #~ pool.join() + #~ return True def multi_cld_ver_pro_iter_repro(l2a_ver_pro_iter_repro): l2a = L2aProduct(l2a_ver_pro_iter_repro[0]) -- GitLab