public void SetMassAlignmentData(List <MassAlignmentDataItem> massAlignmentData)
        {
            var mzVals          = massAlignmentData.Select(p => p.mz).ToArray();
            var mzPPMCorrVals   = massAlignmentData.Select(p => p.mzPPMCorrection).ToArray();
            var scanVals        = massAlignmentData.Select(p => p.scan).ToArray();
            var scanPPMCorrVals = massAlignmentData.Select(p => p.scanPPMCorrection).ToArray();

            if (AlignmentInfo == null)
            {
                AlignmentInfo = new MultiAlignEngine.Alignment.clsAlignmentFunction(MultiAlignEngine.Alignment.enmCalibrationType.HYBRID_CALIB, MultiAlignEngine.Alignment.enmAlignmentType.NET_MASS_WARP);
            }

            AlignmentInfo.marrMassFncMZInput       = new float[mzVals.Length];
            AlignmentInfo.marrMassFncMZPPMOutput   = new float[mzVals.Length];
            AlignmentInfo.marrMassFncTimeInput     = new float[mzVals.Length];
            AlignmentInfo.marrMassFncTimePPMOutput = new float[mzVals.Length];

            AlignmentInfo.SetMassCalibrationFunctionWithMZ(ref mzVals, ref mzPPMCorrVals);
            AlignmentInfo.SetMassCalibrationFunctionWithTime(ref scanVals, ref scanPPMCorrVals);
        }
        public void SetMassAlignmentData(ViperMassCalibrationData viperCalibrationData)
        {
            var numDataPoints = 3;

            var mzVals        = new float[numDataPoints];
            var mzPPMCorrVals = new float[numDataPoints];

            mzVals[0] = 0;
            mzVals[1] = 1000;
            mzVals[2] = 2000;

            for (var index = 0; index < mzPPMCorrVals.Length; index++)
            {
                mzPPMCorrVals[index] = (float)viperCalibrationData.MassError;
            }

            //scanVals[0] = (MinLCScan + MaxLCScan) / (float)2;
            //for (int index = 0; index < numDataPoints; index++)
            //{
            //    scanPPMCorrVals[index] = (float)viperCalibrationData.MassError;
            //}

            if (AlignmentInfo == null)
            {
                AlignmentInfo =
                    new MultiAlignEngine.Alignment.clsAlignmentFunction(MultiAlignEngine.Alignment.enmCalibrationType.HYBRID_CALIB,
                                                                        MultiAlignEngine.Alignment.enmAlignmentType.NET_MASS_WARP);
            }

            AlignmentInfo.marrMassFncMZInput     = new float[mzVals.Length];
            AlignmentInfo.marrMassFncMZPPMOutput = new float[mzVals.Length];

            // ReSharper disable CommentTypo
            //this.AlignmentInfo.marrMassFncTimeInput = new float[mzVals.Length];
            //this.AlignmentInfo.marrMassFncTimePPMOutput = new float[mzVals.Length];
            // ReSharper restore CommentTypo

            AlignmentInfo.SetMassCalibrationFunctionWithMZ(ref mzVals, ref mzPPMCorrVals);
        }