### 16 Calibrating Instrumental Magnitudes

This recipe describes how to calibrate a set of instrumental magnitudes into standard magnitudes. It assumes that you are going to calibrate instrumental magnitudes for a set of programme objects by the usual technique of observing a set of standard stars. Thus, the starting point is a list of standard stars with both instrumental and standard (or catalogue) magnitudes and a list of programme objects with instrumental magnitudes. The techniques for calibrating instrumental magnitudes are discussed in Section 11.

The recipe uses the photometric calibration functions in the CURSA package for manipulating catalogues and tables (see SUN/190[16]) which do not include colour corrections. Thus, the recipe is only appropriate if your instrumental system is well-matched to the target standard system and where very high precision is not required. Nonetheless, with modern instrumentation and good observing conditions it is possible to achieve results accurate to within 0.01 magnitude.

(1)
The first, and certainly the messiest and most time consuming, stage is to assemble the required input data. You need to assemble two tables (or catalogues15): one containing the data for the standard stars and the other the data for the programme objects. Strictly speaking two sets of tables are required, with each corresponding to the observations from a different night; observations from different nights should not normally be combined prior to calibration. However, for the purpose of this recipe it is assumed that you have only observations from a single night and hence only two input tables are required.

The contents of the two tables are as follows.

The table of standard stars
should contain: the catalogue magnitude, instrumental magnitude and air mass for each standard star.
The table of programme objects
should contain: the instrumental magnitude and air mass for each object.

In both cases, if you do not have the air mass then the zenith distance can be substituted instead. Note that it is the observed zenith distance, that is, as affected by atmospheric refraction, which is required. You obtain these various items of information as follows.

• The instrumental magnitudes will be assembled from the output of other programs, such as PHOTOM or GAIA (see the recipes in Sections 14 and 15).
• The standard or catalogue magnitudes will ultimately come from the catalogues of standards which you used when selecting the standard stars to observe.
• The air mass or zenith distance will often be included in either your observing logs or the header information of your CCD frames. If neither the air mass nor the zenith distance is available then you will have to calculate the zenith distance. Appendix B gives some hints on inspecting CCD frames to find the required information and calculating the zenith distance.

These various data must be edited into two tables which CURSA can read. The simplest way to format these tables is to use the CURSA Small Text List (STL) format. STL tables are simple text files which can be created with a text editor. If you originally used CURSA to select the standard stars to observe, as described in the recipe in Section 13, you could use the catalogue of standard stars which the recipe produces as a starting point. This approach has the advantage of avoiding have to re-type the catalogue magnitudes. Alternatively, example catalogues are available as starting points and these are used in this recipe. The catalogues of standard stars and programme objects are discussed separately below. You should copy these example catalogues into a convenient directory and make this directory your current directory.

 Standard Catalogue Colours Time Air Mass Instrumental Star $R$ $\left(B-V\right)$ (UT) Magnitudes 113Z475 09.737 1.057 19:58 1.16 16.37 110Z450 11.033 0.950 20:06 2.20 17.74 114Z531 11.672 0.732 20:12 1.13 18.29 113Z475 09.737 1.057 21:33 1.41 16.39 114Z548 10.868 1.362 21:43 1.23 17.50 94Z251 10.547 1.218 00:19 1.14 17.17 93Z424 11.067 1.084 00:25 1.18 17.69 95Z74 10.931 1.127 00:32 1.17 17.55 96Z737 10.982 1.331 00:38 1.26 17.62 97Z249 11.369 0.651 03:11 1.14 17.99 94Z251 10.547 1.218 03:16 1.57 17.21 95Z301 10.527 1.285 03:20 1.32 17.16 99Z367 10.618 1.005 05:36 1.15 17.23 96Z737 10.982 1.331 05:42 1.81 17.67

Table 4: Table of standard star observations. These data were observed with the Jacobus Kapteyn Telescope (JKT) on La Palma on 16/11/1993. They are provided courtesy of John Lucey

Standard star catalogue
Table 4 shows a list of observations of standard stars kindly provided by John Lucey. Figure 14 shows an example catalogue compiled from this list. This example is available as file:
/star/examples/cursa/photostandards.TXT

Note that the example catalogue does not contain all the columns in Table 4. The catalogue is in the CURSA STL format. This format is probably more-or-less self-explanatory. In case of difficulty there is a short introductory tutorial in the CURSA manual, SUN/190[16]. The most relevant points are:

