gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 9d3c836: astscript-radial-profile: minor bugs


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 9d3c836: astscript-radial-profile: minor bugs in -v and -c options corrected
Date: Fri, 26 Feb 2021 13:54:32 -0500 (EST)

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

    astscript-radial-profile: minor bugs in -v and -c options corrected
    
    In the previous commits the two '--center' and '--oversample' options were
    added or modified with the aim of make the script more general and easy to
    use. However, there were a couple of mistakes (probably due to a copy &
    paste of lines) and the short options did not correspond to the long
    version of the agruments. Also, the documentation of the old '--xcenter'
    and '--ycenter' still remained in the book (although they had been merged
    into a single '--center' option with two values).
    
    With this commit they have all been addressed.
---
 bin/script/radial-profile.in |  6 +++---
 doc/gnuastro.texi            | 24 ++++++++++--------------
 2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/bin/script/radial-profile.in b/bin/script/radial-profile.in
index 3697505..a89eb29 100644
--- a/bin/script/radial-profile.in
+++ b/bin/script/radial-profile.in
@@ -86,7 +86,7 @@ $scriptname options:
  Input:
   -h, --hdu=STR           HDU/extension of all input FITS files.
   -O, --mode=STR          Coordinate mode: img or wcs.
-  -c, --center=FLT,FLT    Coordinate of the center along 2 axises.
+  -c, --center=FLT,FLT    Coordinate of the center along 2 axes.
   -R, --rmax=FLT          Maximum radius for the radial profile (in pixels).
   -Q, --axisratio=FLT     Axis ratio for ellipse profiles (A/B).
   -p, --positionangle=FLT Position angle for ellipse profiles.
@@ -193,7 +193,7 @@ do
         -O*)                mode=$(echo "$1"  | sed -e's/-O//');       check_v 
"$1" "$mode";  shift;;
         -c|--center)        center="$2";                               check_v 
"$1" "$center";  shift;shift;;
         -c=*|--center=*)    center="${1#*=}";                          check_v 
"$1" "$center";  shift;;
-        -c*)                center=$(echo "$1"  | sed -e's/-x//');     check_v 
"$1" "$center";  shift;;
+        -c*)                center=$(echo "$1"  | sed -e's/-c//');     check_v 
"$1" "$center";  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;;
@@ -221,7 +221,7 @@ do
         -o*)              output=$(echo "$1" | sed -e's/-o//'); check_v "$1" 
"$output"; shift;;
         -v|--oversample)  oversample="$2";                          check_v 
"$1" "$oversample"; shift;shift;;
         -v=*|--oversample=*) oversample="${1#*=}";                  check_v 
"$1" "$oversample"; shift;;
-        -v*)              oversample=$(echo "$1" | sed -e's/-o//'); check_v 
"$1" "$oversample"; shift;;
+        -v*)              oversample=$(echo "$1" | sed -e's/-v//'); check_v 
"$1" "$oversample"; shift;;
 
         # Non-operating options.
         -q|--quiet)       quiet="--quiet"; shift;;
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 20d585e..33f4007 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -20486,25 +20486,21 @@ The HDU/extension of the input image to use.
 Filename of measured radial profile.
 It can be either a FITS table, or plain-text table (determied from your given 
file name suffix).
 
+@item -c FLT[,FLT[,...]]
+@itemx --center=FLT[,FLT[,...]]
+The central position of the radial profile.
+This option is used for placing the center of the profiles.
+This parameter is used in @ref{Crop} to center an crop the region.
+The positions along each dimension must be separated by a comma (@key{,}) and 
fractions are also acceptable.
+The number of values given to this option must be the same as the dimensions 
of the input dataset.
+The units of the coordinates are read based on the value to the 
@option{--mode} option, see below.
+
 @item -O STR
 @itemx --mode=STR
-Interpret the center position of the object (values given to 
@option{--xcenter} and @option{--ycenter}) in image or WCS coordinates.
+Interpret the center position of the object (values given to 
@option{--center}) in image or WCS coordinates.
 This option thus accepts only two values: @option{img} or @option{wcs}.
 By default, it is @option{--mode=img}.
 
-@item -x FLT
-@itemx --xcenter=FLT
-Center coordinate along the first dimension (horizontal axis in FITS).
-This option will be used for placing the center of the profiles.
-If @option{--mode=img} is considered, then @option{--xcenter} has to be in 
image units (pixels).
-If @option{--mode=wcs} is considered, then @option{--xcenter} has to be in WCS 
units.
-When this option isn't called, this script will assume the the radial 
profile's core in the center of the image along the first/horizontal axis.
-
-@item -y FLT
-@itemx --ycenter=FLT
-Center coordinate along the second dimension (vertical axis in FITS).
-This operator behaves very similar to @option{--xcenter} argument, but for the 
second dimension (see above for details).
-
 @item -R FLT
 @itemx --rmax=FLT
 Maximum radius for the radial profile (in pixels).



reply via email to

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