fixed data clipping by thresholding values outside of range to be max an min values.