7 #include "ForstnerOperator.h"
9 #include "FourierTransform.h"
10 #include "tnt/tnt_array2d.h"
11 #include "jama/jama_lu.h"
28 TNT::Array2D< std::complex<double> > Guu(nLine, nSamp);
29 TNT::Array2D< std::complex<double> > Guv(nLine, nSamp);
30 TNT::Array2D< std::complex<double> > Gvv(nLine, nSamp);
37 for(
int i = 0; i < Guu.dim1(); i++) {
38 std::vector< std::complex<double> > line1(Guu.dim2());
39 std::vector< std::complex<double> > line2(Guv.dim2());
40 std::vector< std::complex<double> > line3(Gvv.dim2());
44 for(
int j = 0; j < Guu.dim2(); j++) {
61 std::vector< std::complex<double> > transform1 = ft.
Transform(line1);
62 std::vector< std::complex<double> > transform2 = ft.
Transform(line2);
63 std::vector< std::complex<double> > transform3 = ft.
Transform(line3);
66 for(
int j = 0; j < Guu.dim2(); j++) {
67 Guu[i][j] = transform1[j];
68 Guv[i][j] = transform2[j];
69 Gvv[i][j] = transform3[j];
75 for(
int j = 0; j < Guu.dim2(); j++) {
76 std::vector< std::complex<double> > samp1(Guu.dim1());
77 std::vector< std::complex<double> > samp2(Guv.dim1());
78 std::vector< std::complex<double> > samp3(Gvv.dim1());
80 for(
int i = 0; i < Guu.dim1(); i++) {
86 std::vector< std::complex<double> > transform1 = ft.
Transform(samp1);
87 std::vector< std::complex<double> > transform2 = ft.
Transform(samp2);
88 std::vector< std::complex<double> > transform3 = ft.
Transform(samp3);
91 for(
int i = 0; i < Guu.dim1(); i++) {
92 Guu[i][j] = transform1[i];
93 Guv[i][j] = transform2[i];
94 Gvv[i][j] = transform3[i];
102 for(
int i = 0; i < Guu.dim1(); i++) {
103 std::vector< std::complex<double> > line(Guu.dim2());
105 for(
int j = 0; j < Guu.dim2(); j++) {
106 line[j] = Guu[i][j] * Guv[i][j] * Gvv[i][j];
109 std::vector< std::complex<double> > transform = ft.
Transform(line);
112 for(
int j = 0; j < Guu.dim2(); j++) {
113 Guu[i][j] = transform[j];
121 TNT::Array2D<double> N(chip.
Lines() - 1, chip.
Samples() - 1);
124 for(
int j = 0; j < N.dim2(); j++) {
125 std::vector< std::complex<double> > samp(Guu.dim1());
127 for(
int i = 0; i < Guu.dim1(); i++) {
131 std::vector< std::complex<double> > transform = ft.
Transform(samp);
134 for(
int i = 0; i < N.dim1(); i++) {
135 N[i][j] = real(transform[i]);
139 JAMA::LU<double> lu(N);
142 return abs(lu.det());