GNU Astronomy Utilities

2.7.2 Zero point tutorial with reference catalog

In Zero point tutorial with reference image, we explained how to use the astscript-zeropoint for estimating the zero point of one image based on a reference image. Sometimes there is not a reference image and we need to use a reference catalog. Fortunately, astscript-zeropoint can also use the catalog instead of the image to find the zero point.

To show this, let’s download a catalog of SDSS in the area that overlaps with the cropped J-PLUS image (used in the previous section). For more on Gnuastro’s Query program, please see Query. The columns of ID, RA, Dec and magnitude in the SDSS r filter are called by their name in the SDSS catalog.

$ astquery vizier \
           --dataset=sdss12 \
           --overlapwith=jplus-crop.fits \
           --column=objID,RA_ICRS,DE_ICRS,rmag \

To visualize the position of the SDSS objects over the J-PLUS image, let’s use astscript-ds9-region (for more details please see SAO DS9 region files from table) with the command below (it will automatically open DS9 and load the regions it created):

$ astscript-ds9-region sdss-catalog.fits \
                       --column=RA_ICRS,DE_ICRS \
                       --color=red --width=3 --output=sdss.reg \
                       --command="ds9 jplus-nc.fits[INPUT-NO-SKY] \
                                      -scale zscale"

Now, we are ready to estimate the zero point of the J-PLUS image based on the SDSS catalog. To download the input image and understand how to use the astscript-zeropoint, please see Zero point tutorial with reference image.

Many of the options (like the aperture size) and magnitude range are the same so we will not discuss them further. You will notice that the only substantive difference of the command below with the last command in the previous section is that we are using --refcat instead of --refimgs. There are also some cosmetic differences for example a new output name, not using --refimgszp since it is only necessary for images) and the --*column options which are used to identify the names of the necessary columns of the input catalog:

$ astscript-zeropoint jplus-nc.fits --hdu=INPUT-NO-SKY \
                      --refcat=sdss-catalog.fits \
                      --refcatmag=rmag \
                      --refcatra=RA_ICRS \
                      --refcatdec=DE_ICRS \
                      --output=jplus-zeropoint-cat.fits \
                      --magnituderange=16.4,18.5 \
                      --aperarcsec=2,2.5,3,3.5,4 \

Let’s inspect the output with the command below.

$ asttable jplus-zeropoint-cat.fits -Y
2.000          26.337         0.034
2.500          26.386         0.036
3.000          26.417         0.041
3.500          26.439         0.043
4.000          26.455         0.050

As you see, the values and standard deviations are very similar to the results we got previously in Zero point tutorial with reference image. The Standard deviations are generally a little higher here because we didn’t do the photometry ourselves, but they are statistically similar.

Before we finish, let’s open the two outputs (from a reference image and reference catalog) with the command below. To confirm how they compare, we are showing the result for APER-3 extension in both (following the TOPCAT plotting recipe in Zero point tutorial with reference image).

$ astscript-fits-view jplus-zeropoint.fits jplus-zeropoint-cat.fits \