Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 0b901389 authored by Olga Stamati's avatar Olga Stamati
Browse files

trial to fix the test of spam-moveLabels

parent be865c3f
Pipeline #51148 passed with stages
in 24 minutes and 38 seconds
......@@ -386,8 +386,8 @@ class testAll(unittest.TestCase):
#test of rigid translation and rotation
#Create Phi and Apply (2 px displacement on X-axis, and 5 degree rotation along Z axis)
translationStep1 = [0, 0, 2]
rotationStep1 = [5, 0, 0]
translationStep1 = numpy.array([0.0, 0.0, 2.0])
rotationStep1 = numpy.array([5.0, 0.0, 0.0])
transformation = {'t': translationStep1, 'r': rotationStep1}
Phi = spam.deformation.computePhi(transformation)
......@@ -523,22 +523,20 @@ class testAll(unittest.TestCase):
"-rst", "2"])
self.assertEqual(exitCode, 0)
# Load displaced labelled image
imDef = tifffile.imread(testFolder + "Lab0-displaced.tif")
COMref = spam.label.centresOfMass(labIm0)
COMdef = spam.label.centresOfMass(imDef)
# Load displaced labelled image
labelDisp = numpy.nanmean(COMdef - COMref[0:COMdef.shape[0]], axis=0)
# Go from 0:COMdef.shape[0] in case any labels are lost
labelDisp = numpy.mean(COMdef - COMref[0:COMdef.shape[0]], axis=0)
self.assertAlmostEqual(translationStep1[0], labelDisp[0], places=0)
self.assertAlmostEqual(translationStep1[1], labelDisp[1], places=0)
self.assertAlmostEqual(translationStep1[2], labelDisp[2], places=0)
#######################################################
### 2. Run ddic -- Step0 -> Step1 with multiscale
#######################################################
########################################################
#### 2. Run ddic -- Step0 -> Step1 with multiscale
########################################################
# Just run a simple DVC with no outputs
exitCode = subprocess.call(["spam-ddic",
"-reg", "-regbb", "2",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment