AVSOMAT
Automated Variable Star Observing

CCD photometry of variable stars can be used for fainter stars, provides a documentation through the image file and allows for a degree of magnitude increase in precision.

Productivity of CCD photometry, using an amateur telescope and camera, is relatively low because of the time needed to obtain images, store and then check and reduce them. Usually, the reduction step involves: visual identification of the variable star and of reference stars on the image by comparing it with a chart (such as an aavso chart), measurement of the flux of the variable and reference stars and estimation of the variable star magnitude. Then a record of the observation is made, for example by entering it in the aavso web form.

AVSOMAT is a project to automate the identification and photometry of variable stars on CCD images. It consists of a Linux command, avsomat which takes as arguments the name of a fits image, and the name of an electronic chart (another file) for the star supposedly on the image. avsomat produces the aavso observation report as a single line of text. Optionally, it can produce a picture with the reference and the variable stars, as it thinks it detected them, just for checking.

The electronic chart is a file with descriptions of the variable star, the reference stars and guide stars which are used to identify the field. See below for available examples. The electronic chart is also called a "recipe" and for this reason it is a text file with the extention .rcp

Download. The following files are available:

  • avsomat-3240.tgz -- source code distribution of avsomat V3240 (100K). Internal links to observations now use the resulting magnitude and also the changes to aavso lightcurve requests have been accomodated
  • stardata-3036.tgz -- data about variable stars used in scheduling and reporting observations
  • rcp-22dec2003.tgz -- archive (800K compressed, 4M uncompressed) with .rcp files currently available, that is for the following variable stars:
    AB-AND AB-LEO AB-LYR AE-HER AG-DEL AH-HER AH-LYR AH-VUL AK-AND AL-AND AL-COM AM-HER AM-LYR AN-LYR AO-LYR AR-AND AS-HER AU-CYG AX-AND AY-LYR AZ-DEL AZ-HER BD-VUL BE-GEM BF-VUL BG-HER BI-AND BIO-RI2 BI-ORI BL-LAC BL-LYR BP-GEM BR-DEL BR-GEM BU-AND BU-VUL CE-LYR CF-HER CG-CYG CI-AQL CM-DEL CM-LYR CT-HER CV-LYR CY-AQL CY-LYR CZ-ORI DE-HER DF-HER DH-AQL DL-HER DN-HER DO-HER DO-VUL DQ-HER DS-HER DX-AND DX-AQL DY-HER EK-AQL EL-LYR EM-AQL EM-CYG EP-DEL ES-DEL EW-LYR EY-CYG FF-LYR FN-AND FO-AND FO-AQL FU-HER FY-VUL FZ-DEL GO-COM HI-AQL HN-CYG HR-DEL HR-LYR HZ-HER IP-VUL IY-CYG KT-CYG KX-AQL LL-LYR LS-AND LV-VUL LX-AND NP-HER NQ-VUL OO-AQL PR-HER PU-VUL PW-VUL QU-VUL QV-VUL QZ-AQL R-AND R-AQL R-COM R-DEL R-HER R-LAC R-LMI RR-AND RR-AQL RR-LEO RR-OPH RR-VIR RS-AQL RS-CYG RS-HER RS-LEO RS-LYR RS-OPH RT-AQL RT-HER RT-LYR RU-AND RU-AQL RU-DEL RU-HER RU-LEO RU-LYR RU-VUL RV-AND RV-AQL RV-HER R-VUL RV-VIR RW-AND RW-LEO RW-LMI RW-LYR RW-VUL RX-AND RX-DEL RX-LYR RX-OPH RY-AND RY-HER RZ-DEL RZ-HER RZ-LEO RZ-LYR RZ-VUL S-AQL S-DEL S-HER S-LEO S-LMI S-LYR S-OPH SS-CYG SS-DEL SS-HER SS-LYR SS-OPH ST-AND ST-LYR SU-HER SU-LAC SU-LYR SU-VIR SV-AND SV-AQL SV-HER SW-LYR SX-LYR SY-AQL SY-HER SZ-AND SZ-DEL SZ-HER SZ-LYR T-AND T-DEL T-HER T-LEO T-LYR T-OPH T-SER TT-DEL TT-LEO TU-AND TU-HER TU-LYR TV-AND TV-HER TV-LEO TV-LYR TW-HER TW-LYR TX-CVN TY-AND TY-LYR TY-VUL U-AND U-CVN U-LMI U-LYR UU-AQL UU-LYR UV-HER UV-LYR UW-LYR UZ-AND UZ-HER V1229-AQL V1493-AQL V1494-AQL V356-AQL V450-OPH V603-AQL V759-OPH V970-OPH V-AND V-DEL V-LYR VV-HER V-VIR VW-AQL VW-VUL VX-HER VY-AND VY-HER W-AND W-AQL W-COM W-DEL W-HER W-LYR W-OPH W-VUL WW-LEO WW-VUL WY-HER WZ-HER WZ-LYR X-AQL X-DEL XZ-DEL XZ-HER Y-AND Y-DEL YY-DEL YY-HER YZ-AND YZ-VUL Z-AND Z-AQL Z-DEL Z-LIB Z-LYR Z-VIR
    These are V1 recipes, containing stars downto magnitude 15 or so, with magnitudes in the P band (photographic) extracted from GSC-1 and references in the V band taken from aavso maps, entered by hand.
  • rcp2-30dec2003.tar.gz -- archive (10M compressed, 37M uncompressed) with V2 rcp's for the same stars. These new rcp's contain stars downto magnitude 18.5, with the J and F photographic magnitudes extracted from GSC-2, also the P-band and GSCID from GSC-1; those stars which are also found in Tycho have the tycho BT and VT magnitudes included; lists of reference stars with BT and VT magnitudes which are close enough to the target star are automatically generated. Also, a short identifier for the stars in the field around the variable are established in these recipes.
  • rcp2-30dec2003.tar.bz2 -- archive (8M compressed) same as above, but you have to download slightly less provided you have bzip2 on your system.
  • Example fits files, to try with avsomat and the relevant rcp's from above:

