File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 126126# Image Preprocessing
127127# -------------------
128128# We apply some image preprocessing techniques to prepare the
129- # the images for denoising via Class Averaging. When processing
130- # experimental data additional preprocesing methods such as
131- # noise whitening, contrast inversion, and background normalization
132- # can be applied in a similar fashion.
129+ # the images for denoising via Class Averaging.
133130
134131# %%
135132# Downsampling
150147src .images [:10 ].show ()
151148
152149# %%
153- # Cache
154- # -----
150+ # Normalize Background
151+ # --------------------
152+ # We apply ``normalize_background()`` to prepare the image class averaging.
153+
154+ src = src .normalize_background ()
155+ src .images [:10 ].show ()
156+
157+ # %%
158+ # Caching
159+ # -------
155160# We apply ``cache`` to store the results of the ``ImageSource``
156161# pipeline up to this point. This is optional, but can provide
157162# benefit when used intently on machines with adequate memory.
158-
163+ # Since the remaining preprocessing steps, whitening and contrast
164+ # inversion, as well as class averaging require passing over the
165+ # full set of images, caching at this point saves compute time.
159166src = src .cache ()
160- src .images [0 :10 ].show ()
167+
168+ # %%
169+ # Noise Whitening
170+ # ---------------
171+ # We apply ``whiten()`` to estimate and whiten the noise.
172+
173+ src = src .whiten ()
174+ src .images [:10 ].show ()
175+
176+ # %%
177+ # Contrast Inversion
178+ # ------------------
179+ # We apply ``invert_contrast()`` to ensure a positive valued signal.
180+
181+ src = src .invert_contrast ()
161182
162183# %%
163184# Class Averaging
You can’t perform that action at this time.
0 commit comments