[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master c9387c35 1/2: psf-scale-factor: missing 'quiet
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master c9387c35 1/2: psf-scale-factor: missing 'quiet' option to Crop and Warp calls added |
Date: |
Wed, 28 Sep 2022 19:49:39 -0400 (EDT) |
branch: master
commit c9387c35cd404aef5cff60b74315bf8c711aa830
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
psf-scale-factor: missing 'quiet' option to Crop and Warp calls added
Until this commit, there were some calls to 'astcrop' and 'astwarp' without
the option '$quiet'. As a consequence, even when the user asked for
'--quiet' mode from the command-line, the script printed out more lines
than just the result.
With this commit, the quiet option ('$quiet') has been added to these
invokations of 'astcrop' and 'astwarp'. In addition to that, several minor
changes have been done with the aim of having proper identations and the
full '--quiet' option instead of '-q'.
---
bin/script/psf-scale-factor.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/bin/script/psf-scale-factor.in b/bin/script/psf-scale-factor.in
index a917910e..f85722c6 100644
--- a/bin/script/psf-scale-factor.in
+++ b/bin/script/psf-scale-factor.in
@@ -650,8 +650,8 @@ if [ $nocentering = 0 ]; then
# Read the overlap range from the 'ICF1PIX' keyword (which is printed
# in all outputs of Crop).
- overlaprange=$(astfits $cropped -h1 --keyvalue=ICF1PIX -q \
- | sed -e's|:| |g' -e's|,| |')
+ overlaprange=$(astfits $cropped -h1 --keyvalue=ICF1PIX --quiet \
+ | sed -e's|:| |g' -e's|,| |')
# Calculate the position of the bottom-left pixel of the cropped image
# in relation to the input image.
@@ -684,14 +684,14 @@ if [ $nocentering = 0 ]; then
# output above).
warpped=$tmpdir/cropped-masked-warpforcenter-$objectid.fits
DXY=$(echo "$warpcoord" | awk '{print $1}')
- astwarp $cropped_masked --translate=$DXY --output=$warpped
+ astwarp $cropped_masked --translate=$DXY --output=$warpped $quiet
# Crop image based on the calculated shift (second component of the
# output above).
centermsk=$tmpdir/cropped-masked-centered-$objectid.fits
CXY=$(echo "$warpcoord" | awk '{print $2}')
astcrop $warpped -h1 \
- --mode=img --output=$centermsk \
+ --mode=img --output=$centermsk $quiet \
--center=$CXY --width=$xwidthinpix,$ywidthinpix
else
# If the user did not want to correct the center of image, we'll use
@@ -705,10 +705,10 @@ fi
# Crop the PSF image with the same size.
psfcropped=$tmpdir/cropped-psf-$objectid.fits
-psfxcenter=$(astfits $psf -h$psfhdu --keyvalue=NAXIS1 -q \
- | awk '{print $1/2+0.5}')
-psfycenter=$(astfits $psf -h$psfhdu --keyvalue=NAXIS2 -q \
- | awk '{print $1/2+0.5}')
+psfxcenter=$(astfits $psf -h$psfhdu --keyvalue=NAXIS1 --quiet \
+ | awk '{print $1/2+0.5}')
+psfycenter=$(astfits $psf -h$psfhdu --keyvalue=NAXIS2 --quiet \
+ | awk '{print $1/2+0.5}')
astcrop $psf --hdu=$psfhdu --mode=img \
--center=$psfxcenter,$psfycenter \
--width=$xwidthinpix,$ywidthinpix \