# HG changeset patch # User luca_milaz # Date 1722799078 0 # Node ID 31c5c6815a31689d61874d038ace1a2ddb427f81 # Parent e4d02f9b41a1c1821e16b59f2be007a35c48aa0e Uploaded diff -r e4d02f9b41a1 -r 31c5c6815a31 marea_2/flux_to_map.py --- a/marea_2/flux_to_map.py Sun Aug 04 19:12:43 2024 +0000 +++ b/marea_2/flux_to_map.py Sun Aug 04 19:17:58 2024 +0000 @@ -852,26 +852,7 @@ rgb = (rgb * 255).astype(int) return '#{:02x}{:02x}{:02x}'.format(rgb[0], rgb[1], rgb[2]) -def jet_colormap(value): - """ - Generate an RGB color based on a single numeric value using a colormap similar to MATLAB's 'jet'. - Args: - value (float): A numeric value to be mapped to a color. - - Returns: - tuple: An (R, G, B) tuple with color components in the range [0, 255]. - """ - # Normalize value to range [0, 1] - value = np.clip(value, 0, 1) - - # Define the red, green, and blue color components - red = np.clip(1.5 - np.abs(4 * (value - 0.75)), 0, 1) - green = np.clip(1.5 - np.abs(4 * (value - 0.5)), 0, 1) - blue = np.clip(1.5 - np.abs(4 * (value - 0.25)), 0, 1) - - # Convert to 0-255 range - return int(red * 255), int(green * 255), int(blue * 255) def save_colormap_image(min_value:float, max_value:float, path:str): """