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 22c669c0 authored by Alessandro's avatar Alessandro
Browse files

Merge remote-tracking branch 'origin/master' into MMR_update

parents 756bc428 a20f3f85
......@@ -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",
......
......@@ -412,7 +412,7 @@ class TestFunctionLabel(unittest.TestCase):
def test_meanOrientation(self):
# Generate random main direction
theta = numpy.radians(random.randrange(0, 360, 1))
theta = numpy.radians(random.randrange(30, 300, 1))
phi = numpy.radians(random.randrange(0, 90, 1))
# Generate n random vector near the main direction
n = 1000 #number of vectors
......
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