CCD Astrometry and Photometry


Updated 2017 April 18




1.0       Introduction


This much revised version substitutes comphot, written by Nick James and developed for Windows by Peter Carson’s son, Alex. A description of the method can be found in the Comet Section’s newsletter here and a ‘How to’ by Nick James here.


Please note that different comets may be referred to in the various sections of this document.


There aren’t too many very bright comets (unfortunately) so you might consider, as Nick James suggests, putting away the computer and going outside with a pair of binoculars and making a visual estimate of the total magnitude and coma diameter!!!

A couple of points worth noting;

- ensure comet is not saturated

- an SNR of 10 or greater is desirable


This process is much simplified from the previous version and allows observers to extract a significant amount of useful data from CCD images. Checklists may help you through the procedure and to record the necessary data for input to the Comet Observation Database (COBS). Here are blanks for SSON’s Gemini and Warrumbungle robotic telescopes which you can use/modify to record your own data.


The Astrometrica website is here from where the application can be downloaded.


Version 1.2.3 of comphot can be obtained from


The objectives are  to;

- measure the position and magnitude, m2, of the comet using Astrometrica

- to measure tail length and position angle using Astrometrica

- to obtain a visual equivalent magnitude, total magnitude or m1, using comphot

- measure the coma diameter using comphot

- to report the relevant measurements to the; BAA Comet Section, COBS database, Minor Planet Center and The Astronomer


Generating visually equivalent magnitudes and comae diameters from CCD images will enable;

- CCD observations to be integrated with visual observations

- lightcurves for a greater part of a comet’s orbit to be produced – Figure 1

Figure 1. Light curve of comet C/2012 X1 (LINEAR) from the COBS database


Images must have been obtained using a clear or no filter and calibrated (application of dark frames, bias frames and flat fields).


Processing of red or narrow band filtered CCD images, the CARA process, is covered in a separate tutorial as is processing of images using FoCAs


The images used in this tutorial; and, can be found at Images. The images are of comet C/2012 X1 obtained with SSON’s Warrumbungle telescope. If you process it as described here then you can be satisfied that your results are correct (or that we have both made the same mistakes !!!)


The procedures described here are applicable to both known and newly discovered comets. If you are the one making the discovery then accurate astrometry and photometry, obtaining confirmation of your discovery and reporting it in a timely manner is vitally important but all of that is covered in the Comet Section handbook.


The flowchart, Figure 2, shows the overall process. Please note that it is necessary to run Astrometrica before running Comphot.


There are alternatives to the software mentioned in the flowchart but I do recommend starting with the Astrometrica/comphot combination. COBS has become THE repository for comet observations and all BAA observations have been uploaded to that database along with those from other organisations of amateur astronomers.


Figure 2. Process Flow


2.0       MPC Observatory Code


You will need an MPC Observatory Code prior to reporting CCD astrometry and photometry to the Minor Planet Center. It is not actually required to report the same to the BAA or ICQ however obtaining one would give others greater confidence in your reports. How to do this is described here and in detail in the MPC’s ‘Guide to Minor Body Astrometry’ in particular paragraphs 15 and 16. It is also covered in my book ‘Asteroids and Dwarf Planets and How to Observe Them’, Chapter 10.


3.0       Astrometry and Photometry


This procedure describes how to process the images using Astrometrica so that they can be further processed using Comphot


3.1       Astrometrica


The Astrometrica homepage is at There are links on this page to Downloads and Registration which costs Euro 25 (very well worth the price). Tutorials are included in the downloaded software under Help.


It is advisable to keep your comet (and asteroid) files up to date.

- to download the latest comet elements, start up Astrometrica and go to Internet/Update MPCorb and select Comets

- to download the latest asteroid elements start up Astrometrica and go to Internet/Download MPCorb


3.1.1    Catalogues


UCAC-4 is the preferred catalogue recommended by the MPC


3.1.2    Configuration


The screen shots below, Figures 3 to 8 are my settings for using SSON’s Warrumbungle telescope and UCAC-4 catalogue. The configuration file can be found here. This can be saved in your Astrometrica folder and then modified to reflect your own situation.


Note that reports sent to the MPC should have magnitudes expressed to one decimal place only so do not check ‘Magnitude to 0.01’ in the MPC Report section under the Program tab in Program Settings


