Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,10 @@ shows the spectrum with q-axes in nm⁻¹, intensity controls, and a radial
profile; the tabs fit a reciprocal lattice, correct drift distortion,
suppress mains pickup, and reconstruct a filtered image by inverse FFT.

![FFT viewer on a moiré superlattice](docs/images/gui_fft.png)

**Finding features.** `Measurements → Feature finder...` detects maxima or
minima with threshold, spacing, and smoothing controls, then exports the
coordinates to CSV or a synthetic feature image for lattice statistics.

![Feature finder marking the minima of a moiré superlattice](docs/images/gui_feature_finder.png)

## Main features

ProbeFlow is honest about being a focused toolkit rather than a do-everything
Expand Down
4 changes: 0 additions & 4 deletions docs/gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ button in the quick toolbar). The viewer computes the FFT of the current
processed image — subtract the background first, or the spectrum is
dominated by the surface tilt.

![FFT viewer on a moiré superlattice](images/gui_fft.png)

The left pane shows the real-space source with its pixel and q-space
resolution; the main pane shows log-magnitude FFT with reciprocal-space
axes. The tabs below cover the common reciprocal-space tasks:
Expand All @@ -97,8 +95,6 @@ For a quick periodicity measurement without the full viewer, use
Open **Measurements → Feature finder...** to detect point-like features —
atoms, molecules, defects, moiré sites — on the current image.

![Feature finder marking the minima of a moiré superlattice](images/gui_feature_finder.png)

1. Choose the **Detection mode**: *Maxima* for protrusions, *Minima* for
depressions.
2. Choose a **Threshold mode** (*Above*, *Below*, or *Between*) and a
Expand Down
Binary file removed docs/images/gui_feature_finder.png
Binary file not shown.
Binary file removed docs/images/gui_fft.png
Binary file not shown.
49 changes: 0 additions & 49 deletions scripts/generate_gui_screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
]

VIEWER_FIXTURE = "createc_scan_terrace_109nm.dat"
FFT_FIXTURE = "sxm_moire_10nm.sxm"
FEATURE_FIXTURE = "sxm_moire_10nm.sxm"


def _settle(app, seconds: float = 2.0) -> None:
Expand Down Expand Up @@ -75,7 +73,6 @@ def main() -> int:

app = QApplication.instance() or QApplication(sys.argv)

from probeflow.core.scan_loader import load_scan
from probeflow.gui.models import SxmFile
from probeflow.gui.styling import THEMES, _build_palette, _build_qss

Expand Down Expand Up @@ -117,52 +114,6 @@ def main() -> int:
viewer.close()
_settle(app, 0.5)

# ── 4. FFT viewer on an atomic-resolution scan ─────────────────────────────
from probeflow.gui.dialogs.fft_viewer import FFTViewerDialog

from probeflow.processing.alignment import align_rows
from probeflow.processing.background import subtract_background

scan = load_scan(scans / FFT_FIXTURE)
# The FFT viewer is normally opened on the processed image; mirror that
# by levelling the raw plane first so the Bragg peaks are visible.
arr = subtract_background(align_rows(scan.planes[0], "median"), order=1)
fft = FFTViewerDialog(arr, scan.scan_range_m, "gray", theme)
fft.resize(1280, 820)
fft.show()
_settle(app, 2.0)
# Zoom in on the spectral content, as a user inspecting Bragg peaks would.
fft._zoom_by(0.25)
_settle(app, 2.0)
_grab(fft, "gui_fft.png")
fft.close()
_settle(app, 0.5)

# ── 5. Feature finder with a detection run ─────────────────────────────────
from probeflow.gui.dialogs.feature_finder import FeatureFinderDialog

fscan = load_scan(scans / FEATURE_FIXTURE)
farr = subtract_background(align_rows(fscan.planes[0], "median"), order=1)
w_m, h_m = fscan.scan_range_m
px_x = w_m / farr.shape[1]
px_y = h_m / farr.shape[0]
finder = FeatureFinderDialog(
farr, pixel_size_x_m=px_x, pixel_size_y_m=px_y, theme=theme)
finder.resize(1100, 700)
finder.show()
_settle(app, 1.0)
# Detect the dark moiré sites: minima, smoothed a little, with a minimum
# spacing so each site is found once — the settings a user would dial in.
finder._minima_btn.click()
finder._below_btn.click()
finder._smooth_spin.setValue(2.0)
finder._dist_spin.setValue(8.0)
finder._run_detection()
_settle(app, 2.0)
_grab(finder, "gui_feature_finder.png")
finder.close()
_settle(app, 0.5)

shutil.rmtree(tmp, ignore_errors=True)
return 0

Expand Down
Loading