[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master d99fc9df 60/69: PSF select-stars: add new opti
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master d99fc9df 60/69: PSF select-stars: add new option for selecting more bright stars |
Date: |
Wed, 26 Jan 2022 12:39:16 -0500 (EST) |
branch: master
commit d99fc9df3184c55c2074c66d14627de65a3ab297
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF select-stars: add new option for selecting more bright stars
Until now, for select the bright stars in wider range than user has been
determined, the constant value had been considered. And then based on this
constant value the wide bright stars had been selected and find the number
of neighbors around the main star.
With this commit, the new option '--brightmag' has been added, that
selecting the bright stars in the wider range to be optional.
---
bin/script/psf-create-select-stars.in | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/bin/script/psf-create-select-stars.in
b/bin/script/psf-create-select-stars.in
index 0834734e..f2d5fee3 100755
--- a/bin/script/psf-create-select-stars.in
+++ b/bin/script/psf-create-select-stars.in
@@ -46,6 +46,7 @@ output=""
tmpdir=""
catalog=""
keeptmp=""
+brightmag=""
segmented=""
racolumn="ra"
mindistdeg=""
@@ -110,6 +111,7 @@ $scriptname options:
-F, --faintmagdiff The difference from the faintest star which the user
will
be determined the faintest star in "--magnituderange"
option.
+ -b, --brightmag The limit for selecting wider range of bright stars.
Output:
-o, --output Output table with the object coordinates.
@@ -235,6 +237,9 @@ do
-F|--faintmagdiff) faintmagdiff="$2";
check_v "$1" "$faintmagdiff"; shift;shift;;
-F=*|--faintmagdiff=*) faintmagdiff="${1#*=}";
check_v "$1" "$faintmagdiff"; shift;;
-F*) faintmagdiff=$(echo "$1" | sed -e's/-F//');
check_v "$1" "$faintmagdiff"; shift;;
+ -b|--brightmag) brightmag="$2";
check_v "$1" "$brightmag"; shift;shift;;
+ -b=*|--brightmag=*) brightmag="${1#*=}";
check_v "$1" "$brightmag"; shift;;
+ -b*) brightmag=$(echo "$1" | sed -e's/-b//');
check_v "$1" "$brightmag"; shift;;
-m|--magnituderange) magnituderange="$2";
check_v "$1" "$magnituderange"; shift;shift;;
-m=*|--magnituderange=*) magnituderange="${1#*=}";
check_v "$1" "$magnituderange"; shift;;
-m*) magnituderange=$(echo "$1" | sed -e's/-m//');
check_v "$1" "$magnituderange"; shift;;
@@ -294,6 +299,21 @@ elif [ ! -f $inputs ]; then
exit 1
fi
+# Check the user provide the magnitude of the faintest stars which she/he
+# want compare.
+if [ x"$faintmagdiff" = x ]; then
+ echo "$scriptname:: The '--faintmagdiff' dose not provided."
+ exit 1
+fi
+
+# Check the user provide the magnitude of the brightest stars which she/he
+# want compare.
+if [ x"$brightmag" = x ]; then
+ echo "$scriptname:: The '--brightmag' dose not provided."
+ exit 1
+fi
+
+
# Check that 'segmented' is output of 'astsegment'.
if [ x"$segmented" != x ]; then
nhdu=$(astfits $segmented --listimagehdus \
@@ -372,7 +392,6 @@ faintmag=$(echo "$magnituderange" | awk 'BEGIN{FS=","}
{print $2}')
# Range of magnitude which are in the wider range of brighter and fainter
# magnitude.
-brighter=-10
fainter=$(astarithmetic $faintmag $faintmagdiff + --quiet)
# Obtain the parallax and parallax_error columns name.
@@ -430,7 +449,7 @@ fi
#
# The output name of the catalog of stars in the range of the magnitude
# between smaller than the brighter and larger than the fainter.
-catalog_main=$tmpdir/catalog-main-$brighter-$fainter.fits
+catalog_main=$tmpdir/catalog-main-$brightmag-$fainter.fits
# The output name of the sky coverage.
skycoverage=$tmpdir/skycoverage.fits
@@ -476,7 +495,7 @@ if [ x"$catalog" != x ]; then
echo "External Cataloge already exists "
else
# Select stars with magnitude between brighter to fainter.
- asttable $catalog --range=$field,$brighter,$fainter --sort=$field \
+ asttable $catalog --range=$field,$brightmag,$fainter --sort=$field
\
--range=$racolumn,$minraimg,$maxraimg \
--range=$deccolumn,$mindecimg,$maxdecimg \
--output=$catalog_main $quiet
@@ -503,7 +522,7 @@ else
astquery $dataset --output=$catalog_main \
--overlapwith=$inputs --hdu=$hdu \
--column=$columnquery \
- --range=$field,$brighter,$fainter \
+ --range=$field,$brightmag,$fainter \
--sort=$field $quiet
fi
fi
- [gnuastro-commits] master 8d4e7f3d 14/69: Book: adding documentation of 'psf-create-junction' script, (continued)
- [gnuastro-commits] master 8d4e7f3d 14/69: Book: adding documentation of 'psf-create-junction' script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5a236622 21/69: PSF model: computing radial profile up to the minimum possible value, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master b5262f34 26/69: PSF stamp: rmax option was redundant, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 03bc1e69 22/69: PSF model: using PSF radial profile as input for flux factor computation, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master df256000 35/69: PSF select-stars: Add 'astscript-psf-create-select-stars' section to the, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 117fd766 24/69: PSF select stars: new script for selecting stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5d9a6d9b 50/69: PSF select-stars: make check steps done again because some new option are added, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 1e0cc1a0 43/69: PSF select-stars: changing default values to not crash in make check, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master ca8fc03a 55/69: PSF scripts: getting proper NAXIS values when data is compressed as .fz, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5eac0cea 40/69: Book: polishing the description of the PSF select-stars script, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master d99fc9df 60/69: PSF select-stars: add new option for selecting more bright stars,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 69a2e6ee 54/69: Book: correct some comments in the psf-create-select-stars, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f42832f8 23/69: PSF stamp: allowingto use a position angle and axis ratio, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 2894b35a 32/69: PSF model: including the make check step for two PSF scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master aae0d156 64/69: PSF tutorial: running of Segment on saturated images added, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 5fdd3a4a 31/69: PSF create: including the make check step for two PSF scripts, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master d6e6f9da 47/69: PSF flux-factor: correct the indentation, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 809be22b 67/69: Book: PSF construction tutorial, completed until the outer part, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 2b0b6294 56/69: PSF scripts: fixed two FAILS during make checks, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master f2a74d83 30/69: Book: fixing references and labels for the PSF scripts information, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master cf6335a6 18/69: PSF stamp: enabling the use of sigma-clip parameters, Mohammad Akhlaghi, 2022/01/26