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
c4070b30
Commit
c4070b30
authored
Sep 19, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
automatic save history name, and restory history file
parent
79dd9ba6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
19 deletions
+133
-19
Aberration_Calibration.java
src/main/java/Aberration_Calibration.java
+119
-18
FocusingField.java
src/main/java/FocusingField.java
+3
-0
LensAdjustment.java
src/main/java/LensAdjustment.java
+11
-1
No files found.
src/main/java/Aberration_Calibration.java
View file @
c4070b30
This diff is collapsed.
Click to expand it.
src/main/java/FocusingField.java
View file @
c4070b30
...
@@ -4480,6 +4480,9 @@ public boolean LevenbergMarquardt(
...
@@ -4480,6 +4480,9 @@ public boolean LevenbergMarquardt(
motors
,
motors
,
sampleStrings
));
sampleStrings
));
}
}
if
(
debugLevel
>
0
){
System
.
out
.
println
(
"Loaded measurement history "
+
pathname
);
}
return
true
;
return
true
;
}
}
public
void
saveXML
(
public
void
saveXML
(
...
...
src/main/java/LensAdjustment.java
View file @
c4070b30
...
@@ -194,6 +194,7 @@ public class LensAdjustment {
...
@@ -194,6 +194,7 @@ public class LensAdjustment {
public
static
class
FocusMeasurementParameters
{
public
static
class
FocusMeasurementParameters
{
public
String
gridGeometryFile
=
""
;
public
String
gridGeometryFile
=
""
;
public
String
initialCalibrationFile
=
""
;
public
String
initialCalibrationFile
=
""
;
public
String
focusingHistoryFile
=
""
;
public
String
strategyFile
=
""
;
public
String
strategyFile
=
""
;
public
String
resultsSuperDirectory
=
""
;
// directory with subdirectories named as serial numbers to stro results
public
String
resultsSuperDirectory
=
""
;
// directory with subdirectories named as serial numbers to stro results
public
int
EEPROM_channel
=
1
;
// EEPROM channel to read serial number from
public
int
EEPROM_channel
=
1
;
// EEPROM channel to read serial number from
...
@@ -414,7 +415,7 @@ public class LensAdjustment {
...
@@ -414,7 +415,7 @@ public class LensAdjustment {
this
.
result_tiltY
=
Double
.
NaN
;
// last measured tilt Y
this
.
result_tiltY
=
Double
.
NaN
;
// last measured tilt Y
this
.
result_R50
=
Double
.
NaN
;
// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this
.
result_R50
=
Double
.
NaN
;
// last measured R50 (average PSF 50% level radius, pixels - somewhat larged than actual because of measurement settings)
this
.
result_A50
=
Double
.
NaN
;
// last measured A50 (simailar, but R^2 are averaged)
this
.
result_A50
=
Double
.
NaN
;
// last measured A50 (simailar, but R^2 are averaged)
this
.
result_B50
=
Double
.
NaN
;
// last measured B50 (sim
a
ilar, but R^4 are averaged)
this
.
result_B50
=
Double
.
NaN
;
// last measured B50 (similar, but R^4 are averaged)
this
.
result_RC50
=
Double
.
NaN
;
// last measured RC50(R50 calculated only for the 2 center samples)
this
.
result_RC50
=
Double
.
NaN
;
// last measured RC50(R50 calculated only for the 2 center samples)
this
.
result_PX0
=
Double
.
NaN
;
// lens center shift, X
this
.
result_PX0
=
Double
.
NaN
;
// lens center shift, X
this
.
result_PY0
=
Double
.
NaN
;
// lens center shift, Y
this
.
result_PY0
=
Double
.
NaN
;
// lens center shift, Y
...
@@ -427,6 +428,7 @@ public class LensAdjustment {
...
@@ -427,6 +428,7 @@ public class LensAdjustment {
String
initialCalibrationFile
,
String
initialCalibrationFile
,
String
strategyFile
,
String
strategyFile
,
String
resultsSuperDirectory
,
// directory with subdirectories named as serial numbers to stro results
String
resultsSuperDirectory
,
// directory with subdirectories named as serial numbers to stro results
String
focusingHistoryFile
,
int
EEPROM_channel
,
// EEPROM channel to read serial number from
int
EEPROM_channel
,
// EEPROM channel to read serial number from
boolean
saveResults
,
// save focusing results
boolean
saveResults
,
// save focusing results
boolean
showResults
,
// show focusing (includingh intermediate) results
boolean
showResults
,
// show focusing (includingh intermediate) results
...
@@ -572,6 +574,7 @@ public class LensAdjustment {
...
@@ -572,6 +574,7 @@ public class LensAdjustment {
this
.
initialCalibrationFile
=
initialCalibrationFile
;
this
.
initialCalibrationFile
=
initialCalibrationFile
;
this
.
strategyFile
=
strategyFile
;
this
.
strategyFile
=
strategyFile
;
this
.
resultsSuperDirectory
=
resultsSuperDirectory
;
// directory with subdirectories named as serial numbers to stro results
this
.
resultsSuperDirectory
=
resultsSuperDirectory
;
// directory with subdirectories named as serial numbers to stro results
this
.
focusingHistoryFile
=
focusingHistoryFile
;
this
.
EEPROM_channel
=
EEPROM_channel
;
// EEPROM channel to read serial number from
this
.
EEPROM_channel
=
EEPROM_channel
;
// EEPROM channel to read serial number from
this
.
saveResults
=
saveResults
;
// save focusing results
this
.
saveResults
=
saveResults
;
// save focusing results
this
.
showResults
=
showResults
;
// show focusing (includingh intermediate) results
this
.
showResults
=
showResults
;
// show focusing (includingh intermediate) results
...
@@ -718,6 +721,7 @@ public class LensAdjustment {
...
@@ -718,6 +721,7 @@ public class LensAdjustment {
this
.
initialCalibrationFile
,
this
.
initialCalibrationFile
,
this
.
strategyFile
,
this
.
strategyFile
,
this
.
resultsSuperDirectory
,
// directory with subdirectories named as serial numbers to stro results
this
.
resultsSuperDirectory
,
// directory with subdirectories named as serial numbers to stro results
this
.
focusingHistoryFile
,
this
.
EEPROM_channel
,
// EEPROM channel to read serial number from
this
.
EEPROM_channel
,
// EEPROM channel to read serial number from
this
.
saveResults
,
// save focusing results
this
.
saveResults
,
// save focusing results
this
.
showResults
,
// show focusing (includingh intermediate) results
this
.
showResults
,
// show focusing (includingh intermediate) results
...
@@ -862,6 +866,7 @@ public class LensAdjustment {
...
@@ -862,6 +866,7 @@ public class LensAdjustment {
properties
.
setProperty
(
prefix
+
"initialCalibrationFile"
,
this
.
initialCalibrationFile
+
""
);
properties
.
setProperty
(
prefix
+
"initialCalibrationFile"
,
this
.
initialCalibrationFile
+
""
);
properties
.
setProperty
(
prefix
+
"strategyFile"
,
this
.
strategyFile
+
""
);
properties
.
setProperty
(
prefix
+
"strategyFile"
,
this
.
strategyFile
+
""
);
properties
.
setProperty
(
prefix
+
"resultsSuperDirectory"
,
this
.
resultsSuperDirectory
+
""
);
properties
.
setProperty
(
prefix
+
"resultsSuperDirectory"
,
this
.
resultsSuperDirectory
+
""
);
properties
.
setProperty
(
prefix
+
"focusingHistoryFile"
,
this
.
focusingHistoryFile
+
""
);
properties
.
setProperty
(
prefix
+
"serialNumber"
,
this
.
serialNumber
+
""
);
properties
.
setProperty
(
prefix
+
"serialNumber"
,
this
.
serialNumber
+
""
);
if
(!
Double
.
isNaN
(
this
.
sensorTemperature
))
properties
.
setProperty
(
prefix
+
"sensorTemperature"
,
this
.
sensorTemperature
+
""
);
if
(!
Double
.
isNaN
(
this
.
sensorTemperature
))
properties
.
setProperty
(
prefix
+
"sensorTemperature"
,
this
.
sensorTemperature
+
""
);
if
(!
Double
.
isNaN
(
this
.
result_lastKT
))
properties
.
setProperty
(
prefix
+
"result_lastKT"
,
this
.
result_lastKT
+
""
);
if
(!
Double
.
isNaN
(
this
.
result_lastKT
))
properties
.
setProperty
(
prefix
+
"result_lastKT"
,
this
.
result_lastKT
+
""
);
...
@@ -1017,6 +1022,9 @@ public class LensAdjustment {
...
@@ -1017,6 +1022,9 @@ public class LensAdjustment {
this
.
strategyFile
=
properties
.
getProperty
(
prefix
+
"strategyFile"
);
this
.
strategyFile
=
properties
.
getProperty
(
prefix
+
"strategyFile"
);
if
(
properties
.
getProperty
(
prefix
+
"resultsSuperDirectory"
)!=
null
)
if
(
properties
.
getProperty
(
prefix
+
"resultsSuperDirectory"
)!=
null
)
this
.
resultsSuperDirectory
=
properties
.
getProperty
(
prefix
+
"resultsSuperDirectory"
);
this
.
resultsSuperDirectory
=
properties
.
getProperty
(
prefix
+
"resultsSuperDirectory"
);
if
(
properties
.
getProperty
(
prefix
+
"focusingHistoryFile"
)!=
null
)
this
.
focusingHistoryFile
=
properties
.
getProperty
(
prefix
+
"focusingHistoryFile"
);
if
(
properties
.
getProperty
(
prefix
+
"serialNumber"
)!=
null
)
if
(
properties
.
getProperty
(
prefix
+
"serialNumber"
)!=
null
)
this
.
serialNumber
=
properties
.
getProperty
(
prefix
+
"serialNumber"
);
this
.
serialNumber
=
properties
.
getProperty
(
prefix
+
"serialNumber"
);
// this.serialNumber is only written, but never read from the configuration file (only from devivce)
// this.serialNumber is only written, but never read from the configuration file (only from devivce)
...
@@ -1422,6 +1430,7 @@ public class LensAdjustment {
...
@@ -1422,6 +1430,7 @@ public class LensAdjustment {
gd
.
addStringField
(
"Initial camera intrinsic/extrinsic parametres file"
,
this
.
initialCalibrationFile
,
40
);
gd
.
addStringField
(
"Initial camera intrinsic/extrinsic parametres file"
,
this
.
initialCalibrationFile
,
40
);
gd
.
addStringField
(
"Levenberg-Marquardt algorithm strategy file"
,
this
.
strategyFile
,
40
);
gd
.
addStringField
(
"Levenberg-Marquardt algorithm strategy file"
,
this
.
strategyFile
,
40
);
gd
.
addStringField
(
"Focusing results superdirectory (individual will be named by serial numbers)"
,
this
.
resultsSuperDirectory
,
40
);
gd
.
addStringField
(
"Focusing results superdirectory (individual will be named by serial numbers)"
,
this
.
resultsSuperDirectory
,
40
);
gd
.
addStringField
(
"Measurement history (acquired during \"Scan Calib LMA\" file"
,
this
.
focusingHistoryFile
,
80
);
gd
.
addNumericField
(
"EEPROM channel to read sensor serial number from"
,
this
.
EEPROM_channel
,
0
,
4
,
""
);
gd
.
addNumericField
(
"EEPROM channel to read sensor serial number from"
,
this
.
EEPROM_channel
,
0
,
4
,
""
);
gd
.
addCheckbox
(
"Save SFE focusing results (including intermediate) "
,
this
.
saveResults
);
gd
.
addCheckbox
(
"Save SFE focusing results (including intermediate) "
,
this
.
saveResults
);
gd
.
addCheckbox
(
"Show SFE focusing results (including intermediate) "
,
this
.
showResults
);
gd
.
addCheckbox
(
"Show SFE focusing results (including intermediate) "
,
this
.
showResults
);
...
@@ -1597,6 +1606,7 @@ public class LensAdjustment {
...
@@ -1597,6 +1606,7 @@ public class LensAdjustment {
this
.
initialCalibrationFile
=
gd
.
getNextString
();
this
.
initialCalibrationFile
=
gd
.
getNextString
();
this
.
strategyFile
=
gd
.
getNextString
();
this
.
strategyFile
=
gd
.
getNextString
();
this
.
resultsSuperDirectory
=
gd
.
getNextString
();
this
.
resultsSuperDirectory
=
gd
.
getNextString
();
this
.
focusingHistoryFile
=
gd
.
getNextString
();
this
.
EEPROM_channel
=
(
int
)
gd
.
getNextNumber
();
this
.
EEPROM_channel
=
(
int
)
gd
.
getNextNumber
();
this
.
saveResults
=
gd
.
getNextBoolean
();
this
.
saveResults
=
gd
.
getNextBoolean
();
this
.
showResults
=
gd
.
getNextBoolean
();
this
.
showResults
=
gd
.
getNextBoolean
();
...
...
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