calc-zmag

calc-zmag calculates the zero-point magnitude for a given filter by comparing raw sextractor magnitudes to cataloged magnitudes from the online SDSS catalog. The calculation solves for the zero-point using a chi-squared minimization of the difference between the observed and reference magnitudes. The zero-point solution and uncertainty are optionally written into the FITS header and plotted

N.B. Requires sextractor (command line sex, config file location defaults to /usr/local/sextractor/default.sex) 

Version: 2.43 12 Dec 2016

Known bugs/issues

  1. To wildcard the input files, use single quotes around the wildcard name e.g., calc-mag '???129*.fts’
  2. Annoying but benign ‘Experimental: SDSS has not yet been refactored…’ warning message not suppressed

Usage: calc-zmag [options]

Program calc-zmag


Options:

  --version   show program's version number and exit

  -h, --help  show this help message and exit

  -f Filter   Filter name [default G]

  -s sigma    Sextractor detection threshold [default 3]

  -d delta    Sextractor position tolerance, arcsec [default 5]

  -S Sloan    Override FITS filter name, use specified filter for reference mag. e.g. r

  -p          Plot solution

  -v          Verbose output

  -w          Write ZP, ZPERR keywords to FITS header

Example of usage: sigma= 5, verbose output, Sloan g filter, do not write to FITS header, create plot.

calc-zmag -s 5 -f g -pv Focus_G_2016_04_15_0432.fts

Running sextractor on Focus_G_2016_04_15_0432.fts with detection threshold = 5.0 sigma

Sextractor found 93 stars

Looking up observed stars in SDSS database...

Found 38 stars in SDSS lookup

Removed 1 outliers

Focus_G_2016_04_15_0432.fts  JD = 2457493.6896  Filter = G  ZP = 20.83 +/- 0.01, Sky_mag = 21.1

N  RA(J2000) Dec(J2000)    RA[deg]   Dec[deg]  g-r  FWHM   SNR    ADU/s     G_obs +/- Err     G_ref     Diff

--------------------------------------------------------------------------------------------------------------------------

 1 10:30:08.5 +30:09:07.4  157.5354   30.1521  0.47  2.2   20.1      15   17.834 +/- 0.124   17.928   -0.094

 2 10:30:33.2 +29:51:37.9  157.6381   29.8605  0.91  2.2   21.6      18   17.652 +/- 0.116   17.708   -0.056

 3 10:29:52.9 +29:51:38.6  157.4703   29.8607  1.36  1.9   14.3       9   18.421 +/- 0.175   18.351    0.070

 4 10:30:48.4 +29:51:54.6  157.7016   29.8652  0.37  2.1  157.9     242   14.877 +/- 0.016   14.862    0.016

 5 10:30:53.8 +29:51:54.7  157.7241   29.8652  0.26  2.1   67.2      71   16.194 +/- 0.037   16.162    0.032

 6 10:29:47.4 +29:53:54.4  157.4475   29.8984  1.40  2.1   27.8      19   17.645 +/- 0.090   17.760   -0.115

 7 10:29:01.7 +29:54:11.3  157.2572   29.9031  0.55  2.0  126.0     174   15.236 +/- 0.020   15.216    0.019

 8 10:30:31.0 +29:54:55.1  157.6291   29.9153  0.55  2.1   40.5      34   17.010 +/- 0.062   17.005    0.005

 9 10:30:34.6 +29:55:27.2  157.6442   29.9242  1.04  1.9   14.9      11   18.181 +/- 0.168   18.223   -0.042

10 10:29:27.0 +29:56:22.0  157.3625   29.9394  1.43  2.1   20.1      16   17.819 +/- 0.124   17.885   -0.066

11 10:30:41.7 +29:56:32.6  157.6736   29.9424  0.23  2.1   37.6      33   17.021 +/- 0.067   17.016    0.005

12 10:31:02.7 +29:57:16.7  157.7612   29.9546  0.46  2.0   23.2      18   17.682 +/- 0.108   17.652    0.030

