gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master b5262f34 26/69: PSF stamp: rmax option was red


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master b5262f34 26/69: PSF stamp: rmax option was redundant
Date: Wed, 26 Jan 2022 12:39:11 -0500 (EST)

branch: master
commit b5262f3415ca56bccba42ade989a2d18bc2e6b26
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    PSF stamp: rmax option was redundant
    
    Until now, the '--rmax' was a option that used as maximum radius for
    computing radial profile.
    
    Now, maximum radius of radial profile has been determined from maximum
    radius of normalizatiom and '--rmax' option has been removed.
---
 bin/script/psf-create-make-stamp.in | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/bin/script/psf-create-make-stamp.in 
b/bin/script/psf-create-make-stamp.in
index ea6c51d0..e3ad91ef 100644
--- a/bin/script/psf-create-make-stamp.in
+++ b/bin/script/psf-create-make-stamp.in
@@ -14,6 +14,7 @@
 #   Raul Infante-Sainz <infantesainz@gmail.com>
 # Contributing author(s):
 #   Carlos Morales-Socorro <cmorsoc@gmail.com>
+#   Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
 # Copyright (C) 2021, Free Software Foundation, Inc.
 #
 # Gnuastro is free software: you can redistribute it and/or modify it under
@@ -40,7 +41,6 @@ set -e
 # Default option values (can be changed with options on the command-line).
 hdu=1
 mask=""
-rmax=""
 quiet=""
 center=""
 keeptmp=0
@@ -101,7 +101,8 @@ $scriptname options:
   -m, --mask=STR          Segmentation image (sky = 0).
   -M, --maskhdu=STR       HDU/extension of the segmentation image.
   -w, --corewidth=INT     Area width of the central object in pixels for 
unmasking.
-  -R, --rmax=FLT          Maximum radius for the radial profile (in pixels).
+  -S, --mask=STR          Segmentation image (sky = 0).
+  -s, --maskhdu=STR       HDU/extension of the segmentation image.
   -N, --normop=STR        Operator for computing the normalization value
                           (mean, sigclip-mean, etc.).
   -Q, --axisratio=FLT     Axis ratio for ellipse maskprofile (A/B).
@@ -226,9 +227,6 @@ do
         -N|--normop)         normop="$2";                               
check_v "$1" "$normop";  shift;shift;;
         -N=*|--normop=*)     normop="${1#*=}";                          
check_v "$1" "$normop";  shift;;
         -N*)                 normop=$(echo "$1"  | sed -e's/-N//');     
check_v "$1" "$normop";  shift;;
-        -R|--rmax)           rmax="$2";                                 
check_v "$1" "$rmax";  shift;shift;;
-        -R=*|--rmax=*)       rmax="${1#*=}";                            
check_v "$1" "$rmax";  shift;;
-        -R*)                 rmax=$(echo "$1"  | sed -e's/-R//');       
check_v "$1" "$rmax";  shift;;
         -s|--sigmaclip)      sigmaclip="$2";                            
check_v "$1" "$sigmaclip";  shift;shift;;
         -s=*|--sigmaclip=*)  sigmaclip="${1#*=}";                       
check_v "$1" "$sigmaclip";  shift;;
         -s*)                 sigmaclip=$(echo "$1"  | sed -e's/-s//');  
check_v "$1" "$sigmaclip";  shift;;
@@ -489,8 +487,9 @@ if [ x"$normradiusmin" != x ] && [ x"$normradiusmax" != x 
]; then
     # ring for the normalization (to not wast CPU time). If the user
     # specifies sigma clip parameters, use them.
     radialprofile=$tmpdir/rprofile-$objectid.fits
-    if [ x"$rmax" != x ]; then maximumradius="--rmax=$rmax"
-    else                       maximumradius="--rmax=$normradiusmax";
+    maxr=$(echo "$normradiusmax" | awk '{print $1+1}')
+    if [ x"$maxradius" != x ]; then maximumradius="--rmax=$rmax"
+    else                       maximumradius="--rmax=$maxradius";
     fi
     if [ x"$sigmaclip" = x ]; then finalsigmaclip=""
     else                           finalsigmaclip="--sigmaclip=$sigmaclip";



reply via email to

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