Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ttk
spam
Commits
80cec2d9
Commit
80cec2d9
authored
Apr 20, 2021
by
Edward Andò
Browse files
correct solution
parent
78961689
Pipeline
#65120
passed with stages
in 13 minutes and 35 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
scripts/spam-ldic
View file @
80cec2d9
...
@@ -227,6 +227,7 @@ for im2number in range(1, len(args.inFiles)):
...
@@ -227,6 +227,7 @@ for im2number in range(1, len(args.inFiles)):
else
:
# we have a Phi field and not a registration
else
:
# we have a Phi field and not a registration
nodePositions
=
PhiFromFile
[
"fieldCoords"
]
nodePositions
=
PhiFromFile
[
"fieldCoords"
]
numberOfNodes
=
nodePositions
.
shape
[
0
]
numberOfNodes
=
nodePositions
.
shape
[
0
]
nodesDim
=
PhiFromFile
[
"fieldDims"
]
nodeSpacingFile
=
numpy
.
array
([
numpy
.
unique
(
nodePositions
[:,
i
])[
1
]
-
numpy
.
unique
(
nodePositions
[:,
i
])[
0
]
if
len
(
numpy
.
unique
(
nodePositions
[:,
i
]))
>
1
else
numpy
.
unique
(
nodePositions
[:,
i
])[
0
]
for
i
in
range
(
3
)])
nodeSpacingFile
=
numpy
.
array
([
numpy
.
unique
(
nodePositions
[:,
i
])[
1
]
-
numpy
.
unique
(
nodePositions
[:,
i
])[
0
]
if
len
(
numpy
.
unique
(
nodePositions
[:,
i
]))
>
1
else
numpy
.
unique
(
nodePositions
[:,
i
])[
0
]
for
i
in
range
(
3
)])
PhiField
=
PhiFromFile
[
"PhiField"
]
PhiField
=
PhiFromFile
[
"PhiField"
]
...
@@ -347,7 +348,7 @@ for im2number in range(1, len(args.inFiles)):
...
@@ -347,7 +348,7 @@ for im2number in range(1, len(args.inFiles)):
#header=TSVheader)
#header=TSVheader)
if
args
.
TIFF
:
if
args
.
TIFF
:
if
no
t
twoD
:
if
no
desDim
[
0
]
!=
1
:
tifffile
.
imsave
(
args
.
OUT_DIR
+
"/"
+
args
.
PREFIX
+
"-ldic-Zdisp.tif"
,
PhiField
[:,
0
,
-
1
].
astype
(
'<f4'
).
reshape
(
nodesDim
))
tifffile
.
imsave
(
args
.
OUT_DIR
+
"/"
+
args
.
PREFIX
+
"-ldic-Zdisp.tif"
,
PhiField
[:,
0
,
-
1
].
astype
(
'<f4'
).
reshape
(
nodesDim
))
#if args.REGSUB:
#if args.REGSUB:
#tifffile.imsave(args.OUT_DIR+"/"+args.PREFIX+"-Zdisp-regsub.tif", PhiFieldMinusRigid[:, 0, -1].astype('<f4').reshape(nodesDim))
#tifffile.imsave(args.OUT_DIR+"/"+args.PREFIX+"-Zdisp-regsub.tif", PhiFieldMinusRigid[:, 0, -1].astype('<f4').reshape(nodesDim))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment