ComputationalRadiationPhysics / imresh

Shrink-Wrap Phase Reconstruction Algorithm
MIT License
3 stars 2 forks source link

Rework ShrinkWrap Tests #55

Open mxmlnkn opened 8 years ago

mxmlnkn commented 8 years ago

When running the test suite with the IMRESH_DEBUG CMake-Option, then the shrink wrap benchmark will output something like:

(    2,    2) : [Error -nan/1.17549e-38] [Cycle 0/3]
[Error -nan/1.17549e-38] [Cycle 1/3]
[Error -nan/1.17549e-38] [Cycle 2/3]
[Error -nan/1.17549e-38] [Cycle 3/3]
[Error -nan/1.175e-38] [Cycle 0/3]
[Error -nan/1.175e-38] [Cycle 1/3]
[Error -nan/1.175e-38] [Cycle 2/3]
[Error -nan/1.175e-38] [Cycle 3/3]
[Error -nan/1e-05] [Cycle 0/3]
[Error -nan/1e-05] [Cycle 0/3]
[Error -nan/1e-05] [Cycle 0/3]

This may be normal, because the image to reconstruct is just too small. Either remove these cases, or make them work, else the benchmark time may not even have any meaning (e.g. because a faulty loop could be faster or slower).

Add checks to these benchmarks which test if the reconstruction actually worked. Currently it only is timed.