Ejemplo n.º 1
0
 protected virtual void PerformStac(STACInformation stacInformation)
 {
     //stacInformation.PerformStac(m_matchList, m_matchParameters.UserTolerances, m_matchParameters.UseDriftTime, m_matchParameters.UsePriors);
     stacInformation.PerformStac(MatchList,
                                 m_matchParameters.UserTolerances,
                                 m_matchParameters.UseDriftTime);
 }
Ejemplo n.º 2
0
 protected override void PerformStac(STACInformation stacInformation)
 {
     stacInformation.PerformStac(MatchList,
                                 MatchParameters.UserTolerances,
                                 MatchParameters.UseDriftTime,
                                 MatchParameters.UsePriors);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Function to call to re-calculate algorithm results.
        /// </summary>
        public void MatchFeatures()
        {
            MatchList.Clear();
            MatchList = FindMatches(m_observedFeatureList, m_targetFeatureList, m_matchParameters.UserTolerances, 0);

            var lengthCheck = (MatchList.Count >= MIN_MATCHES_FOR_NORMAL_ASSUMPTION);

            if (m_matchParameters.ShouldCalculateSTAC && lengthCheck)
            {
                var stacInformation = new STACInformation(m_matchParameters.UseDriftTime);

                // Attach the event handlers
                stacInformation.MessageEvent += StacInformationMessageHandler;

                ReportMessage("Performing STAC");
                PerformStac(stacInformation);

                // Add the Refined Tolerances that STAC calculated
                RefinedToleranceList.Add(stacInformation.RefinedTolerances);

                StacParameterList.Add(stacInformation);
                ReportMessage("Populating FDR table");
                StacFdrTable = PopulateStacfdrTable(MatchList);
            }
            if (m_matchParameters.ShouldCalculateHistogramFDR)
            {
                ReportMessage("Setting Mass Error Histogram FDR");
                SetMassErrorHistogramFdr();
            }
            if (m_matchParameters.ShouldCalculateShiftFDR)
            {
                ReportMessage("Calculating Shift FDR");
                foreach (var t in MatchList)
                {
                    t.InRegion(RefinedToleranceList[0], m_matchParameters.UseEllipsoid);
                }
                var count = MatchList.Count(t => t.WithinRefinedRegion);
                ShiftedMatchList.AddRange(FindMatches(m_observedFeatureList, m_targetFeatureList, RefinedToleranceList[0], m_matchParameters.ShiftAmount));
                ShiftFdr             = (1.0 * count) / ShiftedMatchList.Count;
                ShiftConservativeFdr = (2.0 * count) / ShiftedMatchList.Count;
            }

            OnProcessingComplete(new ProgressNotifierArgs("Processing Complete"));
        }