3989c2a1b8
Add row-averaged FFT feature with configurable window size (row_avg_n parameter) for improved signal-to-noise ratio on noisy scans. Includes: - Gaussian-weighted same-row neighbor averaging (never crosses rows) - Masked/renormalized convolution handling for edge cases and masked samples - Cache format v2 with row_avg_n tracking to prevent silent cache mismatches - GUI dialog option for row-average window configuration - Comprehensive tests validating kernel properties, background subtraction invariance, and cache dispatch Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
"""
|
|
SRAS Scan File Viewer
|
|
PyQt6 application for visualizing channel data from .sras binary scan files.
|
|
|
|
Channel semantics (fixed by sc3_aui_app.py acquisition settings):
|
|
CH1 — RF Acoustic Packet (AC-coupled, 100 mV/div): FFT → peak frequency
|
|
CH3 — Bias A (DC-coupled, 50 mV/div): waveform mean
|
|
CH4 — Bias B (DC-coupled, 50 mV/div): waveform mean
|
|
|
|
RF images are masked: pixels where CH4_dc < dc_threshold show 0.
|
|
|
|
File parsing lives in sras_format, image/alignment math in sras_compute, and
|
|
background workers in sras_workers — none of which import Qt or matplotlib,
|
|
so multiprocessing children can load them cheaply.
|
|
"""
|
|
|
|
import faulthandler
|
|
|
|
faulthandler.enable() # print a native stack trace on SIGSEGV/SIGABRT/etc.
|
|
|
|
from .canvases import ImageCanvas, RoiQuad, WaveformCanvas # noqa: E402,F401
|
|
from .common import CH_LABELS, CMAPS, VELOCITY_MODE_IDX # noqa: E402,F401
|
|
from .dialogs import ( # noqa: E402,F401
|
|
FftOptionsDialog, ManualAlignmentDialog, RowAverageFftOptionsDialog,
|
|
)
|
|
from .main_window import SrasViewerWindow, main # noqa: E402,F401
|