[Top][All Lists]

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

[gnuastro-commits] master e41c2e4 24/32: astscript-radial-profile: sigma

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master e41c2e4 24/32: astscript-radial-profile: sigma clip parameters for measurements added
Date: Wed, 24 Feb 2021 22:36:19 -0500 (EST)

branch: master
commit e41c2e4fe7f3f37f137103a6932ba3acd4cd4df7
Author: Raul Infante-Sainz <>
Commit: Raul Infante-Sainz <>

    astscript-radial-profile: sigma clip parameters for measurements added
    Until this commit, only default values for sigma clipping measurements
    were considered (default parameters assumed in Catalog). However, if the
    user wanted to measure with another sigma clipping paramter it was not
    possible! With this commit, this problem has been solved. Now, the
    radial profile script takes the parameter -s or --sigmaclip to be two
    floats (number of sigmas and tolerance). The values to be measured will
    be computed with these values for sigma clipping operators.
 bin/script/ | 14 ++++++++++----
 doc/gnuastro.texi            |  5 +++++
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/bin/script/ b/bin/script/
index 38688aa..b40515c 100644
--- a/bin/script/
+++ b/bin/script/
@@ -37,6 +37,7 @@ mode=img
@@ -96,14 +97,16 @@ $scriptname options:
   -R, --rmax=FLT          Maximum radius for the radial profile (in pixels).
   -Q, --qratio=FLT        Axis ratio for ellipse profiles (A/B).
   -p, --pangle=FLT        Position angle for ellipse profiles.
-  -m, --measure=STR       Operator for measuring the parameter (mean, median, 
+  -m, --measure=STR       Operator for measuring the value (mean, median, 
+  -s, --sigmaclip=FLT,FLT Parameters for sigma clipping measure operator.
   -b, --binning=INT       Size of the bin for averaging group of pixels.
   -a, --cprofiles=STR     Configuration file for astmkprof.
   -c, --ccatalog=STR      Configuration file for astmkcatalog.
   -X, --xarith=STR        Operation for the first column of radial profile.
   -Y, --yarith=STR        Operation for the second column of the radial 
-  -i, --iname=STR         Name for the first column of radial profile.
-  -j, --jname=STR         Name for the isecond column of radial profile.
+  -i, --iname=STR         Name of first column of radial profile (radius).
+  -j, --jname=STR         Name of second column of radial profile (measured 
+  -l, --lname=STR         Name of third column of radial profile (S/N).
   -k, --keeptemp          Keep temporal/auxiliar files.
@@ -219,6 +222,9 @@ do
         -m|--measure)     m="$2";                           check_v "$1" "$m"; 
         -m=*|--measure=*) m="${1#*=}";                      check_v "$1" "$m"; 
         -m*)              m=$(echo "$1"  | sed -e's/-m//'); check_v "$1" "$m"; 
+        -s|--sigmaclip)      s="$2";                           check_v "$1" 
"$s";  shift;shift;;
+        -s=*|--sigmaclip=*)  s="${1#*=}";                      check_v "$1" 
"$s";  shift;;
+        -s*)                 s=$(echo "$1"  | sed -e's/-s//'); check_v "$1" 
"$s";  shift;;
         -b|--binning)     b="$2";                           check_v "$1" "$b"; 
         -b=*|--binning=*) b="${1#*=}";                      check_v "$1" "$b"; 
         -b*)              b=$(echo "$1"  | sed -e's/-b//'); check_v "$1" "$b"; 
@@ -388,7 +394,7 @@ astnoisechisel $inputs -o$detection
 fprofile=$(echo $output | sed -e"s|.fits|_catalogue.fits|g")
 astmkcatalog $aperturesfits -h1 --valuesfile=$inputs --valueshdu=$hdu \
              --instd=$detection --stdhdu=SKY_STD \
-             --config=$c -o$fprofile \
+             --config=$c -o$fprofile --sigmaclip=$s \
              --ids --$m --sn
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 5fb2a17..25f7e0e 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -15778,6 +15778,11 @@ By default, it is @option{--measure=median}, which 
means that the median of all
 This parameter is used for computing the measured values with 
 As a consequence, all operators like median, mean, std, sigclip-mean, 
sigclip-number, etc. can be used here.
+@item -s FLT,FLT
+@itemx --sigmaclip=FLT,FLT
+Sigma clipping parameters if @option{--measure} operator requested is any of 
the available sigma-clipping operators.
+By default, it is @option{--sigmaclip=3,0.2}, see @ref{Arithmetic operators} 
for more details.
 @item -b INT
 @itemx --binning=INT
 Binning the radial profile by averaging group of pixels.

reply via email to

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