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
ce4d91d4
Commit
ce4d91d4
authored
Aug 03, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed nastgy bug
parent
71aa98de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
6 deletions
+36
-6
Aberrations_all.java
src/main/java/Aberrations_all.java
+1
-1
AlignmentCorrection.java
src/main/java/AlignmentCorrection.java
+33
-3
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+1
-1
aberrations.java
src/main/java/aberrations.java
+1
-1
No files found.
src/main/java/Aberrations_all.java
View file @
ce4d91d4
...
@@ -260,7 +260,7 @@ Panel panel1,panel2;
...
@@ -260,7 +260,7 @@ Panel panel1,panel2;
public
static
int
INVERSE_DIRECT_SIZE
=
32
;
// size (side of square) of direct PSF kernel
public
static
int
INVERSE_DIRECT_SIZE
=
32
;
// size (side of square) of direct PSF kernel
public
static
int
INVERSE_REVERSE_SIZE
=
64
;
// size (side of square) of reverse PSF kernel
public
static
int
INVERSE_REVERSE_SIZE
=
64
;
// size (side of square) of reverse PSF kernel
public
static
boolean
INVERSE_FILTER
=
true
;
// apply variable-sigma fil
e
tering to the inverted PSF
public
static
boolean
INVERSE_FILTER
=
true
;
// apply variable-sigma filtering to the inverted PSF
public
static
int
SPLIT_OVERSAMPLE
=
2
;
public
static
int
SPLIT_OVERSAMPLE
=
2
;
...
...
src/main/java/AlignmentCorrection.java
View file @
ce4d91d4
...
@@ -2358,7 +2358,26 @@ B = |+dy0 -dy1 -2*dy3 |
...
@@ -2358,7 +2358,26 @@ B = |+dy0 -dy1 -2*dy3 |
}
}
}
}
double
[]
getJtJTrace
(
// just debugging
double
[][]
jt
,
double
[]
w
)
{
double
[]
jtj_trace
=
new
double
[
jt
.
length
];
if
(
w
==
null
){
w
=
new
double
[
jt
[
0
].
length
];
for
(
int
i
=
0
;
i
<
w
.
length
;
i
++){
w
[
i
]
=
1.0
/
w
.
length
;
}
}
for
(
int
i
=
0
;
i
<
jt
.
length
;
i
++){
for
(
int
k
=
0
;
k
<
jt
[
i
].
length
;
k
++){
jtj_trace
[
i
]
+=
w
[
k
]
*
jt
[
i
][
k
]*
jt
[
i
][
k
];
}
}
return
jtj_trace
;
}
double
[][]
getJTJ
(
double
[][]
getJTJ
(
double
[][]
jt
,
double
[][]
jt
,
...
@@ -2425,7 +2444,13 @@ B = |+dy0 -dy1 -2*dy3 |
...
@@ -2425,7 +2444,13 @@ B = |+dy0 -dy1 -2*dy3 |
for
(
int
indx
=
0
;
indx
<
mismatch_list
.
size
();
indx
++){
// need indx value
for
(
int
indx
=
0
;
indx
<
mismatch_list
.
size
();
indx
++){
// need indx value
Mismatch
mm
=
mismatch_list
.
get
(
indx
);
Mismatch
mm
=
mismatch_list
.
get
(
indx
);
mm
.
copyToW
(
w
,
indx
);
mm
.
copyToW
(
w
,
indx
);
}
}
double
sumw
=
0.0
;
for
(
int
i
=
0
;
i
<
w
.
length
;
i
++)
sumw
+=
w
[
i
];
if
(
sumw
>
0.0
){
for
(
int
i
=
0
;
i
<
w
.
length
;
i
++)
w
[
i
]/=
sumw
;
}
return
w
;
return
w
;
}
}
...
@@ -2458,7 +2483,7 @@ B = |+dy0 -dy1 -2*dy3 |
...
@@ -2458,7 +2483,7 @@ B = |+dy0 -dy1 -2*dy3 |
corr_vector
,
// GeometryCorrection.CorrVector corr_vector)
corr_vector
,
// GeometryCorrection.CorrVector corr_vector)
debugLevel
);
// int debugLevel)
debugLevel
);
// int debugLevel)
// convert Jacobian outputs to symmetrical measurement vectors (last one is non-zero only if dis
ap
rity should be adjusted)
// convert Jacobian outputs to symmetrical measurement vectors (last one is non-zero only if dis
pa
rity should be adjusted)
double
[][]
jta_mv
=
(
new
Mismatch
()).
convertJt_mv
(
jta
);
//double [][] jt)
double
[][]
jta_mv
=
(
new
Mismatch
()).
convertJt_mv
(
jta
);
//double [][] jt)
...
@@ -2478,8 +2503,13 @@ B = |+dy0 -dy1 -2*dy3 |
...
@@ -2478,8 +2503,13 @@ B = |+dy0 -dy1 -2*dy3 |
System
.
out
.
println
(
"--- solveCorr(): initial RMS = "
+
rms0
);
System
.
out
.
println
(
"--- solveCorr(): initial RMS = "
+
rms0
);
}
}
Matrix
y_minus_fx_weighted
=
new
Matrix
(
y_minus_fx_a_weighted
,
y_minus_fx_a_weighted
.
length
);
Matrix
y_minus_fx_weighted
=
new
Matrix
(
y_minus_fx_a_weighted
,
y_minus_fx_a_weighted
.
length
);
double
[][]
jtja
=
getJTJ
(
jta
,
weights
);
// double [][] jtja = getJTJ(jta, weights);
double
[][]
jtja
=
getJTJ
(
jta_mv
,
weights
);
Matrix
jtj
=
new
Matrix
(
jtja
);
// getJTJ(jta, weights)); // less operations than jt.times(jt.transpose());
Matrix
jtj
=
new
Matrix
(
jtja
);
// getJTJ(jta, weights)); // less operations than jt.times(jt.transpose());
// double [] jt_trace_null_dbg = getJtJTrace(jta,null);
// double [] jt_trace_dbg = getJtJTrace(jta,weights);
// double [] jt_mv_trace_null_dbg = getJtJTrace(jta_mv,null);
// double [] jt_mv_trace_dbg = getJtJTrace(jta_mv,weights);
//
//
boolean
dbg_images
=
debugLevel
>
1
;
boolean
dbg_images
=
debugLevel
>
1
;
int
dbg_decimate
=
64
;
// just for the debug image
int
dbg_decimate
=
64
;
// just for the debug image
...
...
src/main/java/EyesisCorrectionParameters.java
View file @
ce4d91d4
...
@@ -3913,7 +3913,7 @@ public class EyesisCorrectionParameters {
...
@@ -3913,7 +3913,7 @@ public class EyesisCorrectionParameters {
gd
.
addCheckbox
(
"Allow expansion over previously identified background (infinity)"
,
this
.
ex_over_bgnd
);
gd
.
addCheckbox
(
"Allow expansion over previously identified background (infinity)"
,
this
.
ex_over_bgnd
);
gd
.
addNumericField
(
"When expanding over background, disregard lower disparity "
,
this
.
ex_min_over
,
3
);
gd
.
addNumericField
(
"When expanding over background, disregard lower disparity "
,
this
.
ex_min_over
,
3
);
gd
.
addMessage
(
"********* Plates fil
e
tering when building initial z-map *********"
);
gd
.
addMessage
(
"********* Plates filtering when building initial z-map *********"
);
gd
.
addNumericField
(
"If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds"
,
this
.
pt_super_trust
,
3
);
gd
.
addNumericField
(
"If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds"
,
this
.
pt_super_trust
,
3
);
gd
.
addCheckbox
(
"Do not replace raw tiles by the plates, if raw is closer (like poles)"
,
this
.
pt_keep_raw_fg
);
gd
.
addCheckbox
(
"Do not replace raw tiles by the plates, if raw is closer (like poles)"
,
this
.
pt_keep_raw_fg
);
gd
.
addNumericField
(
"Scale plates strength before comparing to raw strength"
,
this
.
pt_scale_pre
,
3
);
gd
.
addNumericField
(
"Scale plates strength before comparing to raw strength"
,
this
.
pt_scale_pre
,
3
);
...
...
src/main/java/aberrations.java
View file @
ce4d91d4
...
@@ -267,7 +267,7 @@ Panel panel1,panel2;
...
@@ -267,7 +267,7 @@ Panel panel1,panel2;
public
static
int
INVERSE_DIRECT_SIZE
=
32
;
// size (side of square) of direct PSF kernel
public
static
int
INVERSE_DIRECT_SIZE
=
32
;
// size (side of square) of direct PSF kernel
public
static
int
INVERSE_REVERSE_SIZE
=
64
;
// size (side of square) of reverse PSF kernel
public
static
int
INVERSE_REVERSE_SIZE
=
64
;
// size (side of square) of reverse PSF kernel
public
static
boolean
INVERSE_FILTER
=
true
;
// apply variable-sigma fil
e
tering to the inverted PSF
public
static
boolean
INVERSE_FILTER
=
true
;
// apply variable-sigma filtering to the inverted PSF
public
static
int
SPLIT_OVERSAMPLE
=
2
;
public
static
int
SPLIT_OVERSAMPLE
=
2
;
...
...
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