Exemplo n.º 1
0
        /// <summary>
        /// Processes the spectra in matrix xMatrix according to the set-up options.
        /// </summary>
        /// <param name="xMatrix">The matrix of spectra. Each spectrum is a row of the matrix.</param>
        /// <param name="xMean">Will be filled with the spectral mean.</param>
        /// <param name="xScale">Will be filled with the inverse spectral variance.(Or with 1 if the user has not choosen this option).</param>
        public void Process(IMatrix xMatrix, IVector xMean, IVector xScale)
        {
            // before processing, fill xScale with 1
            VectorMath.Fill(xScale, 1);

            GetPreprocessingMethod().Process(xMatrix, xMean, xScale, _regions);

            if (UseDetrending)
            {
                new DetrendingCorrection(_detrendingOrder).Process(xMatrix, xMean, xScale, _regions);
            }

            if (EnsembleMeanAfterProcessing || EnsembleScale)
            {
                new EnsembleMeanAndScaleCorrection(EnsembleMeanAfterProcessing, EnsembleScale).Process(xMatrix, xMean, xScale, _regions);
            }
        }