public double getShimmerLocalDB (double pmin, double pmax, double maximumAmplitudeFactor) {
	long numberOfPeaks = 0;
	double result = 0.0;
	
	for (int i = 1; i < points.size(); i ++) {
            double p = points.get(i).first - points.get(i - 1).first;
            if (pmin == pmax || (p >= pmin && p <= pmax)) {
                double a1 = points.get(i - 1).second, a2 = points.get(i).second;
                double amplitudeFactor = a1 > a2 ? a1 / a2 : a2 / a1;
                if (amplitudeFactor <= maximumAmplitudeFactor) {
                    result += Math.abs (Math.log10 (a1 / a2));
                    numberOfPeaks ++;
                }
            }
        }
	if (numberOfPeaks < 1) return Pitch.NUMundefined;
	result /= numberOfPeaks;
	return 20.0 * result;
    }