Example #1
0
 private void calPeaks()
 {
     if (AllPeaksIdx == null)
     {
         AllPeaksIdx = new List <int>();
     }
     else
     {
         AllPeaksIdx.Clear();
     }
     for (int i = 1; i < YData.Count - 1; i++)
     {
         if (YData[i] - YData[i - 1] > 0 && YData[i] - YData[i + 1] > 0)
         {
             AllPeaksIdx.Add(i);
         }
     }
     try
     {
         curPeaksIdx = retrievePeaks(cutThreshold, curShowType);
     }
     catch (Exception)
     {
     }
 }
Example #2
0
 public bool isPeak(int idx)
 {
     return(AllPeaksIdx.Any(i => i == idx));
 }