[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master f58c3211 08/69: PSF model: checking that a PSF
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master f58c3211 08/69: PSF model: checking that a PSF image is given for computing flux factor |
Date: |
Wed, 26 Jan 2022 12:39:09 -0500 (EST) |
branch: master
commit f58c321196661701ed3ed395df6164274ead228c
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
PSF model: checking that a PSF image is given for computing flux factor
Until this commit, the script that computes the flux factor was not
checking if a PSF image was given. This was causing the script to crash and
it took to me a while to notice that error. With this commit, I have added
a check to ensure that a PSF image is provided with the option '--psf'. If
the user does not provide it, the script will crash and warn about this
problem with a good message.
---
bin/script/psf-model-flux-factor.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bin/script/psf-model-flux-factor.in
b/bin/script/psf-model-flux-factor.in
index 6781a505..b438f0dc 100644
--- a/bin/script/psf-model-flux-factor.in
+++ b/bin/script/psf-model-flux-factor.in
@@ -286,6 +286,13 @@ if [ x"$inputs" = x ]; then
exit 1
fi
+# If a PSF image (--psf) is not given at all.
+if [ x"$psf" = x ]; then
+ echo "$scriptname: no PSF image provided."
+ echo "A PSF image has to be specified with --psf or -p."
+ exit 1
+fi
+
# If a stamp width (--stampwidth) is not given at all.
if [ x"$stampwidth" = x ]; then
echo "$scriptname: no stamp width provided."
- [gnuastro-commits] master updated (86a4db4b -> 0ea23b70), Mohammad Akhlaghi, 2022/01/26
- [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 <=
- [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, 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