import _TRACK as TRK #%% --- USER PARAMETERS --- %%# # Update/Visualize which saved values? # UPDATE = {'INI': True, 'PRE': True, 'REC': True, 'SEG': True, 'TRK': True} VISUAL = {'INI': False, 'PRE': False, 'REC': False, 'SEG': False, 'TRK': False} # Load in which images? # CODES = ['roi_Test Data_(230,320)_(64x64)_(f100-110)'] #%% INITIALIZATION %%# for code in CODES: #%% INITIALIZATION %%# if (__name__ == '__main__'): # Make sure all needed folders exist # OP._MakeDir(OP.FOLD_APR) OP._MakeDir(OP.FOLD_KER) OP._MakeDir(OP.FOLD_IMG) OP._MakeDir(OP.FOLD_SIM) OP._MakeDir(OP.FOLD_TMP) OP._MakeDir(OP.FOLD_EVL) OP._MakeDir(OP.FOLD_MAT) OP._MakeDir(OP.FOLD_TRUE) OP._MakeCode(code) # Initialize Microscope # print('\n---------- Initialization ----------') scope = INIT.RUN(code, update=UPDATE['INI'], visual=VISUAL['INI'])
#%% --- USER PARAMETERS --- %%# ## Processing parameters ## UPDATE = True # Update rois? # VISUAL = True # Visualize results? # Frames = [0, 20 ] # <(f, f)> Frame range, does not include end frame. Zero indexed # Roi_cen = [64, 64] # <(px, px)> Center point of the ROI # Roi_size = [ 128, 128 ] # <(px, px)> Size of the ROI. Keep equal! Else the phase mask simulates incorrectly (BUG) # ## Files for processing ## DIR = path.dirname(path.abspath(__file__)) FOLD_EXP = DIR + '\\Experiment\\' OP._MakeDir(FOLD_EXP) # Make the folder if it doesn't exist # OP._MakeDir(OP.FOLD_IMG) # If you want to specify files in the folder, uncomment the second line, else comment it out to grab everything in the folder # files = glob.glob(FOLD_EXP + '*.tif') files = ['test_bead.tif'] ## Additional parameters ## # Construct the x and y ranges for cropping # rng_x = range(Roi_cen[0] - Roi_size[0] // 2, Roi_cen[0] + Roi_size[0] // 2) rng_y = range(Roi_cen[1] - Roi_size[1] // 2, Roi_cen[1] + Roi_size[1] // 2) # The footer for information about how these images were cropped # footer = '_(%i,%i)_(%ix%i)_(f%i-%i)' % (*Roi_cen, *Roi_size, *Frames) #%% LOAD AND CROP %%#