/// <summary> /// Create a new scorer based on the specified fit type, copying scorer settings from another scorer /// </summary> /// <param name="fitType"></param> /// <param name="oldFit"></param> /// <returns></returns> public static IsotopicProfileFitScorer ScorerFactory(Globals.IsotopicProfileFitType fitType, IsotopicProfileFitScorer oldFit) { var scorer = ScorerFactory(fitType); scorer.CloneSettings(oldFit); return(scorer); }
/// <summary> /// Create a new scorer based on the specified fit type /// </summary> /// <param name="fitType"></param> /// <returns></returns> public static IsotopicProfileFitScorer ScorerFactory(Globals.IsotopicProfileFitType fitType) { IsotopicProfileFitScorer scorer = new AreaFitScorer(); switch (fitType) { case Globals.IsotopicProfileFitType.Undefined: throw new Exception( "Error. IsotopicProfile fit type has not been defined. Cannot be used in HornTransform"); case Globals.IsotopicProfileFitType.PEAK: scorer = new PeakFitScorer(); break; case Globals.IsotopicProfileFitType.AREA: scorer = new AreaFitScorer(); break; case Globals.IsotopicProfileFitType.CHISQ: scorer = new ChiSqFitScorer(); break; } return(scorer); }