[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 194b49d1 59/69: PSF select-stars: change the n
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 194b49d1 59/69: PSF select-stars: change the name of the two varibales. |
Date: |
Wed, 26 Jan 2022 12:39:15 -0500 (EST) |
branch: master
commit 194b49d167653d6d6e48cddc90ec694217b58598
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF select-stars: change the name of the two varibales.
Until now, the two variable 'minmag' and 'maxmag' has been used in script
for selecting the stars in the range of magnitude between minimumm to
maximumm but these two name will be confused the user and she/he do not
know the 'minmag' option has been used for the bright or faint star.
With this commit, for the clarity the name of two these variable has been
changed from 'minmag' to 'brightmag' and from 'maxmag' to the 'faintmag'.
---
bin/script/psf-create-select-stars.in | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/bin/script/psf-create-select-stars.in
b/bin/script/psf-create-select-stars.in
index b12fe901..0834734e 100755
--- a/bin/script/psf-create-select-stars.in
+++ b/bin/script/psf-create-select-stars.in
@@ -311,7 +311,7 @@ elif [ ! -f $segmented ]; then
exit 1
fi
-# Check if the minimum and maximum range of does not exist interrupt.
+# Check if the brighter and fainter range of magnitude does not exist
interrupt.
if [ x$magnituderange = x ]; then
echo "$scriptname: The range of magnitude does not provided."
echo "$scriptname: Values to '--magnituderange' (or '-m') should be
provided."
@@ -367,13 +367,13 @@ fi
#-----------------------------------
#
# Obtain the magnitude range from the command line arguments.
-minmag=$(echo "$magnituderange" | awk 'BEGIN{FS=","} {print $1}')
-maxmag=$(echo "$magnituderange" | awk 'BEGIN{FS=","} {print $2}')
+brightmag=$(echo "$magnituderange" | awk 'BEGIN{FS=","} {print $1}')
+faintmag=$(echo "$magnituderange" | awk 'BEGIN{FS=","} {print $2}')
-# Range of magnitude which are for time fainter than and brighter than
-# minimum magnitude and maximum magnitude.
+# Range of magnitude which are in the wider range of brighter and fainter
+# magnitude.
brighter=-10
-fainter=$(astarithmetic $maxmag $faintmagdiff + --quiet)
+fainter=$(astarithmetic $faintmag $faintmagdiff + --quiet)
# Obtain the parallax and parallax_error columns name.
parallax=$(echo "$parallaxanderrorcolumn" \
@@ -401,7 +401,7 @@ parallax_error=$(echo "$parallaxanderrorcolumn" \
# and max magnitudes will will be generated.
bname_prefix=$(basename $inputs | sed 's/\.fits/ /' | awk '{print $1}')
if [ x$tmpdir = x ]; then \
-
tmpdir=$(pwd)/"$bname_prefix"_psfcreateselectstar_"$field"_"$minmag"_"$maxmag"
+
tmpdir=$(pwd)/"$bname_prefix"_psfcreateselectstar_"$field"_"$brightmag"_"$faintmag"
fi
if [ -d $tmpdir ]; then
@@ -412,7 +412,7 @@ fi
# Output
if [ x$output = x ]; then
- output="$bname_prefix"_psfcreateselectstar_"$field"_"$minmag"_"$maxmag".fits
+
output="$bname_prefix"_psfcreateselectstar_"$field"_"$brightmag"_"$faintmag".fits
fi
@@ -429,14 +429,14 @@ fi
# 'astquery'.
#
# The output name of the catalog of stars in the range of the magnitude
-# between smaller than the minimumm and larger than the maximumm.
+# between smaller than the brighter and larger than the fainter.
catalog_main=$tmpdir/catalog-main-$brighter-$fainter.fits
# The output name of the sky coverage.
skycoverage=$tmpdir/skycoverage.fits
# If the catalog and the image have an overlap area, then select the stars
-# in the range of magnitude between minimum and maximum.
+# in the range of magnitude between bright and faint stars.
if [ x"$catalog" != x ]; then
# Find minimum and maximum RA/Dec values of the input image.
@@ -462,7 +462,7 @@ if [ x"$catalog" != x ]; then
number=$(asttable $skycoverage | wc -l)
# If catalog overlap the image, select stars with magnitudes between
- # the less than minimum and larger than maximum values.
+ # the less than faint and larger than bright values.
if [ "$number" = 0 ]; then
# Stop if the catalog doesn't overlap with the image.
@@ -487,7 +487,7 @@ if [ x"$catalog" != x ]; then
| grep 'Number of rows' | awk '{print $4}')
if [ "$numstars" = 0 ]; then
rm -rf $tmpdir
- echo "There were no stars in magnitude range $minmag to
$maxmag"
+ echo "There were no stars in magnitude range $brightmag to
$faintmag"
exit 2
fi
fi
@@ -512,11 +512,11 @@ fi
# The name of the catalog of stars in the range of magnitude between
-# minimumm and maximumm.
-catalog_target=$tmpdir/catalog-gaia-$minmag-$maxmag.fits
+# bright and faint.
+catalog_target=$tmpdir/catalog-gaia-$brightmag-$faintmag.fits
-# Select the stars in the range of magnitude between minimum and maximum.
-asttable $catalog_main --range=$field,$minmag,$maxmag --output=$catalog_target
+# Select the stars in the range of magnitude between bright and faint.
+asttable $catalog_main --range=$field,$brightmag,$faintmag
--output=$catalog_target
@@ -531,7 +531,7 @@ asttable $catalog_main --range=$field,$minmag,$maxmag
--output=$catalog_target
goodparallax=$tmpdir/parallax-good.fits
if [ x"$parallaxanderrorcolumn" != x ]; then
asttable $catalog_target -c$racolumn,$deccolumn -c$field \
- --range=$field,$minmag,$maxmag --colinfoinstdout --noblank=4 \
+ --range=$field,$brightmag,$faintmag --colinfoinstdout --noblank=4
\
-c'arith '$parallax' '$parallax' abs \
'$parallax_error' 3 x lt nan where ' \
| asttable -c$racolumn,$deccolumn -c$field --output=$goodparallax
$quiet
- [gnuastro-commits] master 5f23616b 01/69: PSF stamp: new script to generate star stamps and construct a PSF, (continued)
- [gnuastro-commits] master 5f23616b 01/69: PSF stamp: new script to generate star stamps and construct a PSF, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f7af955d 03/69: PSF stamp: Renaming this script to 'psf-create-make-stamp', Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 9a66fff9 07/69: Scripts: removing the executability of some source code scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f58c3211 08/69: PSF model: checking that a PSF image is given for computing flux factor, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master a6788c50 13/69: Book: adding documentation of 'psf-create-make-stamp' script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 57b27b9e 12/69: PSF scripts: correcting several bugs and homogenizing the notation, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master b14fdf1d 04/69: PSF stamp: fixing wrong directory of this script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 4c5fe969 17/69: Book: fully working example on how to construct and correct the PSF, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master ccae240f 29/69: PSF stamp: bug in --rmax option introduced in previous commit fixed, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master de1b645b 20/69: PSF stamp: computing radial profile up to the minimum possible value, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 194b49d1 59/69: PSF select-stars: change the name of the two varibales.,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 781f0f33 39/69: PSF scripts: checking that the input file actually exists, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 0a6625ab 61/69: Book: explain about two new option in the psf-create-select-stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 6901ec82 49/69: PSF select-stars: check the image and catalog have a overlap area or not, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f9b7edfa 10/69: PSF stamp: removing the option --oversample as it is not enabled, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 81720014 15/69: Book: adding documentation of 'psf-model-flux-factor' script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 9ca784e4 27/69: PSF select stars: if the image has not stars in `--min` and `--max` range, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f1cfd384 25/69: PSF select stars: remove --input add --output and --catalog, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master bf8792c2 52/69: Book: For selecting stars some mandatory options did not mention, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f3619dd5 57/69: Book: edits in the PSF scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master ce020710 41/69: Book: new section for the tutorial on how to construct and extended PSF, Mohammad Akhlaghi, 2022/01/26