gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 069e12f4 24/39: Zeropoint: a bug about the mat


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 069e12f4 24/39: Zeropoint: a bug about the matching of reference and main catalog
Date: Wed, 19 Apr 2023 12:18:25 -0400 (EDT)

branch: master
commit 069e12f48aab7a74671a097799537cbc1bdd9064
Author: Elham Saremi <saremi_elham@yahoo.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Zeropoint: a bug about the matching of reference and main catalog
    
    Until now, to match objects in the main and reference catalog, labels were
    used. Because IDs were the same for both catalogs when there were two
    images and both catalog were obtained with aperture photometry.
    But when there is a prepared catalog as a reference, so it is needed to do
    a match based on RA and DEC.
    
    With this commit, the bug is solved. Also, some of the typos in zeropoint
    script are corrected.
---
 bin/script/zeropoint.in | 14 +++++++-------
 bin/script/zeropoint.mk |  7 +++----
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/bin/script/zeropoint.in b/bin/script/zeropoint.in
index 4e7578c5..8b816b47 100644
--- a/bin/script/zeropoint.in
+++ b/bin/script/zeropoint.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Calculate the Zeropoint of the image based on the refrence images or
+# Calculate the Zeropoint of the image based on the reference images or
 # catalog.
 #
 # Run with '--help' for more information.
@@ -43,12 +43,12 @@ tmpdir=""
 catalog=""
 keeptmp=""
 keepzpap=""
-refrence=""
+reference=""
 aperarcsec=""
 cataloghdu=""
-refrencezp=""
+referencezp=""
 racolumn="RA"
-refrencehdu=""
+referencehdu=""
 deccolumn="DEC"
 version=@VERSION@magmg
 magnituderange=""
@@ -74,13 +74,13 @@ print_help() {
    cat <<EOF
 Usage: $scriptname [OPTIONS] image.fits
 
-Calculate the Zeropoint of the image based on the refrence images or
+Calculate the Zeropoint of the image based on the reference images or
 catalog.
 
 $scriptname options:
  Input:
   -h, --hdu=STR/INT            HDU/Extension name of number of the input file.
-  -c, --catalog=STR            Refrence catalog which based on it zeropoint of
+  -c, --catalog=STR            Reference catalog which based on it zeropoint of
                                input will be compute.
   -C, --cataloghdu=STR/INT     HDU/Extension name of number of the catalog.
   -r, --racolumn=STR           Right Ascension (R.A.) column name of the 
reference
@@ -92,7 +92,7 @@ $scriptname options:
   -R, --reference=STR[,STR]    Rerence image(s) which based on them zeropoint 
of
                                input will be compute.
   -z, --referencezp=FLT[,FLT]  Zeropoints of reference images.
-  -H, --referencehdu=STR/INT   HDU/Extension name of number of the refrence 
files.
+  -H, --referencehdu=STR/INT   HDU/Extension name of number of the reference 
files.
   -a, --aperarcsec=FLT[,FLT]   Aperure arcseconds.
   -K, --keepzpap               Keep zeropoint of each aperture in different 
extension.
 
diff --git a/bin/script/zeropoint.mk b/bin/script/zeropoint.mk
index 9f326012..2e642d11 100644
--- a/bin/script/zeropoint.mk
+++ b/bin/script/zeropoint.mk
@@ -175,17 +175,16 @@ magdiff=$(foreach r,$(allrefs), \
 $(magdiff): $(tmpdir)/%-magdiff.fits: $(tmpdir)/%-cat.fits \
             $(tmpdir)/input-$$(word 2,$$(subst -, ,%))-cat.fits
 
-#      Find the matching objects in both catalogs. Note that the
-#      labels are the same so we don't need to use RA,Dec
+#      Find the matching objects in both catalogs.
        ref=$(tmpdir)/$*-cat.fits
        match=$(subst .fits,-match.fits,$@)
        input=$(tmpdir)/input-$(word 2,$(subst -, ,$*))-cat.fits
        astmatch $$ref --hdu=1 $$input --hdu2=1 \
-                --ccol1=OBJ_ID --ccol2=OBJ_ID --aperture=0.2 \
+                --ccol1=RA,DEC --ccol2=RA,DEC --aperture=0.2 \
                 --outcols=aMAGNITUDE,bMAGNITUDE \
                 --output=$$match
 
-#      Subtract the refrence catalog mag from input catalog's mag.
+#      Subtract the reference catalog mag from input catalog's mag.
        asttable $$match -c1 -c'arith $$1 $$2 -' \
                 --colmetadat=1,MAG-REF,f32,"Magnitude of reference." \
                  --colmetadat=2,MAG-DIFF,f32,"Magnitude diff with input." \



reply via email to

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