Skip to content

Commit 4e9e638

Browse files
committed
Reformat.
1 parent eb8a991 commit 4e9e638

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lensless/utils/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def load_psf(
376376
bg /= max_val
377377
else:
378378
psf = psf.astype(original_dtype)
379-
379+
380380
if verbose:
381381
print_image_info(psf)
382382

scripts/measure/analyze_image.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@
122122
type=str,
123123
help="File path for background image, e.g. for screen.",
124124
)
125-
def analyze_image(fp, gamma, width, bayer, lens, lensless, bg, rg, plot_width, save, save_auto, nbits, down, back):
125+
def analyze_image(
126+
fp, gamma, width, bayer, lens, lensless, bg, rg, plot_width, save, save_auto, nbits, down, back
127+
):
126128
assert fp is not None, "Must pass file path."
127129

128130
# initialize plotting axis
@@ -142,7 +144,7 @@ def analyze_image(fp, gamma, width, bayer, lens, lensless, bg, rg, plot_width, s
142144
red_gain=rg,
143145
nbits_out=nbits,
144146
return_float=False,
145-
downsample=down
147+
downsample=down,
146148
)[0]
147149
else:
148150
img = load_image(
@@ -153,7 +155,7 @@ def analyze_image(fp, gamma, width, bayer, lens, lensless, bg, rg, plot_width, s
153155
red_gain=rg,
154156
nbits_out=nbits,
155157
back=back,
156-
downsample=down
158+
downsample=down,
157159
)
158160
if nbits is None:
159161
nbits = int(np.ceil(np.log2(img.max())))
@@ -198,7 +200,7 @@ def analyze_image(fp, gamma, width, bayer, lens, lensless, bg, rg, plot_width, s
198200
# -- grey
199201
fig_auto, ax_auto = plt.subplots(ncols=4, nrows=2, num="Autocorrelations", figsize=(15, 5))
200202
_, autocorr_grey = plot_autocorr2d(img_grey, ax=ax_auto[0][0])
201-
print(f"-- grayscale")
203+
print("-- grayscale")
202204
plot_cross_section(
203205
autocorr_grey, color="gray", plot_db_drop=width, ax=ax_auto[1][0], plot_width=plot_width
204206
)
@@ -233,8 +235,6 @@ def analyze_image(fp, gamma, width, bayer, lens, lensless, bg, rg, plot_width, s
233235
print(f"\nAutocorrelation saved to: {auto_fp}")
234236
else:
235237
plt.show()
236-
237-
238238

239239

240240
if __name__ == "__main__":

0 commit comments

Comments
 (0)