Exemplo n.º 1
0
        public static double[] DGD(string j1, string j2, double w1, double w2)
        {
            double[] jValues1 = JonesString2Double(j1);
            double[] jValues2 = JonesString2Double(j2);

            JonesMatPol mat1 = JonesDoubleArray2JonesMat(jValues1);
            JonesMatPol mat2 = JonesDoubleArray2JonesMat(jValues2);

            JonesMatCar J1 = CMath.Pol2Car(mat1);
            JonesMatCar J2 = CMath.Pol2Car(mat2);

            JonesMatCar J1Inv = CMath.Inverse(J1);

            JonesMatCar J2_J1Inv = J2 * J1Inv;

            ComplexCar[] complexCars = CMath.Eigenvalues(J2_J1Inv);

            ComplexPol[] complexPols = new ComplexPol[2];

            complexPols[0] = CMath.Car2Pol(complexCars[0]);
            complexPols[1] = CMath.Car2Pol(complexCars[1]);

            double Ang = complexPols[0].ang - complexPols[1].ang;

            double f1 = Wavelength2Frequency(w1);
            double f2 = Wavelength2Frequency(w2);

            double[] DGD_W = { CMath.Abs(Ang / (f1 - f2)), (w1 + w2) / 2 };

            return(DGD_W);
        }
Exemplo n.º 2
0
        public static JonesMatPol Car2Pol(JonesMatCar jonesMatCar)
        {
            JonesMatPol jonesMatPol;

            jonesMatPol.J11 = Car2Pol(jonesMatCar.J11);
            jonesMatPol.J12 = Car2Pol(jonesMatCar.J12);
            jonesMatPol.J21 = Car2Pol(jonesMatCar.J21);
            jonesMatPol.J22 = Car2Pol(jonesMatCar.J22);

            return(jonesMatPol);
        }
Exemplo n.º 3
0
 public static void Print(JonesMatCar mat)
 {
     Print(mat.J11);
     Console.Write("  ");
     Print(mat.J12);
     Console.WriteLine();
     Print(mat.J21);
     Console.Write("  ");
     Print(mat.J22);
     Console.WriteLine();
 }
Exemplo n.º 4
0
        public static ComplexCar[] Eigenvalues(JonesMatCar jonesMatCar)
        {
            ComplexCar[] complexCar = new ComplexCar[2];

            ComplexCar a = (jonesMatCar.J11 + jonesMatCar.J22);
            ComplexCar b = Sqrt((a * a) + (4 * ((jonesMatCar.J12 * jonesMatCar.J21) - (jonesMatCar.J11 * jonesMatCar.J22))));

            complexCar[0] = (a + b) / 2;
            complexCar[1] = (a - b) / 2;

            return(complexCar);
        }
Exemplo n.º 5
0
        public static JonesMatCar Inverse(JonesMatCar jonesMatCar)
        {
            JonesMatCar JInv;
            ComplexCar  JDet = Det(jonesMatCar);

            JInv.J11 = jonesMatCar.J22 / JDet;
            JInv.J12 = (-1 * jonesMatCar.J12) / JDet;
            JInv.J21 = (-1 * jonesMatCar.J21) / JDet;
            JInv.J22 = jonesMatCar.J11 / JDet;

            return(JInv);
        }
Exemplo n.º 6
0
 public static ComplexCar Det(JonesMatCar jonesMatCar)
 {
     return((jonesMatCar.J11 * jonesMatCar.J22) - (jonesMatCar.J12 * jonesMatCar.J21));
 }