def normRange(imgarray):
	"""
	normalize the range of an image between 0 and 1
	"""
	min1=imgarray.min()
	max1=imgarray.max()
	if min1 == max1:
		return imgarray - min1
	return (imgarray - min1)/(max1 - min1)