Skip to content

Commit

Permalink
Fix formatting of example
Browse files Browse the repository at this point in the history
  • Loading branch information
viljarjf committed Apr 21, 2024
1 parent 393481c commit ae8be66
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/processing/background_subtraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
s = pxm.data.twinned_nanowire(allow_download=True)

s_filtered = s.subtract_diffraction_background(
"difference of gaussians",
inplace=False,
min_sigma=2,
"difference of gaussians",
inplace=False,
min_sigma=2,
max_sigma=8,
)
)

hs.plot.plot_images(
[s.inav[9, 42], s_filtered.inav[9, 42]],
Expand All @@ -29,6 +29,7 @@
colorbar=None,
)
# %%

"""
The available methods differ for `Diffraction2D` datasets and `PolarDiffraction2D`
datasets.
Expand All @@ -42,9 +43,9 @@
s_polar = s.get_azimuthal_integral2d(npt=100, mean=True)

s_polar_filtered = s_polar.subtract_diffraction_background(
"radial median",
inplace=False,
)
"radial median",
inplace=False,
)

hs.plot.plot_images(
[s_polar.inav[9, 42], s_polar_filtered.inav[9, 42]],
Expand Down

0 comments on commit ae8be66

Please sign in to comment.