Added optional clipping function

Adding optional clipping function to remove blank space with optional threshold value to ignore noise