• lines beginning with an exclamation mark (‘!’) are comments,
• blank lines are ignored,
• in CURSA each column in a table has a unique name within the table and you use this name to refer to the column. The lines beginning with ‘C’ define the columns in the table. The word immediately following the ‘C’ is the name of the column, the next item is its data type and the following one its sequence number in the table of values. Thus in Figure 14 the first column is a character string called NAME, the second column a double-precision number called MCATetc,
• the table of values itself occurs immediately following the ‘BEGINTABLE’ line.

The catalogue must contain columns containing the instrumental magnitude, the catalogue magnitude and the air mass (or alternatively the observed zenith distance). It may optionally contain a column containing a name for each of the standard stars and a column of ‘include in the fit’ flags. All five columns are included in the example. If supplied, the star name is listed in the table of residuals produced when the fit is made. Often being able to identify each standard star will be useful to you. The ‘include in the fit’ flag column is of data type LOGICAL and determines whether each star is included in the fit or not. To include or exclude a given star in the fit you simply edit the STL format catalogue and toggle the value of the flag for the star to ‘T’ (or ‘TRUE’) or ‘F’ (or ‘FALSE’) to include or exclude it as appropriate. This procedure is much less troublesome and error-prone than deleting and reinserting stars from the catalogue. Initially set the flags for all the stars to ‘T’ (or ‘TRUE’) so that they are all included in the fit. In the example all the stars are included in the fit except 99Z367 (the penultimate one in the list). This star is excluded as an illustration. When preparing your own catalogues you will usually initially include all the stars.

!+
! Example catalogue of photometric standards.
!
! These data were observed with the Jacobus Kapteyn Telescope
! (JKT) on La Palma on 16/11/1993.  The catalogue magnitudes are in
! the R band and the instrumental magnitudes approximate to this
! system.  The data are provided courtesy of John Lucey (Durham).
!
! A C Davenhall (Edinburgh) 12/10/97.
!-

C NAME    CHAR*7  1  EXFMT=A7    ! Star name.
C MCAT    DOUBLE  2  EXFMT=F7.3  ! Catalogue magnitude.
C MINST   DOUBLE  3  EXFMT=F7.3  ! Instrumental magnitude.
C AIRMASS DOUBLE  4  EXFMT=F7.3  ! Air mass.
C INCL    LOGICAL 5  EXFMT=L5    ! ’Include in the fit’ flags.

BEGINTABLE
113Z475  09.737  16.37  1.16  T
110Z450  11.033  17.74  2.20  T
114Z531  11.672  18.29  1.13  T
113Z475  09.737  16.39  1.41  T
114Z548  10.868  17.50  1.23  T
94Z251  10.547  17.17  1.14  T
93Z424  11.067  17.69  1.18  T
95Z74   10.931  17.55  1.17  T
96Z737  10.982  17.62  1.26  T
97Z249  11.369  17.99  1.14  T
94Z251  10.547  17.21  1.57  T
95Z301  10.527  17.16  1.32  T
99Z367  10.618  17.23  1.15  F
96Z737  10.982  17.67  1.81  T

Figure 14: Example of a catalogue of photometric standard stars

The zenith distance is an angle and if it is used it must ultimately be presented to the CURSA applications in radians. If you wish you can simply type the values into the STL catalogue in radians. Alternatively, if it is more convenient, you can define the zenith distance column as containing a sexagesimal angle, usually in degrees, and type in the values as sexagesimal degrees. The example catalogue of programme objects in Figure 15 includes a column of zenith distances in this form.

Though both the columns of star names and ‘include in the fit’ flags are optional their use is strongly recommended.

The columns do not have to have the names shown in the example. However, if you use these names you will be able to accept the defaults from the prompts in the CURSA applications.

A useful trick is to enter the observations in the table in chronological order of observation. Then, when the residuals are computed they also will be listed in order of observation, making it easy to spot any systematic trends during the night.

Obviously the catalogue can contain additional columns, though these are not used. For example, if you are calibrating multi-colour photometry you could prepare a single catalogue containing the instrumental and catalogue magnitudes in all the colours observed. Obviously the columns for magnitudes in different colours would have to have different names. If you did not observe all the stars in all the colours simply use the STL mechanism for indicating missing (or ‘null’) values: enter the string ‘<null>’ instead of the missing value (see SUN/190 for further details).

