public static List<Long> thresholdTest(GeoTimeSerie gts,double threshold,boolean abs) throws WarpScriptException {
  doubleCheck(gts);
  List<Long> anomalous_ticks=new ArrayList<Long>();
  for (int i=0; i < gts.values; i++) {
    double temp=gts.doubleValues[i];
    if (abs) {
      temp=Math.abs(temp);
    }
    if (temp >= threshold) {
      anomalous_ticks.add(gts.ticks[i]);
    }
  }
  return anomalous_ticks;
}

public static List < Long > thresholdTest ( GeoTimeSerie gts , double threshold , boolean abs ) throws WarpScriptException { doubleCheck ( gts ) ; List < Long > anomalous_ticks = new ArrayList < Long > ( ) ; for ( int i = 0 ; i < gts . values ; i ++ ) { double temp = gts . doubleValues [ i ] ; if ( abs ) { temp = Math . abs ( temp ) ; } if ( temp >= threshold ) { anomalous_ticks . add ( gts . ticks [ i ] ) ; } } return anomalous_ticks ; }
applying a simple threshold test .
