Exemplo n.º 1
0
        public double[,] GetChro(string scanFilter, MzRange range, double startTime, double endTime, Smoothing smoothing = Smoothing.None, int smoothingPoints = 3)
        {
            object chro    = null;
            object flags   = null;
            int    size    = 0;
            string mzrange = range.Minimum.ToString("F4") + "-" + range.Maximum.ToString("F4");

            _rawConnection.GetChroData(0, 0, 0, scanFilter, mzrange, string.Empty, 0.0, startTime, endTime, (int)smoothing, smoothingPoints, ref chro, ref flags, ref size);
            return((double[, ])chro);
        }
        public double[,] GetPressureTrace(double startTime, double endTime, Smoothing smoothing = Smoothing.None, int smoothingPoints = 3)
        {
            // @@ TODO:
            // Set Controller to 2 to get A/D card. That's where pressure trace is stored
            _rawConnection.SetCurrentController(2, 1);
            object chro  = null;
            object flags = null;
            int    size  = 0;

            _rawConnection.GetChroData(0, 0, 0, string.Empty, string.Empty, string.Empty, 0.0, startTime, endTime, (int)smoothing, smoothingPoints, ref chro, ref flags, ref size);
            _rawConnection.SetCurrentController(0, 1);
            return((double[, ])chro);
        }
Exemplo n.º 3
0
        public Chromatogram GetTICChroma()
        {
            int    nChroType1      = 1; //1=TIC 0=MassRange
            int    nChroOperator   = 0;
            int    nChroType2      = 0;
            string bstrFilter      = null;
            string bstrMassRanges1 = null;
            string bstrMassRanges2 = null;
            double dDelay          = 0.0;
            double dStartTime      = 0.0;
            double dEndTime        = 0.0;
            int    nSmoothingType  = 1; //0=None 1=Boxcar 2=Gaussian
            int    nSmoothingValue = 7;
            object pvarChroData    = null;
            object pvarPeakFlags   = null;
            int    pnArraySize     = 0;

            //(int nChroType1, int nChroOperator, int nChroType2, string bstrFilter, string bstrMassRanges1, string bstrMassRanges2, double dDelay, ref double pdStartTime,
            //ref double pdEndTime, int nSmoothingType, int nSmoothingValue, ref object pvarChroData, ref object pvarPeakFlags, ref int pnArraySize);
            _rawConnection.GetChroData(nChroType1, nChroOperator, nChroType2, bstrFilter, bstrMassRanges1, bstrMassRanges2, dDelay, dStartTime, dEndTime, nSmoothingType, nSmoothingValue, ref pvarChroData, ref pvarPeakFlags, ref pnArraySize);

            double[,] pvarArray = (double[, ])pvarChroData;

            return(new Chromatogram(pvarArray));
        }