grain_map = hold['grain_map'] confidence_map = hold['confidence_map'] Xs = hold['Xs'] 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')) #%%
#============================================================================== # %% VIEW IMAGES FOR DEBUGGING TO LOOK AT IMAGE PROCESSING PARAMETERS #============================================================================== plt.close('all') img_to_view=0 plt.imshow(image_stack[img_to_view,:,:],interpolation='none') #============================================================================== # %% 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)