Programme object catalogue
Figure 15 shows an example catalogue of programme objects. This example is available as file:
/star/examples/cursa/photoprog.TXT

As an illustration this catalogue contains columns of both the air mass and the observed zenith distance. It does not need to contain both, but must contain one or the other. Here the zenith distance has been entered as sexagesimal degrees and minutes.

!+
! Example catalogue of photometric programme objects.
!
! Note that this table contains both the air mass and the observed
! zenith distance.  The zenith distance is given in sexagesimal
! degrees and minutes.
!
! A C Davenhall (Edinburgh) 12/10/97.
!-

C MINST   DOUBLE  1 EXFMT=F7.3    ! Instrumental magnitude.
C AIRMASS DOUBLE  2 EXFMT=F7.3    ! Air mass.
C ZENDIST DOUBLE  3 UNITS=’RADIANS{DM}’ TBLFMT=DEGREES ! Zenith distance.

BEGINTABLE
17.38  1.00   1:43
17.03  1.24  36:06
17.49  1.11  25:47
17.87  1.04  15:28
17.42  1.05  18:20
17.26  1.91  58:27

Figure 15: Example of a catalogue of photometric programme objects

The columns do not have to have the names shown in the example. However, if you use these names you will be able to accept the defaults from the prompts in the CURSA applications.

The catalogue can contain additional columns; indeed a programme catalogue will often contain celestial coordinates and/or object names. Also, if you are calibrating multi-colour photometry you could prepare a single catalogue containing the instrumental magnitudes in all the colours observed. Obviously the columns for magnitudes in different colours would have to have different names. If you did not observe all the objects in all the colours simply use the STL mechanism for indicating missing (or ‘null’) values: enter the string ‘<null>’ instead of the missing value (see SUN/190 for further details).

(2)
Once you have prepared the input catalogues you are ready to start CURSA. Simply type:
%  cursa

A message similar to the following should appear.

CURSA commands are now available -- (Version 6.3)

(3)
The next stage is to use the standard stars to define the transformation between instrumental and catalogue magnitudes. If your table of standard stars contains air masses (as in the example) then simply type:
%  catphotomfit

Conversely, if the catalogue of standard stars contains observed zenith distances then type:

%  catphotomfit  zenithdist=true

In both cases you will be prompted for various column names. If you have used the same column names as the example in Figure 14 you will be able to hit return in response to the prompts. catphotomfit then displays some details of the fit, writes a file of transformation coefficients and terminates.

Coefficients determined successfully from fitting 13 stars:

zero point = 23.474252
atmospheric extinction = 0.085569

(minimum residual vector length = 0.018932)

Seq.  Star         Fit Air      Cat.       Instrumental Mag.
no.                    mass     Mag.    calc.  observe residual
1  113Z475        Y  1.16    9.737    9.745  16.370  -0.008 :**********
2  110Z450        Y  2.20   11.033   11.026  17.740   0.007 :********
3  114Z531        Y  1.13   11.672   11.668  18.290   0.004 :*****
4  113Z475        Y  1.41    9.737    9.744  16.390  -0.007 :********
5  114Z548        Y  1.23   10.868   10.869  17.500  -0.001 :*
6  94Z251         Y  1.14   10.547   10.547  17.170   0.000 :
7  93Z424         Y  1.18   11.067   11.063  17.690   0.004 :****
8  95Z74          Y  1.17   10.931   10.924  17.550   0.007 :********
9  96Z737         Y  1.26   10.982   10.986  17.620  -0.004 :*****
10  97Z249         Y  1.14   11.369   11.367  17.990   0.002 :**
11  94Z251         Y  1.57   10.547   10.550  17.210  -0.003 :***
12  95Z301         Y  1.32   10.527   10.521  17.160   0.006 :*******
13  99Z367            1.15   10.618   10.606  17.230   0.012 :---------->
14  96Z737         Y  1.81   10.982   10.989  17.670  -0.007 :*********

Standard deviation of the residuals:
Fitted stars:  0.005       (13 points).
All stars:     0.006       (14 points).

Figure 16: Example output from catphotomfit

Figure 16 shows the output displayed by catphotomfit. The transformation coefficients are self-explanatory. The minimum residual vector length is a measure of the goodness of the fit. The table of residuals is also mostly self-explanatory. The column of star names will be absent if parameter NAME was specified as ‘NONE’. A ‘Y’ in the ‘Fit’ column indicates that the star was included in the fit. The residuals are defined in the sense:

 ${m}_{catalogue}-{m}_{calculated}$ (19)

