gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master d9949bf7: Installed scripts: unified error mes


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master d9949bf7: Installed scripts: unified error message formats
Date: Sun, 20 Aug 2023 09:49:56 -0400 (EDT)

branch: master
commit d9949bf72c41027909d597ad4b83821d507290a9
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Installed scripts: unified error message formats
    
    Until now, some of the error messages in the installed scripts started with
    'ERROR:' after the script script name. But this is not a convention within
    Gnuastro's programs (or in the GNU Coding Standards in general). Also, when
    checking the '--*center' option value, some of the scripts did not print
    the original string! Further more, one of the error messages ended with a
    '.' (which is against the GNU Coding Standards).
    
    With this commit, all the problems above have been fixed.
---
 bin/script/dither-simulate.sh  | 16 +++++++---------
 bin/script/fits-view.sh        |  8 ++++++--
 bin/script/psf-scale-factor.sh | 18 +++++++++---------
 bin/script/psf-select-stars.sh | 20 ++++++++++----------
 bin/script/psf-stamp.sh        | 16 ++++++++--------
 bin/script/psf-subtract.sh     | 18 +++++++++---------
 bin/script/psf-unite.sh        | 12 ++++++------
 bin/script/radial-profile.sh   |  4 +++-
 bin/script/zeropoint.sh        | 12 ++++++------
 9 files changed, 64 insertions(+), 60 deletions(-)

diff --git a/bin/script/dither-simulate.sh b/bin/script/dither-simulate.sh
index e6c2dc80..183868a6 100644
--- a/bin/script/dither-simulate.sh
+++ b/bin/script/dither-simulate.sh
@@ -301,7 +301,7 @@ if [ x"$cat" = x ]; then
     echo "$scriptname: no argument (position catalog) given"; exit 1
 fi
 if [ x"$img" = x ]; then
-    echo "$scriptname: no refernece image given to '--img'"; exit 1
+    echo "$scriptname: no reference image given to '--img'"; exit 1
 fi
 if [ x"$width" = x ]; then
     echo "$scriptname: no stack width given to '--width'"; exit 1
@@ -317,7 +317,7 @@ else
                                   END{print c}')
     if [ x$ncenter != x2 ]; then
         cat <<EOF
-$scriptname: ERROR: '--center' (or '-c') only takes two values, but $ncenter 
value(s) ywere given in '$center'
+$scriptname: '--center' (or '-c') only takes two values, but $ncenter value(s) 
where given in '$center'
 EOF
         exit 1
     fi
@@ -325,7 +325,7 @@ fi
 ndither=$(asttable $cat --info-num-rows)
 if [ x$ndither = x0 ]; then
         cat <<EOF
-$scriptname: ERROR: $cat: input dither pointing table is empty! It should 
contain at least one row, containing two columns for the RA and Dec of each 
pointing of the dither pattern. Please see the documentation with this command: 
'info astscript-dither-simulate'
+$scriptname: $cat: input dither pointing table is empty! It should contain at 
least one row, containing two columns for the RA and Dec of each pointing of 
the dither pattern. Please see the documentation with this command: 'info 
astscript-dither-simulate'
 EOF
         exit 1
 fi
@@ -348,12 +348,10 @@ if [ x"$tmpdir" = x ]; then
     tmpdir=dither-tmp-$namecnodir-$nameinodir-$namecenter-$namewidth
 fi
 if [ -d $tmpdir ]; then
