public float[] compressHeights(float[] magnitudes, int numBuckets, double timestamp) {
		if(maxVolume < 1) {
			return compressHeights(magnitudes, numBuckets, 100, 3);
		}
		if(timestamp < .2) {
			return compressHeights(magnitudes, numBuckets, logDenominator);
		}
		updateMinMax(magnitudes);
		double a = numBuckets/Math.log((double) magnitudes.length/(double) logDenominator + 1);
		double sum = 0;
		int bands_this_bucket = 0;
		int buckets_processed = 0;
		int bands_processed = 0;
		float[] buckets = new float[numBuckets];
		for(int i = 0; i < magnitudes.length; ++i) {
			sum += ((double) (-1*magnitudes[bands_processed] - minimums[bands_processed]))/
				   ((double) (maximums[bands_processed] - minimums[bands_processed]));
			bands_this_bucket++;
			bands_processed++;
			if(a*Math.log((double) bands_processed/(double) logDenominator + 1)-buckets_processed >= 1) {
				buckets[buckets_processed] = (float) sum /(float) bands_this_bucket;
				bands_this_bucket = 0;
				sum = 0;
				buckets_processed++;
			}
		}
		if(buckets_processed != numBuckets)
			buckets[buckets_processed] = (float) sum /(float) bands_this_bucket;
		return buckets;
	}