[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 9ca784e4 27/69: PSF select stars: if the image
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 9ca784e4 27/69: PSF select stars: if the image has not stars in `--min` and `--max` range |
Date: |
Wed, 26 Jan 2022 12:39:12 -0500 (EST) |
branch: master
commit 9ca784e4616d43f325907609d9036e194d2eefe6
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF select stars: if the image has not stars in `--min` and `--max` range
of magnitude
Until now, if the user had been specified to select the stars in the range
of magnitude between the `--min` to `--max`, while in the image, stars in
the range of magnitude between `--min` and `--max` was not exist, the error
of the "--stdintimeout" had been ocured. Without any warning about the
stars in this range of magnitude was not exist.
Now with this commit, when the user has specified to select the stars in
the range of magnitude between `--min`-`--max`, while in the image any
stars in this range of magnitude does not exist, the script will be
stopped, and print the "There were no stars in magnitude range `--min` to
`--max`". In this case the user will be know where is the problem.
---
bin/script/psf-create-select-stars.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bin/script/psf-create-select-stars.in
b/bin/script/psf-create-select-stars.in
index 1856b388..06e16e9b 100755
--- a/bin/script/psf-create-select-stars.in
+++ b/bin/script/psf-create-select-stars.in
@@ -51,7 +51,6 @@ max=20
hdu=""
bdir=""
show=""
-input=""
quiet=""
catalog=""
segmented=""
@@ -382,7 +381,16 @@ if [ -f $catalog ]; then
else
# Select stars with magnitude between 0 to maximum.
asttable $catalog --range=$field,0:$max --sort=$field \
+ --range=ra,$minraimg:$maxraimg \
+ --range=dec,$mindecimg:$maxdecimg \
--output=$query
+
+ numstars=$(asttable $query -i | grep 'Number of rows' | awk
'{print $4}')
+ if [ "$numstars" = 0 ]; then
+ rm -rf $bdir
+ echo "There were no stars in magnitude range $min to $max"
+ exit 2
+ fi
fi
else
# If catalog doesn't overlap the image stop.
- [gnuastro-commits] master b14fdf1d 04/69: PSF stamp: fixing wrong directory of this script, (continued)
- [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, 2022/01/26
- [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 <=
- [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
- [gnuastro-commits] master 9ab3dd28 51/69: PSF stamp: new option to set a mask sky pixel value: maskskyval, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 31f0373a 05/69: PSF model: new script for putting a PSF image into a sky position, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 0ea23b70 69/69: Book: PSF tutorial now with instruction to build first inner region, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 00f2ab56 63/69: PSF select-stars: simplifying some parts and language corrections, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 6638c671 53/69: Book: correct the definition of option --minaxisratio, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master e9f4d343 09/69: PSF model: fixed bug in defining the radial profiles for flux factor, Mohammad Akhlaghi, 2022/01/26