Installation and usage. avsomat works in Linux. Download the avsomat archive, untar it and make the executable:

tar xvzf avsomat-1.2-src.tgz
cd avsomat
make

Now, download the rcp files, make a subdirectory, say rcp and untar it there:

mkdir rcp
cd rcp
tar xvzf ../rcp-22dec2003.tgz
cd ..

Then download an example, say RZ-HER from above. Run:

gzip -d rzher.fits.gz

./avsomat -Przher.eps -NZZZ rzher.fits rcp/rzher.rcp

This should produce the aavso observation on your terminal, which you can then send, for example to observations@aavso.org, to report the variable star magnitude (the example observations above have already been reported to aavso).

You must have default.cxr in the current directory. This form of the command line uses Radu's libccd library, distributed with avsomat, to extract star positions from the image and perform photometry. You can also use sextractor a free program which you must download and install first. After that, run:

sex rzher.fits ; avsomat -Przher.eps -NZZZ -Ctest.cat rzher.fits rcp/rzher.rcp

The call to sex will create the list of objects in test.cat which is then used by avsomat.

Use the -N option to indicate your aavso observer code (in place of "ZZZ"). Use the -P option to obtain an image of how the variable, reference and guide stars were detected.

Picture, produced with the -P for checking the identification of the star for the example image (RZ Herculis, April 30 2003). The red dot is RZ-HER, blue dots are reference stars, black dots are other stars in the field, brown markings are guide stars in the recipe with their labels.

The calls above use reference stars extracted from AAVSO chart sequences. Since version 1.1 you can use reference stars from the Tycho-2 catalog (VT references), which are available in the new recipes. Use the -t option and a new recipe to use Tycho references and the -tj option to use Tycho references corrected for the Johnson V filter.