13 10:30:42.3 +29:57:33.2  157.6763   29.9592  0.62  2.1   91.7     107   15.760 +/- 0.027   15.792   -0.031

14 10:29:01.1 +29:58:27.4  157.2547   29.9743  0.33  2.0   40.1      38   16.883 +/- 0.062   16.888   -0.005

15 10:30:24.2 +29:59:08.0  157.6007   29.9856  0.34  2.0  113.4     149   15.403 +/- 0.022   15.445   -0.042

16 10:29:00.2 +29:59:09.5  157.2510   29.9860  0.66  2.1   34.5      32   17.055 +/- 0.073   17.012    0.043

17 10:30:25.4 +29:59:37.5  157.6060   29.9937  1.25  2.1   20.5      16   17.827 +/- 0.122   17.949   -0.122

18 10:30:44.2 +29:59:46.3  157.6843   29.9962  0.67  2.2   20.8      16   17.795 +/- 0.120   17.818   -0.022

19 10:29:04.1 +30:00:39.0  157.2672   30.0108  0.60  2.1   70.6      74   16.160 +/- 0.035   16.105    0.055

20 10:29:41.7 +30:01:19.9  157.4236   30.0222  0.41  2.0   67.8      71   16.204 +/- 0.037   16.214   -0.010

21 10:29:16.4 +30:01:55.1  157.3181   30.0320  1.06  2.0   16.7      14   17.941 +/- 0.150   17.976   -0.035

22 10:30:36.0 +30:02:33.4  157.6499   30.0426  0.59  1.7   11.6       7   18.649 +/- 0.215   18.388    0.261

23 10:30:35.9 +30:02:53.2  157.6497   30.0481  0.29  2.7   10.5       7   18.702 +/- 0.238   18.607    0.095

24 10:30:14.7 +30:03:09.0  157.5614   30.0525  0.47  2.0   59.0      59   16.411 +/- 0.042   16.442   -0.031

25 10:29:39.9 +30:03:07.2  157.4164   30.0520  1.05  2.0   48.9      45   16.700 +/- 0.051   16.740   -0.040

26 10:29:39.2 +30:03:39.4  157.4135   30.0609  0.52  2.0   14.0      10   18.322 +/- 0.179   18.214    0.108

27 10:30:55.2 +30:03:54.9  157.7301   30.0652  0.82  2.1   60.7      61   16.378 +/- 0.041   16.410   -0.032

28 10:29:55.2 +30:04:13.8  157.4802   30.0705  0.72  2.8   15.6      16   17.777 +/- 0.160   17.481    0.296

29 10:30:48.5 +30:04:41.2  157.7023   30.0781  1.19  1.9   13.5      10   18.326 +/- 0.186   18.369   -0.043

30 10:30:47.5 +30:05:15.2  157.6980   30.0876  0.38  2.1   62.8      64   16.316 +/- 0.040   16.285    0.031

31 10:29:30.2 +30:05:10.2  157.3757   30.0862  0.84  1.6   13.1      10   18.284 +/- 0.191   18.233    0.051

32 10:30:00.4 +30:05:23.7  157.5018   30.0899  0.53  2.1   14.4      10   18.308 +/- 0.174   18.262    0.045

33 10:30:21.2 +30:06:32.7  157.5885   30.1091  1.41  1.9   12.9       8   18.537 +/- 0.193   18.498    0.040

34 10:30:30.5 +30:06:46.9  157.6270   30.1130  0.50  2.1  116.7     155   15.362 +/- 0.021   15.367   -0.005

35 10:30:45.1 +30:07:04.1  157.6877   30.1178  0.57  2.1   21.1      20   17.541 +/- 0.119   17.608   -0.068

36 10:30:35.4 +30:07:33.5  157.6475   30.1260  1.16  2.0   37.7      32   17.083 +/- 0.066   17.121   -0.038

37 10:30:51.0 +30:08:21.5  157.7126   30.1393  0.56  2.1   26.0      18   17.657 +/- 0.096   17.510    0.147

------------------------------------------------------------------------------------------------------------

Solution not written to FITS header, use option -w to write


© Robert Mutel 2018