Ys = hold['Ys'] Zs = hold['Zs'] ori_list = hold['ori_list'] id_remap = hold['id_remap'] all_grains_in_layer = np.unique(grain_map) #%% print('.......multi process..........') #new gen_trial_data definition progress_handler = nfutil.progressbar_progress_observer() save_handler = nfutil.forgetful_result_handler() controller = nfutil.ProcessController(save_handler, progress_handler, ncpus=44, chunk_size=chunk_size) multiprocessing_start_method = 'fork' if hasattr(os, 'fork') else 'spawn' #%% mis_all = np.zeros(grain_map.shape) confidence_index_new = np.copy(confidence_map) grain_map_new = np.copy(grain_map) compiled_map = np.copy(grain_map.astype('float')) #%% import scipy.ndimage.morphology as morphology #%% for grain in range(1, all_grains_in_layer.shape[0]):
dark, ome_dilation_iter, threshold, experiment.nrows, experiment.ncols, num_digits=6) #,grey_bnds=(5,5), gaussian=4.5) #============================================================================== # %% INSTANTIATE CONTROLLER - RUN BLOCK NO EDITING #============================================================================== progress_handler = nfutil.progressbar_progress_observer() save_handler = nfutil.forgetful_result_handler() controller = nfutil.ProcessController(save_handler, progress_handler, ncpus=mp.cpu_count(), chunk_size=chunk_size) multiprocessing_start_method = 'fork' if hasattr(os, 'fork') else 'spawn' #============================================================================== # %% TEST ORIENTATIONS - RUN BLOCK NO EDITING #============================================================================== raw_confidence = nfutil.test_orientations(image_stack, experiment, test_crds, controller, multiprocessing_start_method) #============================================================================== # %% POST PROCESS W WHEN TOMOGRAPHY HAS BEEN USED #==============================================================================