gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 10841bab 17/23: color-faint-gray: bug correcte


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 10841bab 17/23: color-faint-gray: bug corrected in the asinh transformation
Date: Sun, 24 Dec 2023 22:26:23 -0500 (EST)

branch: master
commit 10841babedc099b242b9c38dd86624b4285db80b
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    color-faint-gray: bug corrected in the asinh transformation
    
    Until this commit, the asinh transformation was not properly done! This was
    noticed by Mohammad when changing the --qbright and --stretch parameters,
    he noticed that only the ration between them was important. However, these
    two parameters controls the different part of the transformation. The asinh
    transformation was (wrong):
    
    f(x) = asinh (qbright * x / stretch) / qbright
    
    With this commit, the transformation has been set to the correct one:
    
    f(x) = asinh (qbright *  x * stretch ) / qbright
    
    With this transformation, the idea is to set --qbright to very low values.
    This will make a linear transformation whose slope is then controled by
    --stretch to show the fainter regions. Then change again --qbright to show
    the bright parts.
---
 bin/script/color-faint-gray.sh                          |  2 +-
 doc/gnuastro.texi                                       | 10 ++++++----
 tests/script/{rgb-faint-gray.sh => color-faint-gray.sh} |  0
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/bin/script/color-faint-gray.sh b/bin/script/color-faint-gray.sh
index d5b61f11..870cb33b 100644
--- a/bin/script/color-faint-gray.sh
+++ b/bin/script/color-faint-gray.sh
@@ -649,7 +649,7 @@ fi
 # pixel values is linear transformed to [minvalrange - maxvalrange].
 I_RGB_asinh_norm="$tmpdir/RGB-mean-asinh-norm.fits"
 astarithmetic $I_RGB_stack -h1 set-I_RGB \
-              I_RGB $qbright_value x $stretch_value / set-i \
+              I_RGB $qbright_value x $stretch_value x set-i \
               i asinh \
               $qbright_value / \
               I_RGB / set-asinhed \
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index e05ed64f..71e71a3e 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -8985,17 +8985,19 @@ Finally, let's run @command{astscript-color-faint-gray} 
on the three cropped ima
 
 @example
 ## Download
+$ mkdir inputs
 $ url=https://archive.cefca.es/catalogues/vo/siap/jplus-dr3/get_fits?id=
-$ wget "$url"92797 -Oin/i-jplus.fits.fz
-$ wget "$url"92801 -Oin/r-jplus.fits.fz
-$ wget "$url"92803 -Oin/g-jplus.fits.fz
+$ wget "$url"92797 -Oinputs/i-jplus.fits.fz
+$ wget "$url"92801 -Oinputs/r-jplus.fits.fz
+$ wget "$url"92803 -Oinputs/g-jplus.fits.fz
 
 ## Crop
+$ mkdir aligned
 $ widthdeg=0.35
 $ ra=202.4741207
 $ dec=47.2171879
 $ for f in i r g; do \
-    astcrop in/$f-jplus.fits.fz --center=$ra,$dec \
+    astcrop inputs/$f-jplus.fits.fz --center=$ra,$dec \
             --width=$widthdeg --output=aligned/$f-jplus.fits; \
   done
 
diff --git a/tests/script/rgb-faint-gray.sh b/tests/script/color-faint-gray.sh
similarity index 100%
rename from tests/script/rgb-faint-gray.sh
rename to tests/script/color-faint-gray.sh



reply via email to

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