@@ -121,6 +121,7 @@ def __init__(self,
121
121
fit_phase_profile : bool = False ,
122
122
phase_profile_l1 : float = 1e3 ,
123
123
apodization : Optional [np .ndarray ] = None ,
124
+ alpha : float = 0.1 ,
124
125
save_auxiliary_fields : bool = False ,
125
126
compressor : Codec = Zlib (),
126
127
save_float32 : bool = False ,
@@ -165,7 +166,8 @@ def __init__(self,
165
166
:param fit_phases: whether to fit phase differences between image and background holograms
166
167
:param fit_translations: whether to fit the spatial translation between the data and reference images
167
168
:param translation_thresh:
168
- :param apodization: if None use tukey apodization with alpha = 0.1. To use no apodization set equal to 1
169
+ :param apodization: if None use tukey apodization. To use no apodization set equal to 1
170
+ :param alpha: if apodization is None, use tukey apodization with this alpha
169
171
:param save_auxiliary_fields:
170
172
:param compressor: by default use Zlib(), which is a good combination of fast/reasonable compression ratio.
171
173
For better compression, use bz2.BZ2(), although this is much slower.
@@ -344,9 +346,10 @@ def __init__(self,
344
346
# other arrays
345
347
# ########################
346
348
self .realspace_mask = realspace_mask
349
+ self .alpha = alpha
347
350
if apodization is None :
348
- apodization = np .outer (tukey (self .ny , alpha = 0.1 ),
349
- tukey (self .nx , alpha = 0.1 ))
351
+ apodization = np .outer (tukey (self .ny , alpha = self . alpha ),
352
+ tukey (self .nx , alpha = self . alpha ))
350
353
self .apodization = apodization
351
354
352
355
self .ctf = (np .sqrt (self .fxs [None , :] ** 2 + self .fys [:, None ] ** 2 ) <= self .fmax ).astype (complex )
@@ -1606,8 +1609,8 @@ def reconstruct_n(self,
1606
1609
atf = (xp .sqrt (fx_atf [None , :] ** 2 +
1607
1610
fy_atf [:, None ] ** 2 ) <= self .fmax ).astype (complex )
1608
1611
1609
- apodization_n = xp .outer (xp .asarray (tukey (self .n_shape [- 2 ], alpha = 0.1 )),
1610
- xp .asarray (tukey (self .n_shape [- 1 ], alpha = 0.1 )))
1612
+ apodization_n = xp .outer (xp .asarray (tukey (self .n_shape [- 2 ], alpha = self . alpha )),
1613
+ xp .asarray (tukey (self .n_shape [- 1 ], alpha = self . alpha )))
1611
1614
1612
1615
if self .model == "born" or self .model == "rytov" :
1613
1616
optimizer = self .model
0 commit comments