import numpy as np
import cv2

def py_map2jpg(imgmap, rang, colorMap):
	if rang is None:
		rang = [np.min(imgmap), np.max(imgmap)]

	heatmap_x = np.round(imgmap*255).astype(np.uint8)

	return cv2.applyColorMap(heatmap_x, cv2.COLORMAP_JET)