Ejemplo n.º 1
0
        public static ComplexCar TanPiDelta2K(double delta, double tanPi)//Delta in deg
        {
            ComplexCar complexCar = new ComplexCar();

            double r     = 1 / tanPi;
            double theta = -1 * CMath.Deg2Red(delta);

            complexCar.real = r * Math.Cos(theta);
            complexCar.imag = r * Math.Sin(theta);

            return(complexCar);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //Mesure();

            double[] values1 = Utility.SC2EybyExDelta(Utility.text_SC1);
            double[] values2 = Utility.SC2EybyExDelta(Utility.text_SC2);
            double[] values3 = Utility.SC2EybyExDelta(Utility.text_SC3);

            ComplexCar k1 = Utility.TanPiDelta2K(values1[1], values1[2]);
            ComplexCar k2 = Utility.TanPiDelta2K(values2[1], values2[2]);
            ComplexCar k3 = Utility.TanPiDelta2K(values3[1], values3[2]);

            JonesMatCar mat = Utility.K2JonesMat(k1, k2, k3);

            CMath.Print(mat);

            Console.Read();
        }
Ejemplo n.º 3
0
        public static double[] DGD(JonesMatCar J1, JonesMatCar J2, double w1, double w2)
        {
            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_WL = { CMath.Abs(Ang / (f1 - f2)), (w1 + w2) / 2 };

            return(DGD_WL);
        }