[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." \
- [gnuastro-commits] master d8402f1a 32/39: Book: some command and some tips is added to better recognition, (continued)
- [gnuastro-commits] master d8402f1a 32/39: Book: some command and some tips is added to better recognition, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 6ff43d00 05/39: Zeropoint: script for estimating the zeropoint of an image, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 76c8a482 03/39: Zeropoint: add a script for bing it on Gnuastro, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master dddb483f 01/39: zeropoint: First make file for obtainaing the zeropoint photometry, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master a841d3f2 02/39: zeropoint: catalogs can be used as reference, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 2c027224 08/39: Zeropoint: change the output file, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master ea79c2ba 14/39: Book: tutorial of zero point; removing the sky and running the script, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 48edcd91 13/39: Book: tutorial of zero point; preparing images for using the script, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 88b4c298 23/39: Book: tutorial of zero point; subsection catalog reference, Mohammad Akhlaghi, 2023/04/19
- [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 <=
- [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, 2023/04/19
- [gnuastro-commits] master 21cd71bf 39/39: astscript-zeropoint: edits for merging into master branch, Mohammad Akhlaghi, 2023/04/19