Since avsomat V1.2 it is possible to generate a web page to contain the results and method of reducing a star. This is best accomplished using the new `avswork.lisp' binding, which is a CommonLisp library with functions for integrating avsomat and html and bitmap image generation. You need to be a bit familiar with CommonLisp though. To install edit the lisp file and adjust the directories at the beginning of the file. Then run CMU Commonlisp, for example by starting emacs and giving the command

M-x cmulisp

Then load the binding with:

(load "src/avswork.lisp")

Then you can say, for example:

(run-avsomat "ssdel-v-001.fits.gz" 2911 1 'cua)

to run avsomat on the SS-Del image and then:

(do-obstar-obs 2911 'ss-del 1 'cua)

to assemble the results into a webpage. The webpage will be generated in *report-dir*/2911/SS-DEL/1.html, where *report-dir* is the value you established for this variable. The corresponding URL is included as a comment in the AAVSO observation report.

Examples of such observation results can be found here. This framework is still alpha software. Use with care.

Since version 3051 you can reduce all images from a directory (e.g. a CD) with a single command, also generating the web report during the process. Call, for example:

(avsomat-dir "/cdrom" 9999)

where 9999 a number or symbol identifying the observing session.

Cross-indexing all observations of a star

With V3051 and later, use:

(do-all-varstar-dirs)

to generate a directory containing one subdirectory for each constellation with one sub-subdirectory for each variable star in the constellation having star info from the gcvs catalog and links to each observation web bulletin of that particular star on your site. An optional argument can be a list of variable stars to actually build pages for. Otherwise, pages are built for all stars known to avsomat.

New version naming scheme. After version 1.2 we started naming versions by the day when they are released. The day is identified using the last 4 digits of the julian date. This is, for example, 3036 for January 31, 2004. More digits will not be necessary for the next 19 years or so.

Observations scheduler. This is a component which appeared in avsomat-3036. To install it, you need to install first the stardata-3036.tgz archive in the data subdirectory of avsomat home. Then start cmulisp as above (with the lisp command in Linux) and type:

(load "src/gcxched.lisp")

to load the scheduler. Now you can obtain scripts for controlling GCX, the camera and the telescope by calling the function gcx-script. The function documentation is shown below. The default function value for WITH makes the gcx-controlled telescope to move to each star, take a control picture, correct position, then take two 10s pictures in sequence:

   (gcx-script EXPR [WITH])

   produces a GCX script to image the stars designated by EXPR,
   following an optimised path and going from west to east. Function
   WITH will be used to produce the script of each star designated
   by EXPR. It must return a string given a symbol.

   By variable stars, below, we understand the stars in the GCVS.lisp
   file, which was initially based on GCVS.

   EXPR may be a symbol, which could be:
     - a star name (example: RU-LYN)
     - a constellation TLA (three letter abbreviation)--variable stars
       in that constellation (example: LYN)
     - :IN-AAVSO stars having an aavso chart
     - :ERUPTIVE stars with an `eruptive' type of variability
     - :NEEDMORE stars `in need of more observations'

   If EXPR is a list, then it must have one of the following forms:

     (AND EXPR*)        - stars designated simultaneously by all the EXPR's
     (OR EXPR*)         - any of the stars designated by an expr
     (ANDNOT EXPR EXPR) - stars designated by the first EXPR without
                        - those designated by the second EXPR

   Examples:

   (GCX-SCRIPT 'RU-LYN) ; returns a script to image RU-LYN
   (GCX-SCRIPT 'LYN)    ; returns a script to image all variable stars known in LYN
   (GCX-SCRIPT 'LYN #'(lambda (star) (format nil \"~A~%\" star)))
                        ; returns a string with the variable stars in LYN
                        ; sorted aproximately from W to E and with optimisation
                        ; of the path between them
   (GCX-SCRIPT '(AND LYN :IN-AAVSO))
                        ; returns a script to image all stars in LYN having aavso charts
   (GCX-SCRIPT '(AND :ERUPTIVE LYN))
                        ; returns a script to image all eruptive stars in LYN
   (GCX-SCRIPT '(ANDNOT (AND :ERUPTIVE LYN) :IN-AAVSO))
                        ; returns a script to image all eruptive star not in aavso

Related work. There are two reasons to have a command line variable star reduction program which uses premade recipies to reduce images:

  1. to reduce all images of a star in the same way
  2. to reduce a large number of images quickly and easily
Of course, you only need to achieve the latter if you first collect large numbers of variable star ccd images. One way to do this is with the gcx software and the cpx3m camera (developed by Radu Corlan) and a supported telescope (such as Meade-LX200). The source code of gcx and the hardware blueprints of cpx3m are freely available here. With gcx+cpx3m you can use a premade script to automate the movement of the telescope, the verification and correction of the position on the sky (by recognising the star field) and obtaining the pictures. Depending on the exposure time, for variable star work, it can photograph 50-100 targets per hour.

Further work.

  • Other fits files. The current version of avsomat was only tested with images obtained with cpx3m and with a former variant of it. I don't know how it works with any other picture files. If you have one which doesn't work, please tell me.
  • More recipes (charts) If you want to join this effort you are very welcome.
  • Better quality of results The error of variable star measurements on succesive images obtained with the existing system was between 0.02 and 0.07. We plan to improve on these, as well as the acuracy, but don't hold your breath :)
  • A user interface to avswork so that you don't absolutely need to enter lisp forms.

[running on Linux] [made in CommonLisp, C and Ada95] [Copyright © 2003 A.D.Corlan]