Figure 3. Observing site tab


If changing the observing location in Astrometrica then make change and reload Astrometrica or the MPC observatory code in FoCAs reports will be incorrect


Figure 4. CCD tab


Under the CCD tab you select the time indicated in the FITS header – normally the start of the exposure. Astrometrica will calculate the midpoint of the exposure using that and the exposure time also in the FITS header, partial example below, as it is the midpoint which is inserted in the MPC report.


SIMPLE  =                    T

BITPIX  =                   16 /8 unsigned int, 16 & 32 int, -32 & -64 real

NAXIS   =                    2 /number of axes

NAXIS1  =                 1536 /fastest changing axis

NAXIS2  =                 1024 /next to fastest changing axis

BSCALE  =   1.0000000000000000 /physical = BZERO + BSCALE*array_value

BZERO   =   32768.000000000000 /physical = BZERO + BSCALE*array_value

DATE-OBS= '2017-02-20T14:56:12' / [ISO 8601] UTC date/time of exposure start

EXPTIME =   9.00000000000E+001 / [sec] Duration of exposure


I do recommend (on advice from Nick James) that you check the time inserted in the FITS headers of your images. To do this;

-          Take a long exposure say 30 secs plus

-          Note the start time and end times using an accurate source (Dimension 4 for example)

-          Check that the time in the header is the start time


It makes life easier if you can obtain your images north up and east left. In that way you avoid having to reorientate the image or having to put in the rather unusual Position Angle, which tells Astrometrica how the images are oriented, as shown in Figure N. Also you are less likely to get the coordinates of the comet wrong.


Note that the Aperture Radius (in pixels) should be set equal to an actual radius of 5.5 arcsecs. For the Warrumbungle telescope the pixel size is 1.1 arc secs (2x2 binning) and therefore the Aperture Radius should be set to 5 pixels. The aperture circle does not need to encompass all of the head of comet.




Figure 5. Program tab


Under Program/Reference Star Matching and Image Alignment select a large number of stars to avoid incorrect alignment e.g. at least 50. A clue that all is not well is if the images jump around the screen when blinking them.


Figure 6. Environment tab


Figure 7. Catalogs tab


Note that some catalogues are available on-line while others have to be stored on your PC.


Figure 8. Internet tab


MPC reports must include the magnitude (to one decimal place only) as measured by Astrometrica which is the nuclear or m2 magnitude. Do not report magnitudes as generated by Comphot which is the total, visual equivalent or m1 magnitude. You may get a message indicating that no ref star records have been read. Changing to another Vizier server may resolve this problem.


3.1.3    Image processing


Figure 9 shows how the two stacks of images necessary to run Comphot are generated. If a single images is to be used then it can be processed as will be explained later. Please note that the comment in the flowchart concerning flipping and flopping is also pertinent to a single image.


Figure 9. Astrometrica process


3.1.4    Selecting and stacking images on comet motion


Figure 10. Select Images window


-          open Astrometrica

-          select the Track and Stack option 

-          click on Add in the Select Images window – Figure 10

-          choose the required images in the Open window

-          optional - click on the Preview button to view the images and delete any unacceptable ones

-          add each image by clicking on OK

-          in the Coordinate, Tracking and Stacking window click on the button to the right of the Object box

-          in the Object Browser window, Figure 11, enter the comet name in the Filters box and click on the magnifying glass symbol

-          select the correct comet from the list (only one in this case)

-          click on OK – Figure 12

-          the Coordinates, Tracking and Stacking window is then populated with the data relevant to the comet – Figure 13

-          select Average from the Stacking options

-          click on OK


Figure 11. Object Browser window


Figure 12. Object Browser window listing comet(s) which meet the filter criteria


Figure 13. Coordinates, Tracking and Stacking window populated with comet data


The images are stacked as shown in Figure 14.


Figure 14. Images stacked on comet motion


To measure the comet’s position and nuclear magnitude place the cross hairs over the head of the comet and left-click the mouse. This brings up the Object Verification window – Figure 15. If need be the Centroid facility can be used to position the cross hairs over the centre of the comet. Click on OK if done so -  Figure 16.


Figure 15. Object Verification window


Figure 16. Centroid window


