[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 1e0cc1a0 43/69: PSF select-stars: changing def
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 1e0cc1a0 43/69: PSF select-stars: changing default values to not crash in make check |
Date: |
Wed, 26 Jan 2022 12:39:13 -0500 (EST) |
branch: master
commit 1e0cc1a0d28a26e8fa412b1964f0bc9086973a08
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF select-stars: changing default values to not crash in make check
Until this commit, there were some parameters set to by default values that
don't allow to run the make check without a crash. With this commit, I have
changed them to be able to run the make check without any problem. Of
course, this has to be corrected. Otherwise the script result will have no
sense in some situations. The necessary fix is to not assume any value by
default, and force the user to specify them. For example, axis ratio,
magnitude, colum names for the coordinates, etc.
---
bin/script/psf-create-select-stars.in | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/bin/script/psf-create-select-stars.in
b/bin/script/psf-create-select-stars.in
index e185cd58..68be51af 100644
--- a/bin/script/psf-create-select-stars.in
+++ b/bin/script/psf-create-select-stars.in
@@ -41,8 +41,8 @@ set -e
# Default parameter's values
hdu=1
-min=19
-max=20
+min=-99
+max=99
show=""
quiet=""
output=""
@@ -50,7 +50,7 @@ tmpdir=""
catalog=""
keeptmp=""
segmented=""
-minaxisratio=0.9
+minaxisratio=0.1
version=@VERSION@
mindistdeg=0.015277778
field="phot_g_mean_mag"
@@ -374,15 +374,15 @@ if [ x"$catalog" != x ]; then
if [ "$check" = 1 ]; then
# Make a file for output of 'asttable'.
- query=$tmpdir/query.fits
- if [ -f $query ]; then
+ catalog_magfiltered=$tmpdir/query.fits
+ if [ -f $catalog_magfiltered ]; then
echo "External Cataloge already exists "
else
# Select stars with magnitude between minimum to maximum.
asttable $catalog --range=$field,$min:$max --sort=$field \
--range=ra,$minraimg:$maxraimg \
--range=dec,$mindecimg:$maxdecimg \
- --output=$query $quiet
+ --output=$catalog_magfiltered $quiet
numstars=$(asttable $query -i | grep 'Number of rows' | awk
'{print $4}')
if [ "$numstars" = 0 ]; then
@@ -414,7 +414,6 @@ fi
-
# Select stars with good parallax
# -------------------------------
#
@@ -423,11 +422,15 @@ fi
# 'asttable' such as '--noblank', stars that have parallax larger than
# three times the parallax-error are removed.
goodparallax=$tmpdir/parallax-good.fits
-asttable $query -cra,dec -c$field \
- --range=$field,$min:$max --colinfoinstdout --noblank=4 \
- -c'arith parallax parallax abs \
- parallax_error 3 x lt nan where ' \
- | asttable -cra,dec -c$field --output=$goodparallax $quiet
+if [ x"$parallax" != x ]; then
+ asttable $query -cra,dec -c$field \
+ --range=$field,$min:$max --colinfoinstdout --noblank=4 \
+ -c'arith parallax parallax abs \
+ parallax_error 3 x lt nan where ' \
+ | asttable -cra,dec -c$field --output=$goodparallax $quiet
+else
+ cp $catalog $goodparallax
+fi
@@ -500,7 +503,7 @@ asttable $circular -cra,dec -c$field | while read r d mag;
do
numberneighbor=$tmpdir/"$r_$d"th-star-neighbor.fits
# Find number of neighborhod for each star.
- asttable $query -cra,dec -c$field \
+ asttable $catalog -cra,dec -c$field \
-c'arith ra dec '$r' '$d' distance-on-sphere \
set-i i i '$mindistdeg' gt nan where' \
--noblank=4 \
- [gnuastro-commits] master e9f4d343 09/69: PSF model: fixed bug in defining the radial profiles for flux factor, (continued)
- [gnuastro-commits] master e9f4d343 09/69: PSF model: fixed bug in defining the radial profiles for flux factor, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 30e33ec6 06/69: PSF model: new script for computing the PSF flux factor, Mohammad Akhlaghi, 2022/01/26
- [gnuastro-commits] master 65fb6894 02/69: PSF stamp: wrong script location, fixing it, Mohammad Akhlaghi, 2022/01/26
- [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 <=
- [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, 2022/01/26
- [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