private void SqueezeWrap() {
			double total = 0;
			for (int i = 1; i < HistogramWidth; i++)
				total += bins[i];
			
			int a = 1;
			int b = HistogramWidth;	
			int n = 0;
			while (true){
				n++;
				a++;				
				int subtotal_a = 0;
				for (int i = a; i < b; i++)
					subtotal_a += bins[i];
				a--;
				
				b--;
				int subtotal_b = 0;
				for (int i = a; i < b; i++)
					try {
						subtotal_b += bins[i];
					} catch (Exception e){}

				b++;
				
				if (subtotal_a / total > subtotal_b / total){
					a++;
					if (subtotal_a / total < SqueezeWrapPercent)
						break;
				}
				else { //less than or equals (benefit of the doubt we should shrink the higher values)
					b--; 
					if (subtotal_b / total < SqueezeWrapPercent)
						break;
				}
				if (n > MAX_ITERATIONS){
					break;
				}
			}
			imagelist.setIntensityA(wave_name, a);
			imagelist.setIntensityB(wave_name, b);
		}