public static void TestPXA()
        {
            double pkAmp  = 0;
            double pkFreq = 0;

            double[] data = new double[1001];


            Console.WriteLine("--PXA TEST STARTED--");


            SA_AgilentPXA pxa = new SA_AgilentPXA(PXAAddress);

            Console.WriteLine(PXAAddress);
            Console.WriteLine(pxa.Identify());

            pxa.SetFreq(2600);
            pxa.SetCenterFreq(10);
            pxa.SetFreqSpan(100);
            pxa.SetRefLevel(10);
            pxa.SetAtten(20);
            pxa.SetRBW_VBW(100, 1);
            pxa.SetCenterSpan(10, 100, 0);

            pxa.MeasPeakPower(ref pkAmp, ref pkFreq);
            Console.WriteLine("Peak Amplitude = " + pkAmp);
            Console.WriteLine("Peak Frequency = " + pkFreq);

            pxa.SetMarker(1, 0);
            Console.WriteLine(pxa.GetMarker(1));

            pxa.SetDetector(SA_AgilentPXA.DetectorTypes.NORM);

            pxa.GetPlotData(out data);

            Console.WriteLine("X    Y");
            Console.WriteLine(" ");

            for (int i = 0; i < data.Length; i++)
            {
                Console.WriteLine("{0}  {1}", i, data[i]);
            }

            pxa.Close();

            Console.WriteLine("--PXA TEST FINISHED--");
        }