To ensure you have selected the correct object click on the button to the right of the Object Designation box. Objects near the designated position will be listed in the Object Identification window – Figure 17. If the comet in question shows a position error (dRA and dDe) of more than a few arcsecs you may have selected the wrong object during astrometric reduction. Easy done with a faint star-like comet but not so in this case!!!


Beware the cold pixel – see Appendix A


Figure 17. Object Identification window listing moving objects close to the selected position.


Click on OK and the comet’s name and packed designation will be inserted in the Object Verification window. Click Accept to log the data in the

MPC Report and Photometry Files as shown below. Please note that MPC reports should contain a minimum of three observation or they will be rejected



OBS R.Dymock

MEA R.Dymock

TEL 0.51-m f/6.8 reflector + CCD

ACK MPCReport file updated 2017.03.16 11:48:09



    CK12X010 KC2014 08 21.55634 22 00 13.79 -49 35 11.9          14.2 N      Q65

----- end -----


3.1.5    Submitting reports to the Minor Planet Center


If you do not wish to submit a report to the MPC then go to step 3.1.6.


To display the MPC report select Internet/Send MPC/Report – Figure 18. Click Send to forward the report to the MPC.



Figure 18. Example MPC report for comet 41P showing minimum number of observations required


3.1.6 Selecting and stacking images with zero motion


The purpose of this step is to obtain a correct magnitude zero point for Comphot to work with.


-          open Astrometrica

-          select the Track and Stack option 

-          click on Add in the Select Images window – Figure 10

-          choose the required images in the Open window

-          optional - click on the Preview button to view the images and delete any unacceptable ones

-          add each image by clicking on OK

-          in the Coordinate, Tracking and Stacking window input zero Speed and P.A.

-          select Average from the Stacking options

-          click on OK

-          save and close stacked image

-          reopen stacked image

-          carry out an Astrometric Data Reduction

-          save and close stacked image


If you have checked either the Flip Horizontal or Flip Vertical boxes under the Program Settings\CCD tab you will need to uncheck them to obtain the correct coordinates for your image

-          open the configuration file

-          ensure Flip Horizontal and Flip Vertical boxes are unchecked

-          save the configuration file

-          reopen image, Figure 19, and ascertain comet coordinates – 758 490 in this case


Figure 19. Image used to ascertain comet coordinates


3.2       Comphot


3.2 1    Running comphot


These notes relate to comphot version 1.2.3


To run Comphot;

-          Shift/Right click on the folder containing the images to be processed

-          select Open command window here

-          change directories to that where comphot is located e.g. cd c:\Program Files (x86)\comphot\comphot – Figure 20

-          run comphot e.g. comphot comet_stack.fits star_stack.fits 758 490>data


You may see the comet stack referred to as the offset or ofs file. Similarly the star stack as no offset or noofs.


Figure 20. Command line window



-          comet_stack.fits is the stack of images stacked on the comet’s motion

-          star-stack.fits is the stack of images stacked on zero motion

-          758 490 are the coordinates of the comet as measured in Astrometrica (not flipped or flopped)

-          data is the name of the output file (if this is not included then the output appears in the command line window)


Other options which can be included are;

-r [--apmax] arg          radius of photometric aperture in arcsecs

-f [--flatimage] arg      flat normalization field in fits format

-h [help]                       usage info


Version 1.2.3 adds a further option;

-b [--border]    ignore border pixels (default 5)



3.2.2 Comphot output


Data file


# Comphot version 1.2.3

Date: 2014-08-21T13:21:08, Exposure: 180.0 s

Telescope: , Camera: SBIG STL-6303 3 CCD Camera


Object: linear

Scale: 1.09 "/pix, FoV 27.8x18.5 arcmin, PA: 11.5 deg, ZP: 26.17 mag

Sky background before normalization (non-offset): 476.6  (19.66 mag/sqarcsec)

# Sky background before normalization (offset): 476.9  (19.66 mag/sqarcsec)

# Sky background: 476.6 (non-offset) 476.9 (offset)

# Residual sky background in offset stack: 0.0. RMS sky from fixed 10.3

# Centroid at 760 492, Max pixel is 1076.0

# Annulus inner radius 165.0 arcsec, ringlevel 8.2

# Annulus inner radius 214.5 arcsec, ringlevel 3.4

