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
41015a35
Commit
41015a35
authored
Sep 20, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multithreaded LMA
parent
c4070b30
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
327 additions
and
38 deletions
+327
-38
Aberration_Calibration.java
src/main/java/Aberration_Calibration.java
+9
-0
FocusingField.java
src/main/java/FocusingField.java
+306
-37
LensAdjustment.java
src/main/java/LensAdjustment.java
+12
-1
No files found.
src/main/java/Aberration_Calibration.java
View file @
41015a35
...
...
@@ -4165,6 +4165,15 @@ if (MORE_BUTTONS) {
double
rms
=
FOCUSING_FIELD
.
calcErrorDiffY
(
focusing_fx
,
false
);
double
rms_pure
=
FOCUSING_FIELD
.
calcErrorDiffY
(
focusing_fx
,
true
);
System
.
out
.
println
(
"rms="
+
rms
+
", rms_pure="
+
rms_pure
+
" - with old parameters may be well off."
);
if
(
FOCUS_MEASUREMENT_PARAMETERS
.
scanRunLMA
){
FOCUSING_FIELD
.
setAdjustMode
(
false
);
boolean
OK
=
FOCUSING_FIELD
.
LevenbergMarquardt
(
null
,
// measurement
false
,
// true, // open dialog
true
,
// boolean autoSel,
DEBUG_LEVEL
);
//boolean openDialog, int debugLevel){
if
(
OK
)
saveCurrentConfig
();
}
remoteNotifyComplete
();
return
;
}
...
...
src/main/java/FocusingField.java
View file @
41015a35
This diff is collapsed.
Click to expand it.
src/main/java/LensAdjustment.java
View file @
41015a35
...
...
@@ -307,6 +307,7 @@ public class LensAdjustment {
public
boolean
scanTiltEnable
=
false
;
//true; // enable scanning tilt
public
boolean
scanTiltReverse
=
false
;
// enable scanning tilt in both directions
public
boolean
scanMeasureLast
=
false
;
// Calculate PSF after last move (to original position)
public
boolean
scanRunLMA
=
true
;
// Calculate PSF after last move (to original position)
public
int
scanTiltRangeX
=
14336
;
// 4 periods
public
int
scanTiltRangeY
=
14336
;
// 4 periods
public
int
scanTiltStepsX
=
24
;
...
...
@@ -524,6 +525,7 @@ public class LensAdjustment {
boolean
scanTiltEnable
,
//=true; // enable scanning tilt
boolean
scanTiltReverse
,
boolean
scanMeasureLast
,
boolean
scanRunLMA
,
int
scanTiltRangeX
,
//=14336; // 4 periods
int
scanTiltRangeY
,
//=14336; // 4 periods
int
scanTiltStepsX
,
//=24;
...
...
@@ -669,6 +671,7 @@ public class LensAdjustment {
this
.
scanTiltEnable
=
scanTiltEnable
;
//=true; // enable scanning tilt
this
.
scanTiltReverse
=
scanTiltReverse
;
this
.
scanMeasureLast
=
scanMeasureLast
;
this
.
scanRunLMA
=
scanRunLMA
;
this
.
scanTiltRangeX
=
scanTiltRangeX
;
//, //=14336; // 4 periods
this
.
scanTiltRangeY
=
scanTiltRangeY
;
//, //=14336; // 4 periods
this
.
scanTiltStepsX
=
scanTiltStepsX
;
//=24;
...
...
@@ -815,6 +818,7 @@ public class LensAdjustment {
this
.
scanTiltEnable
,
// enable scanning tilt
this
.
scanTiltReverse
,
this
.
scanMeasureLast
,
this
.
scanRunLMA
,
this
.
scanTiltRangeX
,
// 4 periods
this
.
scanTiltRangeY
,
// 4 periods
this
.
scanTiltStepsX
,
...
...
@@ -966,6 +970,7 @@ public class LensAdjustment {
properties
.
setProperty
(
prefix
+
"scanTiltEnable"
,
this
.
scanTiltEnable
+
""
);
// enable scanning tilt
properties
.
setProperty
(
prefix
+
"scanTiltReverse"
,
this
.
scanTiltReverse
+
""
);
properties
.
setProperty
(
prefix
+
"scanMeasureLast"
,
this
.
scanMeasureLast
+
""
);
properties
.
setProperty
(
prefix
+
"scanRunLMA"
,
this
.
scanRunLMA
+
""
);
properties
.
setProperty
(
prefix
+
"scanTiltRangeX"
,
this
.
scanTiltRangeX
+
""
);
// 4 periods
properties
.
setProperty
(
prefix
+
"scanTiltRangeY"
,
this
.
scanTiltRangeY
+
""
);
// 4 periods
properties
.
setProperty
(
prefix
+
"scanTiltStepsX"
,
this
.
scanTiltStepsX
+
""
);
...
...
@@ -1226,6 +1231,9 @@ public class LensAdjustment {
if
(
properties
.
getProperty
(
prefix
+
"scanMeasureLast"
)!=
null
)
this
.
scanMeasureLast
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"scanMeasureLast"
));
if
(
properties
.
getProperty
(
prefix
+
"scanRunLMA"
)!=
null
)
this
.
scanRunLMA
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"scanRunLMA"
));
if
(
properties
.
getProperty
(
prefix
+
"scanTiltRangeX"
)!=
null
)
this
.
scanTiltRangeX
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"scanTiltRangeX"
));
if
(
properties
.
getProperty
(
prefix
+
"scanTiltRangeY"
)!=
null
)
...
...
@@ -1374,6 +1382,8 @@ public class LensAdjustment {
gd
.
addCheckbox
(
"Scan for tilt measurement (approximately preserving center)"
,
this
.
scanTiltEnable
);
gd
.
addCheckbox
(
"Scan for tilt measurement in both directions"
,
this
.
scanTiltReverse
);
gd
.
addCheckbox
(
"Calculate PSF after returning to the initial position"
,
this
.
scanMeasureLast
);
gd
.
addCheckbox
(
"Calculate model parameters after scanning"
,
this
.
scanRunLMA
);
gd
.
addNumericField
(
"Full range of scanning motors tilting in X-direction"
,
this
.
scanTiltRangeX
,
0
,
7
,
"motors steps"
);
gd
.
addNumericField
(
"Full range of scanning motors tilting in Y-direction"
,
this
.
scanTiltRangeY
,
0
,
7
,
"motors steps"
);
...
...
@@ -1396,6 +1406,7 @@ public class LensAdjustment {
this
.
scanTiltEnable
=
gd
.
getNextBoolean
();
this
.
scanTiltReverse
=
gd
.
getNextBoolean
();
this
.
scanMeasureLast
=
gd
.
getNextBoolean
();
this
.
scanRunLMA
=
gd
.
getNextBoolean
();
this
.
scanTiltRangeX
=
(
int
)
gd
.
getNextNumber
();
this
.
scanTiltRangeY
=
(
int
)
gd
.
getNextNumber
();
...
...
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