The full processing workflow no longer lives in the CLIs. New process/JFJochProcess
encapsulates it for jfjoch_process, jfjoch_azint and (later) the viewer:
- ProcessMode {AzimuthalIntegration, FullAnalysis}; ProcessConfig carries run control
(range, threads, output prefix, spot finding, rotation + scaling options, reference
data) while the DiffractionExperiment carries all algorithm settings.
- Run() executes setup -> optional two-pass rotation pre-pass -> parallel per-image loop
(std::thread) -> optional scaling/merging post-pass -> NXmxIntegrated _process.h5 that
links back to the original images. ProcessResult returns stats + merge text.
- Cancel() / std::atomic<bool> (receiver style), checked between images; the CLIs install
a SIGINT handler that calls it (fixes the previous Ctrl+C gap), the viewer will use the
same hook. JFJochProcessObserver streams progress / per-image results for a live GUI.
jfjoch_process.cpp and jfjoch_azint.cpp are now thin: argument parsing + experiment
configuration, then JFJochProcess::Run + stats printing. Behaviour and usage messages
are unchanged.
Adds JFJochProcessTest (azimuthal integration round-trip, no-output run, pre-cancel) over
a small generated dataset.
Verified: tests/jfjoch_test [HDF5] (83 cases / 1854 assertions); jfjoch_azint and
jfjoch_process run end-to-end on lyso_test (azint 20 images; full analysis recovers the
lysozyme cell at 25% indexing).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
68 lines
3.2 KiB
CMake
68 lines
3.2 KiB
CMake
|
|
# Offline analysis CLI tools. These link only the portable libraries (reader,
|
|
# image_analysis, writer, common), so they build in viewer-only / Windows packages too
|
|
# and install into the "viewer" component.
|
|
ADD_EXECUTABLE(jfjoch_extract_hkl jfjoch_extract_hkl.cpp
|
|
XdsIntegrateParser.cpp
|
|
XdsIntegrateParser.h)
|
|
TARGET_LINK_LIBRARIES(jfjoch_extract_hkl JFJochReader)
|
|
INSTALL(TARGETS jfjoch_extract_hkl RUNTIME COMPONENT viewer)
|
|
|
|
ADD_EXECUTABLE(jfjoch_process jfjoch_process.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_process JFJochProcess JFJochReader JFJochImageAnalysis JFJochWriter)
|
|
INSTALL(TARGETS jfjoch_process RUNTIME COMPONENT viewer)
|
|
|
|
ADD_EXECUTABLE(jfjoch_scale jfjoch_scale.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_scale JFJochReader JFJochImageAnalysis JFJochWriter)
|
|
INSTALL(TARGETS jfjoch_scale RUNTIME COMPONENT viewer)
|
|
|
|
ADD_EXECUTABLE(jfjoch_azint jfjoch_azint.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_azint JFJochProcess JFJochReader JFJochImageAnalysis JFJochWriter)
|
|
INSTALL(TARGETS jfjoch_azint RUNTIME COMPONENT viewer)
|
|
|
|
# On Windows these CLIs get getopt/getopt_long from the vendored wingetopt shim (libc has none).
|
|
IF (WIN32)
|
|
TARGET_LINK_LIBRARIES(jfjoch_extract_hkl wingetopt)
|
|
TARGET_LINK_LIBRARIES(jfjoch_process wingetopt)
|
|
TARGET_LINK_LIBRARIES(jfjoch_scale wingetopt)
|
|
TARGET_LINK_LIBRARIES(jfjoch_azint wingetopt)
|
|
ENDIF()
|
|
|
|
# Online / hardware tools (broker, FPGA, receiver, detector). They link the non-portable
|
|
# libraries and are Linux-only, so they are skipped in a viewer-only build.
|
|
IF(NOT JFJOCH_VIEWER_ONLY)
|
|
ADD_EXECUTABLE(jfjoch_udp_simulator jfjoch_udp_simulator.cpp UDPSimulator.cpp UDPSimulator.h)
|
|
TARGET_LINK_LIBRARIES(jfjoch_udp_simulator JFJochCommon)
|
|
INSTALL(TARGETS jfjoch_udp_simulator RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_hdf5_test jfjoch_hdf5_test.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_hdf5_test JFJochWriter JFJochReceiver JFJochCommon)
|
|
INSTALL(TARGETS jfjoch_hdf5_test RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_pcie_status jfjoch_pcie_status.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_pcie_status JFJochDevice JFJochCommon)
|
|
INSTALL(TARGETS jfjoch_pcie_status RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_pcie_net_cfg jfjoch_pcie_net_cfg.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_pcie_net_cfg JFJochDevice JFJochCommon)
|
|
INSTALL(TARGETS jfjoch_pcie_net_cfg RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_pcie_clear_net_counters jfjoch_pcie_clear_net_counters.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_pcie_clear_net_counters JFJochDevice JFJochCommon)
|
|
INSTALL(TARGETS jfjoch_pcie_clear_net_counters RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_fpga_test jfjoch_fpga_test.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_fpga_test JFJochReceiver)
|
|
INSTALL(TARGETS jfjoch_fpga_test RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_simplon_test jfjoch_simplon_test.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_simplon_test JFJochDetector JFJochPreview)
|
|
INSTALL(TARGETS jfjoch_simplon_test RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_EXECUTABLE(jfjoch_lite_perf_test jfjoch_lite_perf_test.cpp)
|
|
TARGET_LINK_LIBRARIES(jfjoch_lite_perf_test JFJochReceiver JFJochWriter)
|
|
INSTALL(TARGETS jfjoch_lite_perf_test RUNTIME COMPONENT jfjoch)
|
|
|
|
ADD_SUBDIRECTORY(xbflash.qspi)
|
|
ENDIF()
|