areaDetector / ADCore

The home of the core components of the EPICS areaDetector software. It includes base classes for drivers and code for all of the standard plugins.
https://areadetector.github.io/master/index.html
Other
20 stars 65 forks source link

Removed unnecessary creation of 1x1 dimensions #474

Closed GDYendell closed 2 years ago

GDYendell commented 2 years ago

This simplfies visualisation and plotting of these datasets as part of our hardware triggered scanning framework. With this change, extra dims will be added to match the shape of a scan, but it won't additionally pad the dimensions by an extra two to match (frame, height, width) detector datasets.

I am happy to make this a config option if it is neccesary to retain to the current behaviour.

cc @ajgdls

MarkRivers commented 2 years ago

@GDYendell I think DLS is probably the main site using the extra dimensions feature. So if this change is OK with you folks I think it should be OK to merge.

Do any others object?

MarkRivers commented 2 years ago

@GDYendell I believe this changed causes one of the unit tests to fail 33 times as follows:


Leaving test case "test_AttributeOriginalDataset"; testing time: 10ms Entering test case "test_AttributeDimensionalDataset" ../test_NDFileHDF5AttributeDataset.cpp(612): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(616): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [680 != 1] ../test_NDFileHDF5AttributeDataset.cpp(617): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [48 != 1] ../test_NDFileHDF5AttributeDataset.cpp(624): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(628): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [0 != 1] ../test_NDFileHDF5AttributeDataset.cpp(629): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [18446744073709551615 != 1] ../test_NDFileHDF5AttributeDataset.cpp(636): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(640): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [0 != 1] ../test_NDFileHDF5AttributeDataset.cpp(641): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [48 != 1] ../test_NDFileHDF5AttributeDataset.cpp(648): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(652): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [4294967296 != 1] ../test_NDFileHDF5AttributeDataset.cpp(653): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [35046768 != 1] ../test_NDFileHDF5AttributeDataset.cpp(660): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(664): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [33942160 != 1] ../test_NDFileHDF5AttributeDataset.cpp(665): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [48 != 1] ../test_NDFileHDF5AttributeDataset.cpp(672): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(676): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [14826200 != 1] ../test_NDFileHDF5AttributeDataset.cpp(677): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [48 != 1] ../test_NDFileHDF5AttributeDataset.cpp(684): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(688): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [14826200 != 1] ../test_NDFileHDF5AttributeDataset.cpp(689): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [48 != 1] ../test_NDFileHDF5AttributeDataset.cpp(696): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(700): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [8 != 1] ../test_NDFileHDF5AttributeDataset.cpp(701): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [48 != 1] ../test_NDFileHDF5AttributeDataset.cpp(708): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(712): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [64 != 1] ../test_NDFileHDF5AttributeDataset.cpp(713): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [34329392 != 1] ../test_NDFileHDF5AttributeDataset.cpp(720): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(724): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [36 != 1] ../test_NDFileHDF5AttributeDataset.cpp(725): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [4294967295 != 1] ../test_NDFileHDF5AttributeDataset.cpp(732): error in "test_AttributeDimensionalDataset": check dims.size() == 5 failed [3 != 5] ../test_NDFileHDF5AttributeDataset.cpp(736): error in "test_AttributeDimensionalDataset": check dims[3] == 1 failed [97 != 1] ../test_NDFileHDF5AttributeDataset.cpp(737): error in "test_AttributeDimensionalDataset": check dims[4] == 1 failed [140078594766776 != 1] Leaving test case "test_AttributeDimensionalDataset"; testing time: 10ms Entering test case "test_ExtraDatasetDimensions"


I neglected to follow my checklist before releasing ADCore R3-12, so I did not notice this first. Would you be able to verify this and fix it? I'd like to release R3-12-1 soon.

MarkRivers commented 2 years ago

I have fixed this problem with the test program.

I have also updated the documentation to remove the reference to the extra 1x1 dimensions.

GDYendell commented 2 years ago

Thanks for fixing that, Mark. I should have checked that.

The tests don't run on travis at all anymore. There is #465 to use ci-scripts and Github Actions if you have the time to look at it.