How chaplab/patch-pdf-utility works
PATCH PDF Utility is a desktop application for repairing saturated X-ray scattering data. Its main workflow pairs long-exposure saturated files with short-exposure repair files, scales the repair data, patches peak tips, lets users inspect the result, and exports restored files. The README documents the major capabilities; sampled excerpts show GUI, parsing, scaling-related helpers, and export code, but omit much of both large modules. Both core files are represented; the excerpts do not establish how the two implementations differ or connect.
Main entry points: pdf_patch.py Processing controls · PATCH_PDF.py Threshold selection
Components 17
Desktop interface
- PATCH application
src/pdf_patch.py - Alternate implementation
src/PATCH_PDF.py - File pairing
src/pdf_patch.py - Processing controls
src/pdf_patch.py
Data processing
- Scattering files
- Load and regrid
src/pdf_patch.py - Robust scaling
src/pdf_patch.py - Attenuation correction
src/pdf_patch.py - Fixed scaling
src/pdf_patch.py - Peak-tip patching
src/pdf_patch.py - Threshold selection
src/PATCH_PDF.py
Review and export
- Preview plots
src/pdf_patch.py - Restored datasets
src/pdf_patch.py - Scale convergence
src/pdf_patch.py - File export
src/pdf_patch.py
Other components
- Operator
- PDF processing
Connections 18
- Operator → PATCH application: opens
README.md - Operator → File pairing: loads and reorders
README.md - Operator → Processing controls: sets options
README.md - Scattering files → File pairing: supplies pairs
README.md - File pairing → Load and regrid: provides matched files
README.md - Processing controls → Robust scaling: configures
README.md - Load and regrid → Robust scaling: provides data
README.md - Processing controls → Attenuation correction: configures
README.md - Processing controls → Fixed scaling: configures
README.md - Robust scaling → Peak-tip patching: provides scaled repair
README.md - Attenuation correction → Peak-tip patching: provides scaled repair
README.md - Fixed scaling → Peak-tip patching: provides scaled repair
README.md - Processing controls → Threshold selection: sets threshold mode
README.md - Peak-tip patching → Restored datasets: produces
README.md - Restored datasets → Preview plots: displays
README.md - Robust scaling → Scale convergence: reports convergence
README.md - Restored datasets → File export: writes
README.md - File export → PDF processing: supports
README.md