The transformation coefficients are shown to six places of decimals and the calculated magnitudes and residuals to three places of decimals. These formats do not imply that the results are this accurate; the actual accuracy will depend on the data used. It is noteworthy, however, that in the example data the largest residual is only slightly larger than 0.01 magnitude, despite the method ignoring colour corrections.

The bar to the right of the residuals is a simple graphic representation of the absolute size of the residual; the length of the bar is scaled according to the absolute size of the residual for the star. The scaling is such that the largest absolute residual amongst the stars included in the fit is ten asterisks long. Stars which are included in the fit are shown as a row of asterisks (‘*’). Stars which are excluded from the fit are shown as a row of dashes (‘-’). Because excluded stars will often have larger residuals than the included stars, for excluded stars with residuals larger than the largest included residual a right chevron (‘>’) is shown beyond the last dash (thus forming an arrow).

(4)
The first fit will usually reveal some unsatisfactorily large residuals which you will want to exclude from the fit. (Aberrant results for individual stars can be caused by various effects, including passing clouds.) Edit the table of standard stars and toggle the ‘include in the fit’ flag for the star to be excluded to ‘F’ (or ‘FALSE’). Then re-run catphotomfit. Repeat this process until you get a satisfactory fit. Note that as you exclude new stars you may well wish to experiment with re-instating ones excluded previously.

In the example data no additional stars really need excluding. However, you might like to experiment with re-instating the penultimate star, 99Z367 (edit the table of standards and toggle the ‘include in the fit’ flag for 99Z367 to ‘T’, or ‘TRUE’).

(5)
The final stage is to use the file of transformation coefficients written by your final, satisfactory, run of catphotomfit to calibrate the instrumental magnitudes for the programme objects. If your table of programme objects contains air masses (the example contains both air masses and zenith distances) then simply type:
%  catphotomtrn

Conversely, if the catalogue of standard stars contains observed zenith distances then type:

%  catphotomtrn  zenithdist=true

In both cases catphotomtrn will prompt you for various items. When prompted for the name of the output catalogue it is probably best to give a name ending in the file type ‘.TXT’ or ‘.txt’ so that the table is written in the STL format. If you have used the same column names as the example in Figure 15 the you will be able to hit return in response to the prompts.

A new table containing the calibrated magnitudes in the standard system, as well as all the columns in the original table of programme objects, will be written. If you specified the STL format for this table it will be a simple text file and you will be able to examine it with a text editor or Unix commands such as more or cat. It can also be examined with the CURSA catalogue browser xcatview (see Section 13 for an example using xcatview), though this is probably overkill for a small table of programme objects. Figure 17 shows an output catalogue written in the STL format by catphotomtrn. In this catalogue the calibrated magnitudes are column MCAT. Column MCAT, and the other columns, are defined in the lines beginning with a ‘C’ or ‘:’ in the upper half of the figure. The values for MCAT are the rightmost column in the table beneath the ‘BEGINTABLE’ line.

!+
!  Catalogue: photocalib
!
!  This catalogue is formatted as a CURSA small text list (STL).
!  For a description of this format see Starlink User Note 190 or URL
!  http://www.roe.ac.uk/acdwww/cursa/home.html.
!-

C  MINST    DOUBLE    1     EXFMT=F7.3
C  AIRMASS  DOUBLE    2     EXFMT=F7.3
C  ZENDIST  DOUBLE    3     EXFMT=D19.10
C  MCAT     REAL      4     EXFMT=F7.3
:    UNITS=’Magnitudes’

T
T Column MCAT was calculated using the following coefficients:
T    Arbitrary constant:        30.0000
T    Zero point:                23.4743
T    Atmospheric extinction:     0.0856
T

BEGINTABLE
17.380    1.000     0.2996148549D-01   10.769
17.030    1.240     0.6300638600D+00   10.398
17.490    1.110     0.4500040588D+00   10.869
17.870    1.040     0.2699442576D+00   11.255
17.420    1.050     0.3199770295D+00   10.804
17.260    1.910     0.1020144948D+01   10.571

Figure 17: Example catalogue of calibrated magnitudes written by catphotomtrn

15In this recipe, and more generally in CURSA, the terms ‘catalogue’ and ‘table’ are usually used interchangeably.