[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 5e172cfc: radial-profile: new option for consi
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 5e172cfc: radial-profile: new option for considering zero-valued pixels |
Date: |
Sat, 9 Apr 2022 10:07:14 -0400 (EDT) |
branch: master
commit 5e172cfc43f9f3c61beca76f8e37a1e0c43c0276
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
radial-profile: new option for considering zero-valued pixels
Until now, in the radial profile script the zero-valued pixels were always
considered as blank. Because in cropping step these pixels were set to
blank. Therefore, there was not any way for considering these pixels in the
radial profile.
With this commit, a new option has been added to the radial profile script
for this purpose: '--zeroisnotblank'. If this option is used, the same
option is added to the crop command.
This task was proposed by Ignacio Ruiz Cejudo.
---
NEWS | 9 +++++++++
bin/script/radial-profile.in | 25 +++++++++++++++----------
doc/announce-acknowledge.txt | 1 +
doc/gnuastro.texi | 7 +++++++
4 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/NEWS b/NEWS
index 5ea15b62..a3549516 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,15 @@ See the end of the file for license conditions.
** New features
+ astscript-radial-profile:
+ --zeroisnotblank: new option to account for zero-valued pixels in the
+ profile measurement. By default, during the internal cropping phase,
+ zero-valued pixels are set to blank (and thus not considered during
+ the profile measurement). When this option is called, it is directly
+ passed to the internal cropping command ('astcrop' has an option with
+ the same name). This was suggested by Ignacio Ruiz Cejudo and
+ implemented by Sepideh Eskandarlou.
+
** Removed features
** Changed features
diff --git a/bin/script/radial-profile.in b/bin/script/radial-profile.in
index ca35c77d..f07ec62a 100644
--- a/bin/script/radial-profile.in
+++ b/bin/script/radial-profile.in
@@ -56,6 +56,7 @@ measuretmp=""
oversample=""
undersample=""
positionangle=0
+zeroisnotblank=""
version=@VERSION@
scriptname=@SCRIPT_NAME@
@@ -126,6 +127,7 @@ $scriptname options:
--cite BibTeX citation for this program.
-q, --quiet Don't print any extra information in stdout.
-V, --version Print program version.
+ -Z, --zeroisnotblank 0.0 in float or double images are not blank.
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
@@ -263,14 +265,16 @@ do
-d*) stdhdu=$(echo "$1" | sed -e's/-d//'); check_v "$1"
"$stdhdu"; shift;;
# Non-operating options.
- -q|--quiet) quiet="--quiet"; shift;;
- -q*|--quiet=*) on_off_option_error --quiet -q;;
- -?|--help) print_help; exit 0;;
- -'?'*|--help=*) on_off_option_error --help -?;;
- -V|--version) print_version; exit 0;;
- -V*|--version=*) on_off_option_error --version -V;;
- --cite) astfits --cite; exit 0;;
- --cite=*) on_off_option_error --cite;;
+ -q|--quiet) quiet="--quiet"; shift;;
+ -q*|--quiet=*) on_off_option_error --quiet -q;;
+ -?|--help) print_help; exit 0;;
+ -'?'*|--help=*) on_off_option_error --help -?;;
+ -V|--version) print_version; exit 0;;
+ -V*|--version=*) on_off_option_error --version -V;;
+ --cite) astfits --cite; exit 0;;
+ --cite=*) on_off_option_error --cite;;
+ -Z|--zeroisnotblank) zeroisnotblank="--zeroisnotblank"; shift;;
+ -Z*|--zeroisnotblank=*) on_off_option_error --zeroisnotblank -Z;;
# Unrecognized option:
-*) echo "$scriptname: unknown option '$1'"; exit 1;;
@@ -463,10 +467,11 @@ cropstdbase=crop-std.fits
cropstd=$tmpdir/$cropstdbase
cropwidth=$(echo $rmax | awk '{print $1*2+1}')
astcrop $inputs --hdu=$hdu --center=$xcenter,$ycenter --mode=img \
- --width=$cropwidth --output=$crop $quiet
+ --width=$cropwidth $zeroisnotblank --output=$crop $quiet
if [ x"$instd" != x ] && [ -f "$instd" ]; then
astcrop $instd --hdu="$stdhdu" --center=$xcenter,$ycenter \
- --mode=img --width=$cropwidth --output=$cropstd $quiet
+ --mode=img --width=$cropwidth $zeroisnotblank \
+ --output=$cropstd $quiet
fi
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index af0ce4c1..db08752f 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -1,6 +1,7 @@
Alphabetically ordered list to acknowledge in the next release.
Sepideh Eskandarlou
+Ignacio Ruiz Cejudo
Irene Pintos Castro
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index db3c7765..197ab19b 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -24587,6 +24587,13 @@ $ astmkcatalog -P | grep " sigmaclip "
The Zeropoint of the input dataset.
This is necessary when you request measurements like Magnitude, or Surface
brightness.
+@item -Z
+@itemx --zeroisnotblank
+By default, all the zero-valued pixels in radial profile do not consider.
+This option is exactly the same as option @option{--zeroisnotblank} in
@command{astcrop}.
+When this option has been used, the zero-valued pixels do not considered as
blank, and all the zero-valued pixels has been used in computing the radial
profile.
+
+
@item -v INT
@itemx --oversample=INT
Oversample the input dataset to the fraction given to this option.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 5e172cfc: radial-profile: new option for considering zero-valued pixels,
Mohammad Akhlaghi <=