Mercurial > repos > bimib > marea_2
changeset 301:52f00d58bd39 draft
Uploaded
author | luca_milaz |
---|---|
date | Mon, 05 Aug 2024 11:05:02 +0000 |
parents | d91eba7f377b |
children | 2641ef285d14 |
files | marea_2/flux_to_map.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/marea_2/flux_to_map.py Mon Aug 05 10:35:05 2024 +0000 +++ b/marea_2/flux_to_map.py Mon Aug 05 11:05:02 2024 +0000 @@ -839,8 +839,10 @@ Returns: numpy.ndarray: An array of RGB color components (in the range [0, 1]). """ - # Ensure value is a single numeric value value = abs(value) + + if(np.round(value, 6) == 0.0): + return np.array([190, 190, 190])#grey # Define the red, green, and blue color components red = np.clip(1.5 - np.abs(4 * (value - 0.75)), 0, 1)