Commit 201a8ecf authored by Olga Stamati's avatar Olga Stamati
Browse files

[skip-ci] force all input images to have the same size in spam-ldic and spam-ddic

parent c9815a60
Pipeline #50764 skipped
...@@ -109,11 +109,9 @@ if mpiRank == boss or not mpi: ...@@ -109,11 +109,9 @@ if mpiRank == boss or not mpi:
if len(lab1.shape) == 2: lab1 = lab1[numpy.newaxis, ...] if len(lab1.shape) == 2: lab1 = lab1[numpy.newaxis, ...]
if len(im2.shape) == 2: im2 = im2[ numpy.newaxis, ...] if len(im2.shape) == 2: im2 = im2[ numpy.newaxis, ...]
if (im1.shape != lab1.shape): assert(im1.shape == im2.shape), "\nim1 and im2 must have the same size! Exiting."
print("#############################################################") assert(im1.shape == lab1.shape), "\nim1 and lab1 must have the same size! Exiting."
print("# im1 and lab1 have different shapes!!! #")
print("#############################################################")
############################################################### ###############################################################
# Analyse labelled volume in state 01 in order to get bounding # Analyse labelled volume in state 01 in order to get bounding
# boxes and centres of mass for correlation # boxes and centres of mass for correlation
......
...@@ -139,6 +139,10 @@ if mpiRank == boss or not mpi: ...@@ -139,6 +139,10 @@ if mpiRank == boss or not mpi:
if len(im2.shape) == 2: if len(im2.shape) == 2:
im2 = im2[numpy.newaxis, ...] im2 = im2[numpy.newaxis, ...]
assert(im1.shape == im2.shape), "\nim1 and im2 must have the same size! Exiting."
if args.MASK1:
assert(im1.shape == im1mask.shape), "\nim1 and im1mask must have the same size! Exiting."
nodePositions, nodesDim = spam.DIC.grid.makeGrid(im1.shape, args.NS) nodePositions, nodesDim = spam.DIC.grid.makeGrid(im1.shape, args.NS)
# Initialise field of Fs with the identity matrix # Initialise field of Fs with the identity matrix
......
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