-
Notifications
You must be signed in to change notification settings - Fork 3
/
params.py
73 lines (62 loc) · 2.83 KB
/
params.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import pandas as pd
illumination_params = {
'model':'multisize_raw', # See the list in fpm.py
'window':'tukey', # ['tukey', 'gaussian', None]
'a':0.3, # alpha, used for tukey window
'p':10, # p and sigma used for
'sig':230, # gaussian window
'do_psd':True, # Whether to perform PSD on the FFT before reconstructing. Helps reduce boundary artifacts.
'starting_angle':0, # with +x axis in CW direction
'increase_angle':True, # Set to True if angle is increasing in CW direction as frame no. increases
'visualize':False,
'calibrate':True,
'fill_empty':True,
'tol':'auto' # ['auto', None]
}
reconstruction_params = {
'scale': 2, # Scale by which to increase image size
'window': None, # ['tukey', 'gaussian', None]
'a':0.3, # alpha, used for tukey window
'p':10, # p and sigma used for
'sig':230, # gaussian window
'do_psd': False, # Whether to perform PSD on the FFT before reconstructing. Helps reduce boundary artifacts.
'n_iters': 100, # Iterations
'do_fil': False, # About initialization. If set to True, the initialization is filtered by multiplying with ideal aperture. Recommmended: False
'denoise': False, # Whether to use denoising used in the original paper during reconstruction. Usually doesn't work well as it is kinda ad hoc
# Parameters from Aidukas et. al. paper
'adaptive_noise': 1,
'adaptive_pupil': 1,
'adaptive_img': 1,
'alpha': 1,
'delta_img': 10,
'delta_pupil': 1e-4,
'calibrate_freq_pos': True,
'eps': 1e-9,
# DEBUG (Not recommended to be changed)
'crop_our_way': True, # Do Not Change
'plot': False # Used for generating figures comparing ground truth with reconstruction. Does not make sense for real-life data.
}
row = pd.DataFrame( # Metadata
{ # DO NOT remove square brackets. They are needed for correct interpretation.
'NA': [0.65],
'PIXELSIZE': [11], # um
'RI': [1.8],
'WAVELENGTH': [0.450], # um
'IMAGESIZE': [512], # In case of non-square images, put lesser of the two dimensions here
'MAGNIFICATION': [100],
# Not used for real-life data. Left here for compatibility with old code. Does not need to be changed
'ILLUMINATION_OFFCENTER_X': [0],
'ILLUMINATION_OFFCENTER_Y': [0],
'FRAMES': [0]
}
)
save_params = {
'illumination': {
'format': 'mat', # ['mat', 'npz']
'savedir': './illumination' # The file will be saved as {savedir}/{tiff_file}.{format}, where tiff_file is the name of the tiff file that was passed to fpm.py
},
'reconstruction': {
'format': 'png', # ['tiff', 'png']
'savedir': './reconstruction' # The file will be saved as {savedir}/{tiff_file}.{format}, where tiff_file is the name of the tiff file that was passed to fpm.py
}
}