The mapping took its width and height from the CONVERTED geometry unconditionally, while pixel_to_bin is sized per mode: converted when the geometry is transformed, raw module layout when it is not. In raw mode the two disagreed - 2068x2162 reported against a 1024x4096 map on a JF4M. Only the adaptive spot finders read those dimensions, and they read them for exactly the thing that breaks: the CPU finder derives npix = w*h and then indexes the image, pixel_to_bin and the resolution mask with it, so it walked ~277k pixels past the end of all three; the GPU finder stays in bounds but decodes the strong-pixel bit index with the wrong row stride and reports spots at wrong coordinates. Nothing combines raw geometry with adaptive detection today, so this was latent rather than live. Take them from GetXPixelsNum()/GetYPixelsNum(), which already follow the geometry mode. The converted path is unchanged - it is the same number there - and every internal use is inside SetupConvGeom, which only runs when the geometry is transformed. Covered by two tests: the mapping's dimensions must match pixel_to_bin in both modes, and the CPU adaptive finder must return a spot planted on a raw-geometry image at that raw pixel. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
105 lines
3.5 KiB
CMake
105 lines
3.5 KiB
CMake
ADD_EXECUTABLE(jfjoch_test
|
|
DiffractionExperimentTest.cpp
|
|
RawToConvertedGeometryTest.cpp
|
|
../common/RawToConvertedGeometry.h
|
|
../common/DiffractionExperiment.h
|
|
CheckImageOutput.h
|
|
FPGAIntegrationTest.cpp
|
|
StrongPixelSetTest.cpp
|
|
AdaptiveThresholdTest.cpp
|
|
AdaptiveSpotFinderCPUTest.cpp
|
|
ZSTDCompressorTest.cpp
|
|
FrameTransformationTest.cpp
|
|
HDF5WritingTest.cpp PedestalCalcTest.cpp
|
|
ZMQImagePusherTest.cpp StreamWriterTest.cpp
|
|
CoordTest.cpp JFJochStateMachineTest.cpp
|
|
JFJochReceiverIntegrationTest.cpp
|
|
AcquisitionCountersTest.cpp
|
|
IndexingUnitTest.cpp
|
|
ThreadSafeFIFOSetTest.cpp
|
|
FPGANetworkTest.cpp
|
|
JFPedestalTest.cpp
|
|
JFCalibrationTest.cpp
|
|
AzimuthalIntegrationTest.cpp
|
|
StatusVectorTest.cpp
|
|
CBORTest.cpp
|
|
DetectorGeometryTest.cpp DetectorSetupTest.cpp DiffractionGeometryTest.cpp
|
|
FPGASpotFindingUnitTest.cpp
|
|
PreviewCounterTest.cpp
|
|
FPGAFrameGeneratorTest.cpp
|
|
FPGAHostWriterTest.cpp
|
|
DiffractionSpotTest.cpp
|
|
TIFFTest.cpp
|
|
JFJochReceiverProcessingTest.cpp
|
|
JPEGTest.cpp
|
|
HistogramTest.cpp
|
|
ROIMapTest.cpp
|
|
ROIIntegrationCPUTest.cpp
|
|
ROIIntegrationGPUTest.cpp
|
|
BraggIntegrationEngineGPUTest.cpp
|
|
BraggIntegrationEngineCompressedImageTest.cpp
|
|
LossyFilterTest.cpp
|
|
ImageBufferTest.cpp
|
|
PixelMaskTest.cpp
|
|
RegressionTest.cpp
|
|
FPGAHLSModulesTest.cpp
|
|
ZMQPreviewSocketTest.cpp
|
|
DetectorSettingsTest.cpp
|
|
AutoIncrVectorTest.cpp
|
|
ModuleSummationTest.cpp
|
|
ZMQMetadataSocketTest.cpp
|
|
JFJochReaderTest.cpp
|
|
RugnuxTest.cpp
|
|
RugnuxLargeTest.cpp
|
|
TestData.h
|
|
MovingAverageTest.cpp
|
|
ImageMetadataTest.cpp
|
|
JFJochReceiverLiteTest.cpp
|
|
GridScanSettingsTest.cpp
|
|
JFJochReceiverPlotsTest.cpp
|
|
GoniometerAxisTest.cpp
|
|
DetGeomCalibTest.cpp
|
|
XtalOptimizerTest.cpp
|
|
CrystalLatticeTest.cpp
|
|
FPGAPTPTest.cpp
|
|
ResolutionShellsTest.cpp
|
|
ImageSpotFinderCPUTest.cpp
|
|
ImageSpotFinderGPUTest.cpp
|
|
AdaptiveSpotFinderGPUTest.cpp
|
|
AdaptiveThresholdTest.cpp
|
|
CalcBraggPredictionTest.cpp
|
|
SpotUtilsTest.cpp
|
|
LatticeSearchTest.cpp
|
|
TimeTest.cpp
|
|
RotationIndexerTest.cpp
|
|
TopPixelsTest.cpp
|
|
HKLKeyTest.cpp
|
|
TCPImagePusherTest.cpp
|
|
SearchSpaceGroupTest.cpp
|
|
SearchSpaceGroupTwinTest.cpp
|
|
SyntheticMergedReflections.h
|
|
XDSPluginTest.cpp
|
|
MergeScaleTest.cpp
|
|
RfreeFlagsTest.cpp
|
|
FrenchWilsonTest.cpp
|
|
ReindexAmbiguityTest.cpp
|
|
LoadReferenceMtzFreeFlagsTest.cpp
|
|
UnitCellTest.cpp
|
|
CCTest.cpp
|
|
MultiLatticeSearchTest.cpp
|
|
LatticeReductionTest.cpp
|
|
)
|
|
|
|
target_link_libraries(jfjoch_test Catch2WithMain JFJochBroker JFJochReceiver JFJochReader JFJochStreamWriter
|
|
Rugnux JFJochImageAnalysis JFJochCommon JFJochHLSSimulation JFJochPreview
|
|
jfjoch_xds_plugin)
|
|
target_include_directories(jfjoch_test PRIVATE .)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_library(enospc_shim MODULE enospc_shim.c)
|
|
target_link_libraries(enospc_shim PRIVATE Threads::Threads dl)
|
|
set_target_properties(enospc_shim PROPERTIES PREFIX "" POSITION_INDEPENDENT_CODE ON) # remove "lib"
|
|
|
|
ADD_EXECUTABLE(jfjoch_hdf5_enospc_test jfjoch_hdf5_enospc_test.cpp)
|
|
target_link_libraries(jfjoch_hdf5_enospc_test Catch2WithMain JFJochWriter) |