gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 152487af: astscript-fits-view: DS9 colormap co


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 152487af: astscript-fits-view: DS9 colormap contrast and bias to avoid adjusted
Date: Sat, 24 Feb 2024 19:46:43 -0500 (EST)

branch: master
commit 152487af2d2e080155abe72b7be49558c027bf8c
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    astscript-fits-view: DS9 colormap contrast and bias to avoid adjusted
    
    Until now, we would simply use DS9 'sls' color map when calling
    DS9. However, this color map has an annoying property: its maximum values
    are white (making them indistinguishable from the blank pixels or
    out-of-image regions with DS9's default settings).
    
    With this commit the contrast and bias have been set so the SLS color map
    shows dark red for the brightest pixels.
---
 NEWS                    |  6 ++++++
 bin/script/fits-view.sh | 15 ++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 98037924..6ba23390 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,12 @@ See the end of the file for license conditions.
     short format of '-g'); similar to the same option in Arithmetic or
     ConvertType.
 
+  - The default DS9 'sls' colormap contrast and bias are adjusted so the
+    largest value does not have a white color, but is dark red. This was
+    done because white is DS9's default color for blank pixels and
+    out-of-image regions; making the pixels with the largest value
+    invisible.
+
 *** astscript-psf-scale-factor
   --nocentering: disable sub-pixel centering of the desired star before
     finding the scale factor; added by Sepideh Eskandarlou and Raul
diff --git a/bin/script/fits-view.sh b/bin/script/fits-view.sh
index bde2b872..55b42f05 100644
--- a/bin/script/fits-view.sh
+++ b/bin/script/fits-view.sh
@@ -374,6 +374,18 @@ fi
 
 
 
+# Color map contrast and bias for the default SLS color map designed to
+# make the color of the largest value red, not white (which is the color of
+# the default background). These are currently not configurable because
+# generally, the colormap ('sls') is not yet configurable.
+cmap=sls
+cmap_bias=0.5634
+cmap_contrast=0.8955
+
+
+
+
+
 # To allow generic usage, if no input file is given (the `if' below is
 # true), then just open an empty ds9.
 if [ x"$inputs" = x ]; then
@@ -445,7 +457,8 @@ else
                                      $inwithhdu \
                                      -zoom to fit \
                                      -wcs degrees \
-                                     -cmap sls \
+                                     -cmap $cmap \
+                                     -cmap $cmap_contrast $cmap_bias \
                                      -match frame image \
                                      -match frame colorbar \
                                      -frame lock image \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]