-    #################################
-    ######## FOR DEVELOPMENT ########
-    rm -f $tmpdir/*
-    #echo NOT CLEANING TMPDIR
-    #################################
-else                    mkdir $tmpdir
+    rm -f $tmpdir/*             # For debuging, you can comment this line
+    #echo NOT CLEANING TMPDIR   # and uncomment the 'echo' line under it.
+else
+    mkdir $tmpdir
 fi
 
 
diff --git a/bin/script/fits-view.sh b/bin/script/fits-view.sh
index 9ffea1ec..fac079e6 100644
--- a/bin/script/fits-view.sh
+++ b/bin/script/fits-view.sh
@@ -253,14 +253,18 @@ if [ x"$ds9center" != x ]; then
     # Make sure only two values are given.
     ncenter=$(echo $ds9center | awk 'BEGIN{FS=","}END{print NF}')
     if [ x$ncenter != x2 ]; then
-        echo "$scriptname: '--ds9center' (or '-c') only takes two values, but 
$ncenter were given."
+        cat <<EOF
+$scriptname: '--ds9center' (or '-c') only takes two values, but $ncenter 
value(s) where given in '$ds9center'
+EOF
         exit 1
     fi
 
     # With '--ds9center', its also necessary to give a mode (--ds9mode).
     modeerrorinfo="Depending on the nature of the central coordinates, please 
give either 'img' (for pixel coordinates) or 'wcs' (for RA,Dec) to the 
'--ds9mode' (or '-O') option."
     if [ x"$ds9mode" = x ]; then
-        echo "$scriptname: no coordinate mode provided! $modeerrorinfo"
+        cat <<EOF
+$scriptname: no coordinate mode provided! $modeerrorinfo
+EOF
         exit 1
 
     # Make sure the value to '--mode' is either 'wcs' or 'img'. Note: '-o'
diff --git a/bin/script/psf-scale-factor.sh b/bin/script/psf-scale-factor.sh
index b390b0e8..e6255f13 100644
--- a/bin/script/psf-scale-factor.sh
+++ b/bin/script/psf-scale-factor.sh
@@ -339,7 +339,7 @@ done
 # If an input image is not given at all.
 if [ x"$inputs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no input FITS image files. Run with '--help' for more 
information on how to run
+$scriptname: no input FITS image files. Run with '--help' for more information 
on how to run
 EOF
     exit 1
 elif [ ! -f "$inputs" ]; then
@@ -350,7 +350,7 @@ fi
 # If a PSF image (--psf) is not given.
 if [ x"$psf" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no PSF image or profile provided. A PSF image (profile) 
has to be specified with '--psf' (or '-p').
+$scriptname: no PSF image or profile provided. A PSF image (profile) has to be 
specified with '--psf' (or '-p')
 EOF
     exit 1
 fi
@@ -358,7 +358,7 @@ fi
 # If center coordinates (--center) is not given at all.
 if [ x"$center" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no center coordinates provided. You can specify the 
object's central coordinate with '--center' ('-c')
+$scriptname: no center coordinates provided. You can specify the object's 
central coordinate with '--center' ('-c')
 EOF
     exit 1
 else
@@ -367,7 +367,7 @@ else
                                   END{print c}')
     if [ x$ncenter != x2 ]; then
         cat <<EOF
-$scriptname: ERROR: '--center' (or '-c') only takes two values, but $ncenter 
were given in '$center'
+$scriptname: '--center' (or '-c') only takes two values, but $ncenter were 
given in '$center'
 EOF
         exit 1
     fi
@@ -376,14 +376,14 @@ fi
 # If a normalization range is not given at all.
 if [ x"$normradii" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no rign of normalization provided. You can use 
'--normradii' ('-n') to give the radial interval to define normalization
+$scriptname: no rign of normalization provided. You can use '--normradii' 
('-n') to give the radial interval to define normalization
 EOF
     exit 1
 else
     nnormradii=$(echo $normradii | awk 'BEGIN{FS=","}END{print NF}')
     if [ x$nnormradii != x2 ]; then
         cat <<EOF
-$scriptname: ERROR: '--normradii' (or '-n') only takes two values, but 
$nnormradii were given
+$scriptname: '--normradii' (or '-n') only takes two values, but $nnormradii 
were given
 EOF
         exit 1
     fi
@@ -392,7 +392,7 @@ fi
 # If mode (--mode) is not given at all.
 if [ x"$mode" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no coordinate mode provided. You can use '--mode' (or 
'-O'), acceptable values are 'img' (for pixel coordinate) or 'wcs' (for 
celestial coordinates)
+$scriptname: no coordinate mode provided. You can use '--mode' (or '-O'), 
acceptable values are 'img' (for pixel coordinate) or 'wcs' (for celestial 
coordinates)
 EOF
     exit 1
 
@@ -403,7 +403,7 @@ elif [ "$mode" = wcs     -o     "$mode" = img ]; then
     junk=1
 else
     cat <<EOF
-$scriptname: ERROR: wrong value to --mode (-O) provided. Acceptable values are 
'img' (for pixel coordinate) or 'wcs' (for celestial coordinates)
+$scriptname: wrong value to --mode (-O) provided. Acceptable values are 'img' 
(for pixel coordinate) or 'wcs' (for celestial coordinates)
 EOF
     exit 1
 fi
@@ -637,7 +637,7 @@ first_pix_in_img () {
         max=$(echo "$overlaprange" | awk '{print $4}')
     else
         cat <<EOF
-$scriptname: ERROR: a bug! Please contact with us at bug-gnuastro@gnu.org. The 
value of 'dim' is "$dim" and not recognized
+$scriptname: a bug! Please contact with us at bug-gnuastro@gnu.org. The value 
of 'dim' is "$dim" and not recognized
 EOF
         exit 1
     fi
diff --git a/bin/script/psf-select-stars.sh b/bin/script/psf-select-stars.sh
index 55c71b6c..748e45d4 100644
--- a/bin/script/psf-select-stars.sh
+++ b/bin/script/psf-select-stars.sh
@@ -363,12 +363,12 @@ done
 # If an input image is not given at all.
 if [ x"$inputs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no input FITS image files (outer part of the PSF to unite 
with an inner part). Run with '--help' for more information on how to run
+$scriptname: no input FITS image files (outer part of the PSF to unite with an 
inner part). Run with '--help' for more information on how to run
 EOF
     exit 1
 elif [ ! -f $inputs ]; then
     cat <<EOF
-$scriptname: ERROR: $inputs, no such file or directory
+$scriptname: $inputs, no such file or directory
 EOF
     exit 1
 fi
@@ -380,13 +380,13 @@ if [ x"$segmented" != x ]; then
                | wc -l)
     if [ $nhdu != 2 ]; then
         cat <<EOF
-$scriptname: ERROR: the file given to '--segmented' does not have 'CLUMPS' and 
'OBJECTS' HDUs. Please give an output from 'astsegment'
+$scriptname: the file given to '--segmented' does not have 'CLUMPS' and 
'OBJECTS' HDUs. Please give an output from 'astsegment'
 EOF
         exit 1
     fi
 elif [ ! -f $segmented ]; then
     cat <<EOF
-$scriptname: ERROR: $segmented, no such file or directory"
+$scriptname: $segmented, no such file or directory"
 EOF
     exit 1
 fi
@@ -394,7 +394,7 @@ fi
 # If the brighter and fainter range of magnitude are not given at all.
 if [ x$magnituderange = x ]; then
     cat<<EOF
-$scriptname: ERROR:no magnitude range provided. Values to '--magnituderange' 
(or '-m') should be provided"
+$scriptname: no magnitude range provided. Values to '--magnituderange' (or 
'-m') should be provided"
 EOF
     exit 1
 else
@@ -403,7 +403,7 @@ else
                                           END{print c}')
     if [ x$nmagrng != x2 ]; then
         cat<<EOF
-$scriptname: ERROR: '--magnituderange' (or '-m') only takes two values, but 
$nmagrng were given
+$scriptname: '--magnituderange' (or '-m') only takes two values, but $nmagrng 
were given
 EOF
         exit 1
     fi
@@ -419,7 +419,7 @@ else
                                   END{print c}')
     if [ x$nmparallax != x2 ]; then
         cat<<EOF
-$scriptname: ERROR: '--parallaxanderrorcolumn' (or '-p') only takes two 
values, but $nmparallax were given
+$scriptname: '--parallaxanderrorcolumn' (or '-p') only takes two values, but 
$nmparallax were given
 EOF
         exit 1
     else
@@ -430,7 +430,7 @@ fi
 # If the minimum axis ratio is not given at all.
 if [ x$minaxisratio = x ]; then
     cat<<EOF
-$scriptname: ERROR: no minimum axis ratio provided. Value to '--minaxisratio' 
(or '-Q') should be provided
+$scriptname: no minimum axis ratio provided. Value to '--minaxisratio' (or 
'-Q') should be provided
 EOF
     exit 1
 fi
@@ -438,7 +438,7 @@ fi
 # If the minimum distance between contaminants is not given at all.
 if [ x$mindistdeg = x ]; then
     cat<<EOF
-$scriptname: ERROR: no minimum distance (for rejecting neighbors) provided. 
Value to '--mindistdeg' (or '-M') should be provided
+$scriptname: no minimum distance (for rejecting neighbors) provided. Value to 
'--mindistdeg' (or '-M') should be provided
 EOF
     exit 1
 fi
@@ -446,7 +446,7 @@ fi
 # If the match aperture radius is not given at all.
 if [ x$matchaperturedeg = x ]; then
     cat<<EOF
-$scriptname: ERROR: no aperture matching radius provided. Value to 
'--matchaperturedeg' (or '-a') should be provided
+$scriptname: no aperture matching radius provided. Value to 
'--matchaperturedeg' (or '-a') should be provided
 EOF
     exit 1
 fi
diff --git a/bin/script/psf-stamp.sh b/bin/script/psf-stamp.sh
index 388a369d..03b7abb9 100644
--- a/bin/script/psf-stamp.sh
+++ b/bin/script/psf-stamp.sh
@@ -361,12 +361,12 @@ done
 # If an input image is not given at all.
 if [ x"$inputs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no input FITS image files (outer part of the PSF to unite 
with an inner part). Run with '--help' for more information on how to run
+$scriptname: no input FITS image files (outer part of the PSF to unite with an 
inner part). Run with '--help' for more information on how to run
 EOF
     exit 1
 elif [ ! -f $inputs ]; then
     cat <<EOF
-$scriptname: ERROR: $inputs, no such file or directory
+$scriptname: $inputs, no such file or directory
 EOF
     exit 1
 fi
@@ -396,7 +396,7 @@ else
                                   END{print c}')
     if [ x$ncenter != x2 ]; then
         cat <<EOF
-$scriptname: ERROR: '--center' (or '-c') only takes two values, but $ncenter 
were given in '$center'
+$scriptname: '--center' (or '-c') only takes two values, but $ncenter were 
given in '$center'
 EOF
         exit 1
     fi
@@ -423,7 +423,7 @@ EOF
         xwidthinpix=$xsize
     else
         cat <<EOF
-$scriptname: ERROR: the size of the image along the first dimension (NAXIS1) 
can not be obtained
+$scriptname: the size of the image along the first dimension (NAXIS1) can not 
be obtained
 EOF
         exit 1
     fi
@@ -438,7 +438,7 @@ EOF
         ywidthinpix=$ysize
     else
         cat <<EOF
-$scriptname: ERROR: the size of the image along the second dimension (NAXIS2) 
can not be obtained
+$scriptname: the size of the image along the second dimension (NAXIS2) can not 
be obtained
 EOF
         exit 1
     fi
@@ -471,7 +471,7 @@ else
     nnormradii=$(echo $normradii | awk 'BEGIN{FS=","}END{print NF}')
     if [ x$nnormradii != x2 ]; then
         cat <<EOF
-$scriptname: ERROR: '--normradii' (or '-n') only take two values, but 
$nnormradii were given in '$normradii'
+$scriptname: '--normradii' (or '-n') only take two values, but $nnormradii 
were given in '$normradii'
 EOF
         exit 1
     fi
@@ -487,7 +487,7 @@ if [ "$mode" = wcs     -o      $mode = "img" ]; then
     junk=1
 else
     cat <<EOF
-$scriptname: ERROR: value to '--mode' (or '-O') is not recognized ('$mode'). 
This option takes one of the following two values: 'img' (for pixel 
coordinates) or 'wcs' (for celestial coordinates)
+$scriptname: value to '--mode' (or '-O') is not recognized ('$mode'). This 
option takes one of the following two values: 'img' (for pixel coordinates) or 
'wcs' (for celestial coordinates)
 EOF
     exit 1
 fi
@@ -723,7 +723,7 @@ first_pix_in_img () {
         max=$(echo "$overlaprange" | awk '{print $4}')
     else
         cat <<EOF
-$scriptname: ERROR: a bug! Please contact with us at bug-gnuastro@gnu.org. The 
value of 'dim' is "$dim" and not recognized
+$scriptname: a bug! Please contact with us at bug-gnuastro@gnu.org. The value 
of 'dim' is "$dim" and not recognized
 EOF
         exit 1
     fi
diff --git a/bin/script/psf-subtract.sh b/bin/script/psf-subtract.sh
index 3f5335b6..11b22501 100644
--- a/bin/script/psf-subtract.sh
+++ b/bin/script/psf-subtract.sh
@@ -317,12 +317,12 @@ done
 # If an input image is not given at all.
 if [ x"$inputs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no input FITS image files. Run with '--help' for more 
information on how to run
+$scriptname: no input FITS image files. Run with '--help' for more information 
on how to run
 EOF
     exit 1
 elif [ ! -f $inputs ]; then
     cat <<EOF
-$scriptname: ERROR: $inputs, no such file or directory
+$scriptname: $inputs, no such file or directory
 EOF
     exit 1
 fi
@@ -330,12 +330,12 @@ fi
 # If a PSF image (--psf) is not given at all.
 if [ x"$psf" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no PSF image provided. The PSF image should be provided 
with '--psf' (or '-p')
+$scriptname: no PSF image provided. The PSF image should be provided with 
'--psf' (or '-p')
 EOF
     exit 1
 elif [ ! -f $psf ]; then
     cat <<EOF
-$scriptname: ERROR: $psf, no such file or directory
+$scriptname: $psf, no such file or directory
 EOF
     exit 1
 fi
@@ -343,7 +343,7 @@ fi
 # If a scale factor (--scale) is not given at all.
 if [ x"$scale" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no scale factor provided. It has to be given with 
'--scale' (or '-s'). You can derive this value with the 
'astscript-psf-model-scale-factor'
+$scriptname: no scale factor provided. It has to be given with '--scale' (or 
'-s'). You can derive this value with the 'astscript-psf-model-scale-factor'
 EOF
     exit 1
 fi
@@ -351,7 +351,7 @@ fi
 # If center coordinates (--center) is not given at all.
 if [ x"$center" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no center coordinates provided (for the star that should 
be subtracted). You can use '--center' ('-c')
+$scriptname: no center coordinates provided (for the star that should be 
subtracted). You can use '--center' ('-c')
 EOF
     exit 1
 else
@@ -360,7 +360,7 @@ else
                                   END{print c}')
     if [ x$ncenter != x2 ]; then
         cat <<EOF
-$scriptname: ERROR: $scriptname: '--center' (or '-c') only takes two values, 
but $ncenter were given
+$scriptname: '--center' (or '-c') only takes two values, but $ncenter were 
given in 'center'
 EOF
         exit 1
     fi
@@ -369,7 +369,7 @@ fi
 modeerrorinfo="Depending on the nature of the star's coordinates, please give 
either 'img' (for pixel coordinates) or 'wcs' (for RA,Dec) to the '--mode' (or 
'-O') option"
 if [ x"$mode" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no coordinate mode provided. $modeerrorinfo
+$scriptname: no coordinate mode provided. $modeerrorinfo
 EOF
     exit 1
 # Make sure the value to '--mode' is either 'wcs' or 'img'.
@@ -377,7 +377,7 @@ elif [ "$mode" = wcs    -o    "$mode" = img ]; then
     junk=1
 else
     cat <<EOF
-$scriptname: ERROR: '$mode' not acceptable for '--mode' (or '-O'). 
$modeerrorinfo
+$scriptname: '$mode' not acceptable for '--mode' (or '-O'). $modeerrorinfo
 EOF
     exit 1
 fi
diff --git a/bin/script/psf-unite.sh b/bin/script/psf-unite.sh
index eaa7bc21..a321d322 100644
--- a/bin/script/psf-unite.sh
+++ b/bin/script/psf-unite.sh
@@ -320,12 +320,12 @@ done
 # If an input image is not given at all.
 if [ x"$inputs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no input FITS image files (outer part of the PSF to unite 
with an inner part). Run with '--help' for more information on how to run
+$scriptname: no input FITS image files (outer part of the PSF to unite with an 
inner part). Run with '--help' for more information on how to run
 EOF
     exit 1
 elif [ ! -f $inputs ]; then
     cat <<EOF
-$scriptname: ERROR: $inputs, no such file or directory
+$scriptname: $inputs, no such file or directory
 EOF
     exit 1
 fi
@@ -333,12 +333,12 @@ fi
 # If an inner image (--inner) is not given at all.
 if [ x"$inner" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no inner FITS image provided. The inner part of the PSF 
(to unite with the outer part, which is the main argument) can be specified 
with the '--inner' (or '-i') option as a FITS image
+$scriptname: no inner FITS image provided. The inner part of the PSF (to unite 
with the outer part, which is the main argument) can be specified with the 
'--inner' (or '-i') option as a FITS image
 EOF
     exit 1
 elif [ ! -f "$inner" ]; then
     cat <<EOF
-$scriptname: ERROR: $inner, no such file or directory
+$scriptname: $inner, no such file or directory
 EOF
     exit 1
 fi
@@ -346,7 +346,7 @@ fi
 # If a radius (--radius) is not given at all.
 if [ x"$radius" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no radius (in pixels) provided. All pixels below this 
radius will be filled with the inner PSf image. You can use '--radius' (or 
'-r') to specify it
+$scriptname: no radius (in pixels) provided. All pixels below this radius will 
be filled with the inner PSf image. You can use '--radius' (or '-r') to specify 
it
 EOF
     exit 1
 fi
@@ -354,7 +354,7 @@ fi
 # If a scale (--scale) is not given at all.
 if [ x"$scale" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no scale factor provided ('--scale' or '-s'). This is 
necessary to scale the inner region to the outer and is usually determined with 
the 'astscript-psf-model-scale-factor'. See the Gnuastro tutorial on "Building 
the extended PSF" for more
+$scriptname: no scale factor provided ('--scale' or '-s'). This is necessary 
to scale the inner region to the outer and is usually determined with the 
'astscript-psf-model-scale-factor'. See the Gnuastro tutorial on "Building the 
extended PSF" for more
 EOF
     exit 1
 fi
diff --git a/bin/script/radial-profile.sh b/bin/script/radial-profile.sh
index 84c2af80..d8165e4b 100644
--- a/bin/script/radial-profile.sh
+++ b/bin/script/radial-profile.sh
@@ -326,7 +326,9 @@ if [ x"$center" != x ]; then
                                   {for(i=1;i<=NF;++i) c+=$i!=""} \
                                   END{print c}')
     if [ x$ncenter != x2 ]; then
-        echo "$scriptname: '--center' (or '-c') only takes two values, but 
$ncenter were given in '$center'"
+        cat <<EOF
+$scriptname: '--center' (or '-c') only takes two values, but $ncenter were 
given in 'center'
+EOF
         exit 1
     fi
 fi
diff --git a/bin/script/zeropoint.sh b/bin/script/zeropoint.sh
index 3338539e..94fb4b6d 100644
--- a/bin/script/zeropoint.sh
+++ b/bin/script/zeropoint.sh
@@ -358,12 +358,12 @@ done
 # If an input image is not given at all.
 if [ x"$inputs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no input FITS image files. Run with '--help' for more 
information on how to run
+$scriptname: no input FITS image files. Run with '--help' for more information 
on how to run
 EOF
     exit 1
 elif [ ! -f $inputs ]; then
     cat <<EOF
-$scriptname: ERROR: $inputs, no such file or directory
+$scriptname: $inputs, no such file or directory
 EOF
     exit 1
 fi
@@ -375,7 +375,7 @@ if [ x$magnituderange != x ]; then
                                           END{print c}')
     if [ x$nmagrng != x2 ]; then
         cat<<EOF
-$scriptname: ERROR: '--magnituderange' (or '-m') only takes two values, but 
$nmagrng were given
+$scriptname: '--magnituderange' (or '-m') only takes two values, but $nmagrng 
were given
 EOF
         exit 1
     fi
@@ -384,7 +384,7 @@ fi
 # If an aperture size is not given.
 if [ x"$aperarcsec" = x ]; then
     cat <<EOF
-$scriptname: ERROR: '--aperarcsec' (or '-a') is necessary at least with one 
value. Run with '--help' for more information
+$scriptname: '--aperarcsec' (or '-a') is necessary at least with one value. 
Run with '--help' for more information
 EOF
     exit 1
 fi
@@ -392,13 +392,13 @@ fi
 # If atleast one of '--refcat' or '--refimgs' are given, but not together.
 if [ x"$refcat$refimgs" = x ]; then
     cat <<EOF
-$scriptname: ERROR: no reference image(s)/catalog provided! Please use 
'--refcat' or '--refimgs' to specify the reference
+$scriptname: no reference image(s)/catalog provided! Please use '--refcat' or 
'--refimgs' to specify the reference
 EOF
     exit 1
 fi
 if [ x"$refcat" != x ] && [ x"$refimgs" != x ]; then
     cat <<EOF
-$scriptname: ERROR: only one of '--refimgs' or '--refcat' should be given
+$scriptname: only one of '--refimgs' or '--refcat' should be given
 EOF
     exit 1
 fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]