[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 83e74d09 38/39: astscript-zeropoint: the name
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 83e74d09 38/39: astscript-zeropoint: the name of some options are modified |
Date: |
Wed, 19 Apr 2023 12:18:28 -0400 (EDT) |
branch: master
commit 83e74d09796498841461318cbe2f5b30e741c059
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
astscript-zeropoint: the name of some options are modified
Until now, some options were not clear. For instance, with '--reference'
option it was difficult realize this is for images reference or catalog
reference. On the other hand, '--catalog' option belonged to the reference
catalog but it was not clear too.
With this commit, the name of this options changed to the '--refimgs' and
'--refcat' and now they clear for users.
---
bin/script/zeropoint.in | 62 ++++++++++++++++++++++++-------------------------
doc/gnuastro.texi | 36 ++++++++++++++--------------
2 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/bin/script/zeropoint.in b/bin/script/zeropoint.in
index 7a0c5847..ed08169f 100644
--- a/bin/script/zeropoint.in
+++ b/bin/script/zeropoint.in
@@ -50,15 +50,15 @@ jobs=1
quiet=""
output=""
tmpdir=""
-catalog=""
+refcat=""
keeptmp=""
keepzpap=""
-reference=""
+refimgs=""
aperarcsec=""
-cataloghdu=""
+refcathdu=""
racolumn="RA"
referencezp=""
-referencehdu=""
+refimgshdu=""
deccolumn="DEC"
matchradius=0.2
magnituderange=""
@@ -92,17 +92,17 @@ catalog.
$scriptname options:
Input:
-h, --hdu=STR/INT HDU/Extension name or number of the input file.
- -c, --catalog=STR Reference catalog considered as the reference.
- -C, --cataloghdu=STR/INT HDU/Extension name of number of the ref.
catalog.
+ -c, --refcat=STR Reference catalog considered as the reference.
+ -C, --refcathdu=STR/INT HDU/Extension name of number of the ref.
catalog.
-r, --racolumn=STR Right Ascension (R.A.) column name of the ref.
catalog.
-d, --deccolumn=STR Declination (Dec) column name of the ref.
catalog.
-m, --magcolumn=STR Magnitude column name of the ref. catalog.
-M, --magnituderange=FLT,FLT Range of the magnitude to be considered.
-s, --matchradius=FLT Matching distance with the ref. catalog.
- -R, --reference=STR[,STR] Image(s) considered as the reference(s).
+ -R, --refimgs=STR[,STR] Image(s) considered as the reference(s).
-z, --referencezp=FLT[,FLT] Zero point(s) of the reference image(s).
- -H, --referencehdu=STR/INT HDU/Extension name(s) or number(s) the ref.
images.
+ -H, --refimgsdu=STR/INT HDU/Extension name(s) or number(s) the ref. images.
-a, --aperarcsec=FLT[,FLT] Aperture radius (in arco seconds) for
photometry.
-K, --keepzpap Keep the zero point from each aperture in a
different HDU.
-j, --jobs=INT Number of threads; maximum jobs with no arg.
@@ -262,12 +262,12 @@ do
-h|--hdu) hdu="$2";
check_v "$1" "$hdu"; shift;shift;;
-h=*|--hdu=*) hdu="${1#*=}";
check_v "$1" "$hdu"; shift;;
-h*) hdu=$(echo "$1" | sed -e's/-h//');
check_v "$1" "$hdu"; shift;;
- -c|--catalog) catalog="$2";
check_v "$1" "$catalog"; shift;shift;;
- -c=*|--catalog=*) catalog="${1#*=}";
check_v "$1" "$catalog"; shift;;
- -c*) catalog=$(echo "$1" | sed -e's/-c//');
check_v "$1" "$catalog"; shift;;
- -C|--cataloghdu) cataloghdu="$2";
check_v "$1" "$cataloghdu"; shift;shift;;
- -C=*|--cataloghdu=*) cataloghdu="${1#*=}";
check_v "$1" "$cataloghdu"; shift;;
- -C*) cataloghdu=$(echo "$1" | sed -e's/-C//');
check_v "$1" "$cataloghdu"; shift;;
+ -c|--refcat) refcat="$2";
check_v "$1" "$refcat"; shift;shift;;
+ -c=*|--refcat=*) refcat="${1#*=}";
check_v "$1" "$refcat"; shift;;
+ -c*) refcat=$(echo "$1" | sed -e's/-c//');
check_v "$1" "$refcat"; shift;;
+ -C|--refcathdu) refcathdu="$2";
check_v "$1" "$refcathdu"; shift;shift;;
+ -C=*|--refcathdu=*) refcathdu="${1#*=}";
check_v "$1" "$refcathdu"; shift;;
+ -C*) refcathdu=$(echo "$1" | sed -e's/-C//');
check_v "$1" "$refcathdu"; shift;;
-r|--racolumn) racolumn="$2";
check_v "$1" "$racolumn"; shift;shift;;
-r=*|--racolumn=*) racolumn="${1#*=}";
check_v "$1" "$racolumn"; shift;;
-r*) racolumn=$(echo "$1" | sed -e's/-r//');
check_v "$1" "$racolumn"; shift;;
@@ -284,15 +284,15 @@ do
-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;;
- -R|--reference) reference="$2";
check_v "$1" "$reference"; shift;shift;;
- -R=*|--reference=*) reference="${1#*=}";
check_v "$1" "$reference"; shift;;
- -R*) reference=$(echo "$1" | sed -e's/-R//');
check_v "$1" "$reference"; shift;;
+ -R|--refimgs) refimgs="$2";
check_v "$1" "$refimgs"; shift;shift;;
+ -R=*|--refimgs=*) refimgs="${1#*=}";
check_v "$1" "$refimgs"; shift;;
+ -R*) refimgs=$(echo "$1" | sed -e's/-R//');
check_v "$1" "$refimgs"; shift;;
-z|--referencezp) referencezp="$2";
check_v "$1" "$referencezp"; shift;shift;;
-z=*|--referencezp=*) referencezp="${1#*=}";
check_v "$1" "$referencezp"; shift;;
-z*) referencezp=$(echo "$1" | sed -e's/-z//');
check_v "$1" "$referencezp"; shift;;
- -H|--referencehdu) referencehdu="$2";
check_v "$1" "$referencehdu"; shift;shift;;
- -H=*|--referencehdu=*) referencehdu="${1#*=}";
check_v "$1" "$referencehdu"; shift;;
- -H*) referencehdu=$(echo "$1" | sed -e's/-H//');
check_v "$1" "$referencehdu"; shift;;
+ -H|--refimgshdu) refimgshdu="$2";
check_v "$1" "$refimgshdu"; shift;shift;;
+ -H=*|--refimgsdu=*) refimgshdu="${1#*=}";
check_v "$1" "$refimgshdu"; shift;;
+ -H*) refimgshdu=$(echo "$1" | sed -e's/-H//');
check_v "$1" "$refimgshdu"; shift;;
-a|--aperarcsec) aperarcsec="$2";
check_v "$1" "$aperarcsec"; shift;shift;;
-a=*|--aperarcsec=*) aperarcsec="${1#*=}";
check_v "$1" "$aperarcsec"; shift;;
-a*) aperarcsec=$(echo "$1" | sed -e's/-a//');
check_v "$1" "$aperarcsec"; shift;;
@@ -429,11 +429,11 @@ minrainput=$(echo $allradecinput | awk '{print $1}')
maxrainput=$(echo $allradecinput | awk '{print $2}')
mindecinput=$(echo $allradecinput | awk '{print $3}')
maxdecinput=$(echo $allradecinput | awk '{print $4}')
-if [ x"$catalog" != x ]; then
+if [ x"$refcat" != x ]; then
# Find the overlaping area between catalog and image.
skycoverage=$tmpdir/skycoverage.fits
- asttable $catalog --inpolygon=$racolumn,$deccolumn \
+ asttable $refcat --inpolygon=$racolumn,$deccolumn \
--polygon="$minrainput,$mindecinput \
: $minrainput,$maxdecinput \
: $maxrainput,$mindecinput \
@@ -456,14 +456,14 @@ if [ x"$catalog" != x ]; then
elif [ x"$reference" != x ]; then
# Compute how many references images are used.
- nums=$(echo $reference \
+ nums=$(echo $refimgs \
| awk 'BEGIN{FS=","}{for(i=1;i<=NF;++i) printf "%s ", i}')
for n in $nums; do
# Extract the reference images name and their HDU.
- img=$(echo $reference | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
- hduimg=$(echo $referencehdu | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
+ img=$(echo $refimgs | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
+ hduimg=$(echo $refimgshdu | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
# Find the overlaping area between the catalog and the image.
skycoverage=$tmpdir/skycoverage-$n.fits
@@ -522,12 +522,12 @@ aper=$(echo $aperarcsec | sed 's|,| |g')
echo "aper-arcsec = $aper" >> $config
# If a catalog is provided as the reference.
-if [ x"$catalog" != x ]; then
+if [ x"$refcat" != x ]; then
# Basic parameters.
echo "reftype = cat" >> $config
- echo "ref1 = $catalog" >> $config
- echo "hduref1 = $cataloghdu" >> $config
+ echo "ref1 = $refcat" >> $config
+ echo "hduref1 = $refcathdu" >> $config
echo "refnumber = 1" >> $config
echo "ra = $racolumn" >> $config
echo "dec = $deccolumn" >> $config
@@ -539,14 +539,14 @@ else
echo "reftype = img" >> $config
# Compute how many references images are used.
- num=$(echo $reference \
+ num=$(echo $refimgs \
| awk 'BEGIN{FS=","}{for(i=1;i<=NF;++i) printf "%s ", i}')
echo "refnumber = $num" >> $config
# For each image, write its variables.
for n in $num; do
- img=$(echo $reference | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
- hdu=$(echo $referencehdu | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
+ img=$(echo $refimgs | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
+ hdu=$(echo $refimgshdu | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
zp=$(echo $referencezp | awk 'BEGIN{FS=","}{printf "%s", $'$n'}')
echo "ref$n = $img" >> $config
echo "hduref$n = $hdu" >> $config
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index af11a56e..bc5467e9 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -29698,10 +29698,10 @@ Keep only the essential options that are including
the information of the input
@example
$ astscript-zeropoint --help
$ astscript-zeropoint zp/jplus-nc.fits --hdu=INPUT-NO-SKY \
- --reference=zp/sdss1.fits,zp/sdss2.fits \
+ --refimgs=zp/sdss1.fits,zp/sdss2.fits \
--output=zp/jplus-zeropoint.fits \
--referencezp=22.5,22.5 \
- --referencehdu=0,0 \
+ --refimgshdu=0,0 \
--aperarcsec=3
@end example
@@ -29786,12 +29786,12 @@ Also, use the useful @option{--keepzpap} option to
keep the result of matching t
@example
$ astscript-zeropoint zp/jplus-nc.fits --hdu=INPUT-NO-SKY \
- --reference=zp/sdss1.fits,zp/sdss2.fits \
+ --refimgs=zp/sdss1.fits,zp/sdss2.fits \
--output=zp/jplus-zeropoint.fits
--referencezp=22.5,22.5 \
--aperarcsec=2,3,4,5,6 \
--magnituderange=16,18 \
- --referencehdu=0,0 \
+ --refimgshdu=0,0 \
--keepzpap
@end example
@@ -29833,12 +29833,12 @@ To see the final result for the zero point, please,
re-run the script with the n
@example
$ astscript-zeropoint zp/jplus-nc.fits --hdu=INPUT-NO-SKY \
- --reference=zp/sdss1.fits,zp/sdss2.fits \
+ --refimgs=zp/sdss1.fits,zp/sdss2.fits \
--output=zp/jplus-zeropoint.fits
--magnituderange=16.4,17.8 \
--referencezp=22.5,22.5 \
--aperarcsec=2,3,4,5,6 \
- --referencehdu=0,0 \
+ --refimgshdu=0,0 \
--keepzpap
@end example
@@ -29888,8 +29888,8 @@ In what follow, only the related options to the
reference catalog will be shown.
@example
$ astscript-zeropoint zp/jplus-nc.fits --hdu=INPUT-NO-SKY \
- --catalog=zp/sdss-catalog.fits \
- --cataloghdu=1 \
+ --refcat=zp/sdss-catalog.fits \
+ --refcathdu=1 \
--magcolumn=rmag \
--racolumn=RA_ICRS \
--deccolumn=DE_ICRS \
@@ -29924,8 +29924,8 @@ We can select an interval with lower fluctuations for
example around 16.8 to 17.
@example
$ astscript-zeropoint zp/jplus-nc.fits --hdu=INPUT-NO-SKY \
- --catalog=zp/sdss-catalog.fits \
- --cataloghdu=1 \
+ --refcat=zp/sdss-catalog.fits \
+ --refcathdu=1 \
--magcolumn=rmag \
--racolumn=RA_ICRS \
--deccolumn=DE_ICRS \
@@ -29969,8 +29969,8 @@ This script can be used with the following general
template:
## Based on the reference images zero point of the input image will
obtained.
$ astscript-zeropoint image.fits --hdu=1 \
- --reference=ref-img1.fits,ref-img2.fits \
- --referencehdu=1,1 \
+ --refimgs=ref-img1.fits,ref-img2.fits \
+ --refimgshdu=1,1 \
--referencezp=22.5,22.5 \
--aperarcsec=1.5,2,2.5,3 \
--magnituderange=16,18 \
@@ -29981,8 +29981,8 @@ $ astscript-zeropoint image.fits --hdu=1 \
## Based on the catalog which has magnitude column zero point of the
image will obtained.
$ astscript-zeropoint image.fits --hdu=1 \
- --catalog=cat.fits \
- --cataloghdu=1 \
+ --refcat=cat.fits \
+ --refcathdu=1 \
--aperarcsec=1.5,2,2.5,3 \
--magnituderange=16,18 \
--output=output.fits
@@ -29997,12 +29997,12 @@ This script takes the following options:
The HDU/extension of the input image to use.
@item -c STR
-@itemx --catalog=STR
+@itemx --refcat=STR
Reference catalog which based on it, the zeropoint of the input image will be
estimated.
This catalog should be have ra, dec and magnitude of the stars.
@item -C STR/INT
-@itemx --cataloghdu=STR/INT
+@itemx --refcathdu=STR/INT
The HDU/extension of the reference catalog will be calculated.
@item -r STR
@@ -30018,7 +30018,7 @@ Declination column name of the reference catalog.
Magnitude column name of the reference catalog.
@item -R STR,[STR]
-@itemx --reference=STR,[STR]
+@itemx --refimgs=STR,[STR]
Reference image or images which based on the zeropoint of the input image will
be estimated.
@item -s FLT
@@ -30033,7 +30033,7 @@ Zeropoint of the reference image or images.
The number of this should be the same as the number of referene image(s).
@item -H STR/INT
-@itemx --referencehdu=STR/INT
+@itemx --refimgshdu=STR/INT
HDU/Extension name of number of the reference files.
The number of this should be the same as the number of referene image(s).
- [gnuastro-commits] master aeb507b8 22/39: Book: correct the info format menus, (continued)
- [gnuastro-commits] master aeb507b8 22/39: Book: correct the info format menus, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 069e12f4 24/39: Zeropoint: a bug about the matching of reference and main catalog, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master c4af3dfc 25/39: Book: tutorial of zero point; completing the catalog reference, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 536052fb 35/39: astscript-zeropoint: writting all receipes as in one shell, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 96137885 09/39: Zeropoint: keep Mag-vs-Zeropoint for best aperture in output, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 151e8bfc 20/39: Book: editing zero point estimation section, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 85a5ad67 21/39: zeropoint: using single equal instead of the double for checking, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master ea82d80a 29/39: Book: Use suggestive instead of imperative word, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 4bf867d3 26/39: Book: open imge by 'zscale' scale and options are written as code format, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 3cc85d96 34/39: astscript-zeropoint: new option --matchradius added, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 83e74d09 38/39: astscript-zeropoint: the name of some options are modified,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 21cd71bf 39/39: astscript-zeropoint: edits for merging into master branch, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 0fabd68e 30/39: Zeropoint: add an option for doing many jobs and check overlapping, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 0e982706 33/39: astscript-zeropoint: polishing and improving the comments of the scripts, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master fcf00960 37/39: astscript-zeropoint: Content of temorary file have been removed, Mohammad Akhlaghi, 2023/04/19