# Total pixels requested but outside frame: 0

#   5.6 |     89   82910 | 931.6 707.3    89  82910  62947  82910 | 13.88 13.88

#  11.3 |    341  190823 | 428.2 352.6   252 107914  88855 172410 | 12.97 13.08

#  16.9 |    761  290290 | 236.8 212.1   420  99467  89084 262140 | 12.52 12.63

#  22.6 |   1353  386384 | 162.3 154.9   592  96094  91695 353877 | 12.21 12.30

#  28.2 |   2101  477535 | 121.9 120.3   748  91151  90021 445522 | 11.98 12.05

#  33.8 |   3045  576003 | 104.3  97.8   944  98467  92368 536590 | 11.77 11.85

#  39.5 |   4149  685680 |  99.3  81.3  1104 109678  89707 625966 | 11.58 11.68

#  45.1 |   5417  774821 |  70.3  67.8  1268  89141  86022 712067 | 11.45 11.54

#  50.8 |   6861  857229 |  57.1  56.7  1444  82409  81819 793567 | 11.34 11.42

#  56.4 |   8461  936632 |  49.6  49.4  1600  79404  78983 872925 | 11.24 11.32

#  62.0 |  10245 1014490 |  43.6  43.1  1784  77858  76861 949476 | 11.16 11.23

#  67.7 |  12193 1097393 |  42.6  39.0  1948  82903  75972 1025372 | 11.07 11.15

#  73.3 |  14305 1171327 |  35.0  32.8  2112  73935  69219 1094697 | 11.00 11.07

#  79.0 |  16581 1243711 |  31.8  30.8  2276  72381  70211 1165169 | 10.94 11.01

#  84.6 |  19033 1312630 |  28.1  27.7  2452  68916  67882 1233098 | 10.88 10.95

#  90.2 |  21677 1380613 |  25.7  25.5  2644  67984  67312 1299873 | 10.82 10.89

#  95.9 |  24449 1442385 |  22.3  22.0  2772  61772  60856 1361171 | 10.77 10.84

# 101.5 |  27429 1502158 |  20.1  19.2  2980  59774  57320 1418132 | 10.73 10.79

# 107.2 |  30549 1569489 |  21.6  17.3  3120  67332  54118 1472434 | 10.68 10.75

# 112.8 |  33833 1632673 |  19.2  15.7  3284  63181  51418 1524099 | 10.64 10.72

# 118.4 |  37285 1685527 |  15.3  14.3  3452  52856  49429 1573772 | 10.61 10.68

# 124.1 |  40969 1735039 |  13.4  12.8  3684  49512  47115 1620301 | 10.57 10.65

# 129.7 |  44749 1785226 |  13.3  11.8  3780  50184  44466 1665090 | 10.54 10.62

# 135.4 |  48745 1838812 |  13.4  11.6  3996  53587  46159 1711026 | 10.51 10.59

# 141.0 |  52881 1887111 |  11.7   9.6  4136  48298  39775 1750896 | 10.48 10.56

# 146.6 |  57157 1927933 |   9.5   8.6  4276  40823  36602 1787833 | 10.46 10.54

# 152.3 |  61701 1963129 |   7.7   7.0  4544  35198  31782 1819198 | 10.44 10.52

# 157.9 |  66333 1993712 |   6.6   6.2  4632  30583  28749 1848080 | 10.42 10.51

# 163.6 |  71169 2022926 |   6.0   5.2  4836  29214  25375 1873385 | 10.41 10.49

 10x10  20x20  30x30  40x40  50x50  60x60

 13.88  12.97  12.52  12.21  11.98  11.77 # Counts

 13.88  13.08  12.63  12.30  12.05  11.85 # Median annuli

Total integrated magnitude: 10.49 (radius 169.2 arcsec)

ICQ:  2014  8 21.56    10.5    5.6

COMPHOT: 1.2.3 2014 08 21.556  10.49   5.64  19.66  26.17  10.31   476.9   1.09  linear comet_stack.fits


The right hand column lists the integrated magnitude for the aperture radius listed in the left most column. See also Figure 22.


The line beginning ICQ gives the date, magnitude and coma diameter (not radius as shown above this line) which form part of the COBS input.


Please send a copy of the output line beginning ### to the Comet Section Director – ndj ‘at’


