Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
0c488df6
Commit
0c488df6
authored
Sep 15, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes
parent
1d7456a6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
Aberration_Calibration.java
src/main/java/Aberration_Calibration.java
+15
-6
FocusingField.java
src/main/java/FocusingField.java
+5
-5
No files found.
src/main/java/Aberration_Calibration.java
View file @
0c488df6
...
...
@@ -5171,9 +5171,9 @@ if (MORE_BUTTONS) {
if
(
MASTER_DEBUG_LEVEL
>
0
)
{
String
msg
=
"Failed to calulate average focus/tilt"
;
if
(
ZTM
!=
null
)
msg
=
"Average:\n"
+
"Relative focal shift "
+
IJ
.
d2s
(
ZTM
[
0
],
3
)+
"um\n"
+
"
Horizontal tilt "
+
IJ
.
d2s
(
ZTM
[
1
],
3
)+
"um/mm
\n"
+
"
Vertical tilt "
+
IJ
.
d2s
(
ZTM
[
2
],
3
)+
"um/mm
\n"
+
"Relative focal shift "
+
IJ
.
d2s
(
ZTM
[
0
],
3
)+
"um
(absolute - "
+
IJ
.
d2s
(
ZTM
[
0
]+
FOCUSING_FIELD
.
qualBOptimizationResults
[
0
],
3
)+
"um)
\n"
+
"
Relative horizontal tilt "
+
IJ
.
d2s
(
ZTM
[
1
],
3
)+
"um/mm (absolute - "
+
IJ
.
d2s
(
ZTM
[
1
]+
FOCUSING_FIELD
.
qualBOptimizationResults
[
1
],
3
)+
"um.mm)
\n"
+
"
Relative vertical tilt "
+
IJ
.
d2s
(
ZTM
[
2
],
3
)+
"um/mm (absolute - "
+
IJ
.
d2s
(
ZTM
[
2
]+
FOCUSING_FIELD
.
qualBOptimizationResults
[
2
],
3
)+
"um.mm)
\n"
+
"Suggested M1 "
+
IJ
.
d2s
(
ZTM
[
3
],
0
)+
"steps\n"
+
"Suggested M2 "
+
IJ
.
d2s
(
ZTM
[
4
],
0
)+
"steps\n"
+
"Suggested M3 "
+
IJ
.
d2s
(
ZTM
[
5
],
0
)+
"steps"
;
...
...
@@ -8928,10 +8928,15 @@ if (MORE_BUTTONS) {
double
scaleMovement
=
1.0
;
// calculate automatically - reduce when close
boolean
parallelMove
=
false
;
if
(
MASTER_DEBUG_LEVEL
>
0
){
System
.
out
.
println
(
"----- Optimal (for qualB) focus/tilt -----"
);
System
.
out
.
println
(
"Optimal absolute Zc="
+
FOCUSING_FIELD
.
qualBOptimizationResults
[
0
]);
System
.
out
.
println
(
"Optimal Tx="
+
FOCUSING_FIELD
.
qualBOptimizationResults
[
1
]);
System
.
out
.
println
(
"Optimal Ty="
+
FOCUSING_FIELD
.
qualBOptimizationResults
[
2
]);
System
.
out
.
println
(
"----- Focus/tilt measurement results -----"
);
System
.
out
.
println
(
"Relative focal shift "
+
IJ
.
d2s
(
zTxTy
[
0
],
3
)+
" um ("
+
IJ
.
d2s
(
FOCUSING_FIELD
.
targetRelFocalShift
,
3
)+
"um)"
);
System
.
out
.
println
(
"
H
orizontal tilt "
+
IJ
.
d2s
(
zTxTy
[
1
],
3
)+
" um/mm ("
+
IJ
.
d2s
(
targetTilts
[
0
],
3
)+
"um/mm)"
);
System
.
out
.
println
(
"
V
ertical tilt "
+
IJ
.
d2s
(
zTxTy
[
2
],
3
)+
" um/mm ("
+
IJ
.
d2s
(
targetTilts
[
1
],
3
)+
"um/mm)"
);
System
.
out
.
println
(
"Relative
to optimal
focal shift "
+
IJ
.
d2s
(
zTxTy
[
0
],
3
)+
" um ("
+
IJ
.
d2s
(
FOCUSING_FIELD
.
targetRelFocalShift
,
3
)+
"um)"
);
System
.
out
.
println
(
"
Relative to optimal h
orizontal tilt "
+
IJ
.
d2s
(
zTxTy
[
1
],
3
)+
" um/mm ("
+
IJ
.
d2s
(
targetTilts
[
0
],
3
)+
"um/mm)"
);
System
.
out
.
println
(
"
Relative to optimal v
ertical tilt "
+
IJ
.
d2s
(
zTxTy
[
2
],
3
)+
" um/mm ("
+
IJ
.
d2s
(
targetTilts
[
1
],
3
)+
"um/mm)"
);
for
(
int
i
=
0
;
i
<
newMotors
.
length
;
i
++){
System
.
out
.
println
(
"Suggested for motor "
+(
i
+
1
)+
" "
+
newMotors
[
i
]+
" ("
+
currentMotors
[
i
]+
")"
);
}
...
...
@@ -8955,6 +8960,10 @@ if (MORE_BUTTONS) {
gd
.
addNumericField
(
"Target horizontal tilt relative to optimal (normally 0)"
,
targetTilts
[
0
],
2
,
5
,
"um/mm ("
+
IJ
.
d2s
(
zTxTy
[
1
],
3
)+
")"
);
gd
.
addNumericField
(
"Target vertical tilt relative to optimal (normally 0)"
,
targetTilts
[
1
],
2
,
5
,
"um/mm ("
+
IJ
.
d2s
(
zTxTy
[
2
],
3
)+
")"
);
gd
.
addMessage
(
"Optimal absolute Zc="
+
FOCUSING_FIELD
.
qualBOptimizationResults
[
0
]);
gd
.
addMessage
(
"Optimal Tx="
+
FOCUSING_FIELD
.
qualBOptimizationResults
[
1
]);
gd
.
addMessage
(
"Optimal Ty="
+
FOCUSING_FIELD
.
qualBOptimizationResults
[
2
]);
gd
.
addCheckbox
(
"Optimize focal distance"
,(
FOCUSING_FIELD
.
qualBOptimizeMode
&
1
)
!=
0
);
gd
.
addCheckbox
(
"Optimize tiltX"
,
(
FOCUSING_FIELD
.
qualBOptimizeMode
&
2
)
!=
0
);
gd
.
addCheckbox
(
"Optimize tiltY"
,
(
FOCUSING_FIELD
.
qualBOptimizeMode
&
4
)
!=
0
);
...
...
src/main/java/FocusingField.java
View file @
0c488df6
...
...
@@ -4790,7 +4790,7 @@ public boolean LevenbergMarquardt(
return
result
;
}
public
double
[]
averageZTM
(
public
double
[]
averageZTM
(
// results relative to optimal
boolean
noTiltScan
,
FocusingField
ff
){
double
[]
result
=
new
double
[
6
];
...
...
@@ -4807,7 +4807,7 @@ public boolean LevenbergMarquardt(
for
(
int
i
=
0
;
i
<
result
.
length
;
i
++)
result
[
i
]/=
num
;
return
result
;
}
public
double
[]
adjustLMA
(
public
double
[]
adjustLMA
(
// result relative to optimal
boolean
noTiltScan
,
FocusingFieldMeasurement
measurement
,
boolean
parallelMove
){
...
...
@@ -4826,9 +4826,9 @@ public boolean LevenbergMarquardt(
if
(
debugLevel
>
0
)
System
.
out
.
println
(
"Calculating optimal focal/tilt, qualBOptimizeMode="
+
this
.
qualBOptimizeMode
);
testQualB
(
false
);
// optimize qualB, store results in this.qualBOptimizationResults
if
(
debugLevel
>
0
)
{
System
.
out
.
println
(
"
Target
Zc="
+
this
.
qualBOptimizationResults
[
0
]);
System
.
out
.
println
(
"
Target
Tx="
+
this
.
qualBOptimizationResults
[
1
]);
System
.
out
.
println
(
"
Target
Ty="
+
this
.
qualBOptimizationResults
[
2
]);
System
.
out
.
println
(
"
Optimal absolute
Zc="
+
this
.
qualBOptimizationResults
[
0
]);
System
.
out
.
println
(
"
Optimal
Tx="
+
this
.
qualBOptimizationResults
[
1
]);
System
.
out
.
println
(
"
Optimal
Ty="
+
this
.
qualBOptimizationResults
[
2
]);
}
// double [] best_qb_corr= fieldFitting.getBestQualB(
...
...
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