Example #1
0
        /// <summary>
        /// The method returns the m/z that you should look for, when m/z alignment is considered
        /// </summary>
        /// <param name="theorMZ"></param>
        /// <param name="scan"> </param>
        /// <returns></returns>
        public double GetTargetMZAligned(double theorMZ, double scan = -1)
        {
            if (MassAlignmentInfo == null)
            {
                return(theorMZ);
            }

            var ppmShift = MassAlignmentInfo.GetPpmShift(theorMZ, (int)scan);

            var alignedMZ = theorMZ + (ppmShift * theorMZ / 1e6);

            return(alignedMZ);
        }
Example #2
0
        /// <summary>
        /// Returns the adjusted m/z after alignment
        /// </summary>
        /// <param name="observedMZ"></param>
        /// <param name="scan"></param>
        /// <returns></returns>
        public double GetAlignedMZ(double observedMZ, double scan = -1)
        {
            if (MassAlignmentInfo == null)
            {
                return(observedMZ);
            }

            var ppmShift = MassAlignmentInfo.GetPpmShift(observedMZ, (int)scan);


            var alignedMZ = observedMZ - (ppmShift * observedMZ / 1e6);

            return(alignedMZ);
        }