Image (dump.jpg)



Figure 21. Image showing annuli used to measure the comet’s total magnitude


Curve of growth (profile.jpg)



Figure 22. Graph showing how the total magnitude increases with increasing radius


Sky background (skycheck.jpg)



Figure 23. Image showing variation in sky background (skycheck.jpg)


Figure 23 shows the variation in sky background. In the skycheck.jpg image red blocks show areas where the median is below the sky level and blue areas show areas where the median is above sky level. This could be the result of incorrect flat calibration. Such variations can be corrected using AIP4WIN or Iris (amongst others) and an example using AIP4Win is shown in Appendix B.

3.3       Tail measurement


The tail is quite obvious in the skycheck image above and slightly less so in the Astrometrica image – Figure 24


Figure 24. Comet C/2012 X1 (LINEAR) showing tail


There are a number of ways of measuring tail length and position angle but, since we have used Astrometrica in this tutorial we will use that to do so. My thanks to Pieter-Jan Dehelver for this tip)


Load an image and astrometrically calibrate it (depending on your imaging software the image may already be in that condition – if RA and Dec values are shown at the bottom of the screen as you move your mouse across the image). While keeping Shift pressed move the mouse from the head of the comet to the end of the tail and the length and position angle will be displayed below the image. These values can then be entered into the COBS database along with the other data for the comet.


