Department of Physics and Astronomy

Go routines

This page provides some basic information on routines I have written for Go, and enhancements I have made to existing Go routines. All of the following are already integrated into Go - there is no need to compile extra code as long as you're running the latest (official) version of Go.


Reading FGM data

Go includes a routine to read 4s resolution FGM data (READ_CLUSTER_FGM), which is stored in /cluster/data/fgm/archive/. These data (stored in ASCII format) are processed in Leicester by combining the raw FGM data with either daily or default calibration files (see Ade's notes at /project/cluster/fgm.txt). However, the Cluster Active Archive (CAA) contains FGM data that has been reprocessed with improved calibrations. I have downloaded the spin-resolution CAA data and put it in /cluster/data/fgm/caa/ (in CDF format). I suggest these data are used in preference to the ASCII archive.

I have therefore updated READ_CLUSTER_FGM to read these data, and have called it READ_CAA_FGM. Either specify the filename, or to use the new archive specify the spacecraft and date in the following format:

READ_CAA_FGM, 'C1_20070127'

READ_CAA_FGM then fills the same data arrays as READ_CLUSTER_FGM did (in the cluster_data common block), and so it should be compatible with all of Jim's Cluster routines. As with READ_CLUSTER_FGM, it rebins the data to exactly 4s resolution; since the spacecraft spin is not exactly 4s, there is a small risk that you might lose or duplicate some data points. If you would rather avoid this, I would recommend you read the CDF files directly, either using IDL's native routines or my CDF reading routines.

Choosing colours for the Cluster spacecraft

I have modified some of Jim's Cluster routines for Go to allow the colours used for each of the four Cluster spacecraft to be specified. This is done via a keyword called "CLUSTCOLS"; setting this keyword will select the standard Cluster colour scheme (with blue rather than magenta for Cluster 4, as is often used to avoid confusion with Cluster 2 in red). So far, this option works in the following routines:

(I don't use many of Jim's plotting routines, but will make the same modifications to other routines on request.)

The keyword I used was originally "CLUSTER_COLS", but this clashes with a pre-existing keyword in PLOT_FGM called simply "/CLUSTER", so I'm afraid I have had to change "CLUSTER_COLS" to "CLUSTCOLS".

For example, to produce an orbit plot with the spacecraft in the colours outlined above, read in the orbit data and then use the following incantation:

Go > CLUSTER_ORBIT_PANEL,2006,1,27,19,0,no_hours=0.5, mark=0.5,input_param=[1.2,-11.0,0.5,-0.5],
tetrahedron=5, sc=3, /XZ, /CLUSTCOLS

This option will only work in its basic form if you are using the default Go colour table. If you are using a different colour table, or would like to use another colour scheme, then specify CLUSTCOLS as a four-element array, where each element is the colour number you would like to use for each spacecraft (as if each element corresponded to the COLOR keyword in PLOT). The following would obtain the same result as above:

Go > CLUSTER_ORBIT_PANEL,2006,1,27,19,0,no_hours=0.5, mark=0.5,input_param=[1.2,-11.0,0.5,-0.5],
tetrahedron=5, sc=3, /XZ, CLUSTCOLS=[0,250,100,5]

Note that this will plot Cluster 1 in black, even if the background colour is black (e.g. output to X windows). Avoid this problem by specifying CLUSTCOLS=[!P.COLOR,250,100,5] (or by using /CLUSTCOLS).

Duckworth-Lewis calculations

Go can now calculate Duckworth-Lewis targets. To get going, type:


Note that the Go version uses the published 2002 D/L table, whereas professional matches use a commercial "professional edition". Therefore there may be a slight variation between the results produced in Go and those used in the match.

Reference: Duckworth, F.C. and A.J. Lewis, A fair method of resetting the target in interrupted one-day cricket matches,  Journal of the Operational Research Society, 49, 220-227 (1998) [Also available via JSTOR]

UPDATED: 4th December 2008
Robert Fear
The views expressed in this document are those of the document owner.