Having completed the analysis of the image and entered the data in the checklist (for comet C/2012 X! (LINEAAR) – Figure 25 you can now proceed to the COBS database.


CCD Astrometry and Photometry Checklist - Warrumbungle

Job ID



Image IDs

Warrumbungle; MPC code - Q65, image size - 28 x 18 arc mins


















COBS input





Observer first name


UCAC-4 catalogue - ref MC


Observer last name


Astrometry and photometry


Date (UT)

2014 08 21.56

Stacking (optional)


Observation location

Warrumbungle, New South Wales, Australia

MPC report sent



Comet identification

C/2012 X1 (LINEAR)

Tail length


Magnitude method


Tail position angle


Magnitude (m1)







51.0 cms



Instrument type

Corrected Dall-Kirkham (Cassegrain)

Date (UT)




Magnitude (m1)


Image exposure (secs)

2 x 90

Coma diameter


Coma diameter (arcmins)




Comparison field



Photometric aperture

Circular 5.5 arc secs

Image for coma and tail measurement


Camera type


Image ID


CCD type

KAF 6303E


2014 08 21

Photometric software


Time (UT)

13 21 08

Image correction


Number of images



Pixel size

1.1 x 1.1 arc secs

COBS input



Tail length (arcsecs/mins)

5 arcmins


Position angle (degrees)


























Figure 25. Completed spreadsheet


4.0       COBS


4.1       Inputting data


The Comet Observation Database (COBS) is located at


The first step is to obtain a login username and password.


To enter observations;

Select the Observations tab and CCD observations below the tab and complete the form as directed. Screen shots of the input are shown below. While this might seem a little tedious, once the various ICQ codes have been negotiated and a set of observations for your telescope/CCD combination has been entered, adding further observations is much simpler. Please note that it is the visual equivalent or total magnitude calculated by comphot which must be input to COBS and not the nuclear magnitude as generated by Astrometrica.


ICQ codes can be found at and but please note that not all the codes used by COBS will be found here.


Input for comet C/2012 X1 is shown in Figures 26 to 329. For the Astrometrica/comphot combination select ‘Comphot (by Nick James)’ in the ‘Photometric Software’ box. If using Astrometrica alone and not comphot then select the appropriate level of Astrometrica – 4.10 is recommended.


Figure 26. COBS input


Figure 27 COBS input


Figure 28. COBS input


Figure 29. COBS input


Clicking on ‘Submit’ brings up the ‘Observations have been stored’ screen, Figure 30, giving you another opportunity to check your input. Different comet shown as I did not want to reinput the data when constructing this tutorial.


Figure 30. Confirmation of COBS input for comet C/2011 F1 (LINEAR)


4.2       Viewing and updating your data


You can view your observations, Figure 31, by selecting the ’My OBS’ tab and save them to your PC by clicking on save. If no comet is selected all observations are saved in a dat file. Wordpad can be used to view/edit this file rather than Notepad which does not properly format the lines of observations.


If a date is entered all observations from that date to the current date will be listed. I have found this useful for downloading observation son a monthly basis to submit to the BAA Comet Section Director.


Figure 31. Listing observations


If you notice a mistake in your input after it has been submitted corrections can be made. Go to My OBS and select the entry you wish to change by clicking on the pencil symbol on the right-hand side of the line – Figure 32.


Figure 32. Editing observations


This brings up the screen shown in Figure 33. Make the changes and click on Submit.


Figure 33. Observation selected for update


4.3       Analysis


Selecting the ‘Analysis’ tab allows a light curve, coma diameter and data (not shown) for a selected comet to be displayed – Figure 34. By selecting Visual observations and CCD observations using the Control key both types are displayed and identified with different markers. This illustrates how CCD and visual observations can be successfully merged and how the former ‘stretch’ the light curve beyond the visual range.

Figure 34. Light curve for comet C/2011 X1 (LINEAR)


5.0       Reporting results


This is covered in the various sections above but is summarised here.


Minor Planet Center


MPC reports - send to

Website is at


COBS database


Input to the website at


BAA Comet Section


MPC Reports - send to The Astronomer editor at 

ICQ reports – send to the Jonathan Shanklin,  BAA Comet Section – jds ‘at’

Comet Section website is at


Please send a copy of the Data File output line beginning ### (see paragraph 3.2.2) to the Comet Section Director – ndj ‘at’



Appendix A - Beware the cold pixel


A magnitude value which appears to be out of line with those measured on other images at around the same time may be due to a cold pixel. I had heard of hot ones but not these until Richard Miles offered an explanation. The Astrometrica screen shots – Figures 35 and 36, are of comet 17P/Holmes. A black dot is visible in the centre of the image immediately below but more obvious in the Object Verification window. Its value was 372 whereas the average for other background pixels was around 8200.



Figure 35. Astrometrica screen shot of comet 17P/Holmes


Figure 36. The cold pixel


If the cold pixel had fallen into the sky annulus Astrometrica would have ignored it (along with the other top and bottom 10% of the values) but in this case it was included in the measurement aperture. As a result the magnitude was measured to be 0.6 mags too faint as indicated in the results below. Don’t throw away magnitude measurements just because they are different but they should be thoroughly checked.


0017P         C2014 10 30.42855 05 09 55.24 +50 03 25.7          17.3 N      G68 (good image)

0017P         C2014 10 30.44201 05 09 54.74 +50 03 29.9          18.0 N      G68 (bad image)


So how do you overcome this problem ? Following Richard Miles’ instructions using Astroart;

- open Astroart and the problem image

- place the cursor over the comet, click the left mouse button and a cross will appear on the image – Figure 37


Figure 37. Astroart


- select Edit/Pixels and a table of pixel values around the selected area will be displayed – Figure 38 - with the rogue pixel highlighted.


Figure 38. Edit pixels window


-  type in a value similar to other nearby pixels, 8350 in this case, followed by enter and OK

- save as FITS with a new file name so as not to overwrite the original


The image was remeasured with Astrometrica with the following results;

0017P         C2014 10 30.44201 05 09 54.74 +50 03 29.9          17.3 N      G68 (modified bad image)

0017P         C2014 10 30.44201 05 09 54.74 +50 03 29.9          18.0 N      G68 (original bad image)


Appendix B – Removing sky gradient


An irregular sky background can cause errors in the measurement of the total magnitude of a comet. This example uses AIP4WIN to correct for this as follows. The correction was applied to both the images stacked on the comet and those stacked on the stars (zero motion).


-          open AIP4WIN

-          load image and select Edit/Sky Background Fixer

-          select Auto Spot in the Sky Background Fixer window (Figure 39)

-          remove any spot containing stars by clicking on that spot which will change to a black circle containing a cross

-          remove spots from the area around the comet including the coma and tail (see Figure 23)

-          click on Execute 

-          click on Close

-          save image as fits



Figure 39. AIP4WIN Sky Background Fixer


Comphot was then rerun and the result is shown in Figure 40.



Figure 40. Image showing variation in sky background (skycheck.jpg) after correction.


Although there is still some variation the improvement can be seen in Figure 41


Figure 41. Sky background after (left) and before (right) correction