In my report entitled The Spatial Distortion in the LRIS of September 12, 1994, I established that the LRIS is sufficiently stable as a function of time that coordinates in the instrument's focal plane can be converted to astrometric coordinates on the sky. This is done by applying a third order (i.e. 10 coefficient/axis) transformation from (X,Y) in pixels on the CCD into (X,Y) in arc-seconds in the sky. The definition of ``sufficiently stable'' is discussed at length in that report, but basically implies that for a set of objects in an LRIS image, the rms error in the differences between the predicted and actual position of each object does not exceed 0.27 arc-sec for the X component (along the dispersion) only.
The ultimate goal is of course to be able to take an image with LRIS, measure the positions of objects on that image, derive accurate coordinates, design a multi-slit mask, and obtain multi-slit spectroscopy, ideally all on the same night. With the combination of the existing multi-slit object assignment program AUTOSLIT and the program coordinates described here, that goal is now achievable.
I strongly suggest that if you have not already read The Spatial Distortion in the LRIS, you should do so before proceeding much further. In particular there are several important caveats to note. First, all the transformations were derived and verified for LRIS images taken without filters. Second, these transformations maintained their validity to the desired level of precision only over the central half of the detector, i.e. although the LRIS detector is 2048x2048 pixels, one should only use objects in the range 512 < X(CCD) < 1536 pixels for best results. Finally, I have demonstrated that the LRIS has been suitably stable such that the transformations determined in that report are valid only over the past 14 months. I cannot guarantee that this will be the case in the indefinite future.
The coefficients for the necessary transformations were derived in that report, and the specific ones used here are from page 31 of that document.
The program coordinates allows you to take a list of positions of objects on an LRIS image (i.e. (X,Y) on the CCD) and convert them to astrometric positions. The following steps occur:
coordinates uses a set of character parsing routines written by Drew Phillips of Lick Observatory as well as several routines from the SLALIB library written by Pat Wallace.
I suggest that before your run, you get coordinates running at your home institution, and try it out.
In July 1996, a new Dewar was introduced into service with LRIS. Although this Dewar contains a CCD detector with identical pixel size to the original detector, it has a slightly different field flattener design. This slight difference is enough to affect the scale of the image in the focal plane, which is altered by about 1.05% such that images of objects are now slightly larger in the CCD. Note that a 1% scale change is equivalent to 20 pixels over the full range of the detector, a very large change from the point of view of an astrometric solution for the detector field.
A second set of coefficients, based on measurement if 311 stars in a frame of M71 taken in Sep 1996, has been introduced into the program coordinates (specifically into the subroutine transform). The code now assumes that frames taken prior to July 1996 were taken with the original LRIS Dewar, and those coefficients are used. Frames taken later than that date are assumed to be taken with the new LRIS Dewar, and the new coefficients are used. The user is queried to verify that this assumption regarding which Dewar was used to obtain the image is correct.
The necessary data for coordinates consists of the list of (X,Y) pixels on the CCD for the objects. These values must be obtained using your favorite image analysis software on the LRIS image before you try to use coordinates. In addition the magnitudes of the objects, their priorities for multi-slit observation, and their names are desirable, although not mandatory.
We also need a set of parameters that describe the observation, such as the rotator position angle, the center field pointing RA and DEC, the epoch of that position, the elevation, etc. All of these parameters are contained in the header of the LRIS image file. Instead of requiring you to find them all and put them in a file, you are only asked to supply the name of the image. The program will decide if the image is in Fits or Figaro format, and will read out the appropriate information. The equinox of the calculated object coordinates is the date contained in the header of the LRIS image, which is read from the image header.
If you have a number of stars with known high precision coordinates in the image, you can use them to determine the zero points in RA and DEC of the coordinates of the objects. (Do not try to use the HST Guide Star Catalog blindly. The errors on those coordinates are sometimes larger than can be tolerated here.) These are called reference stars, and for them you need their (X,Y) positions in the LRIS image, their true coordinates, and the epoch of those coordinates. In many LRIS images, there will be no stars with accurately known coordinates.
A typical input file is given below. The first line contains the name of the LRIS image. That is followed by the reference object data, one reference object per line, if there are any reference objects. Then comes the data for the objects. Note that (X,Y) CCD are floating point numbers. If you wish to omit an entry, the magnitude for example, type "" instead of a number. If an entry is omitted, the default values will be used. They are 2000.0 for epoch, 20.0 for magnitude, and 999 for priority (an integer).
The lines in the input file are parsed, and hence the entries do not have a fixed location or format, but must be in the correct order on the line. Object names are up to 10 characters long.
I am very greatful to Drew Phillips of Lick Observatory, who wrote the original version of this section of the code. Any errors in it are undoubtedly due to the hacking I've done on what he gave me.
The default value for the maximum number of objects is set at 1000. If you have more than that in your input list, edit the source code, changing the parameter max_obj, the maximum number of objects, to some suitable value, and then recompile the program.
/scr/jcohen/junkfig.dst \REFERENCE 300. 300. 00:00:01 -00:18:56 1950. 1200.0 1750.0 23:23:59 +00:18:56 1950. \OBJECTS 600. 120. 21. 10 obj1 500. 250. 19. 22 obj2 1500. 1800. 18. "" obj3 1000. 375. "" 46 obj4 690. 1505. 18. "" objk \END
If there are no stars with known accurate coordinates in the LRIS image, then there is only one way to determine the zero point, namely to adopt the RA, Dec, and epoch of the center of the field given in the image header. In this case one hopes that the telescope pointing is correct relative to the Ephermis or some other known astrometric frame. If the only purpose of the coordinates of the set of objects is to make multi-slits, this should be accurate enough.
If there are one or more reference stars, then they can be used to determine the zero point of the coordinates. The solution for the reference stars is printed out, with the individual values of calculated position versus true coordinates in RA and DEC for each reference star. If there are 2 or more reference stars, the mean and sigma for RA and DEC zero point offsets are also printed out. If you like that solution, you can specify that it be used. You can choose instead to retreat to the centerfield telescope pointing. If it looks like there is one discrepant reference star, and you have at least 4 reference stars, you can eliminate one of the reference stars and redo the fit. (You can not eliminate more than one reference star.)
The only possible problem here is that the rotator position angle given in the image header may not be exactly correct because of small initializing errors in the Keck instrument rotator. Errors under 2 arc-min in rotation over 2048 pixels can be ignored. Larger errors will lead to a noticable rotation between the reference star astrometric coordinates and the (X,Y) of the reference stars.
There are two output files. The first, coordinates.list, is a listing of the final coordinates for all the objects in a format suitable for use as a input file into the LRIS slit-mask assignment program Autoslit. The second is arcsec.list, and gives offsets in arc-sec in RA and Dec with respect to the center of the field before any atmospheric refraction corrections are applied. The beginning of a coordinates.list output file is given below. The centerfield position is the average of the RA and Dec for all the objects. The equinox is the date of the LRIS image.
CENTER 9999 0.00 19 51 31.3932 18 38 27.2056 1950.0 1994.6 0.0 0.0 1-51 0 14.36 19 51 37.0288 18 40 37.7767 1950.0 1994.6 0.0 0.0 1-53 0 12.97 19 51 36.4812 18 41 14.3421 1950.0 1994.6 0.0 0.0 1-52 0 14.33 19 51 36.7376 18 41 16.8357 1950.0 1994.6 0.0 0.0 1-54 0 14.49 19 51 34.3595 18 40 51.5682 1950.0 1994.6 0.0 0.0 1-55 0 14.26 19 51 34.6670 18 40 39.3662 1950.0 1994.6 0.0 0.0
Here is the beginning of the corresponding arcsec.list output file:
Reference stars: delta(RA), delta(Dec) (arc-sec) from the center of the field. No atmospheric refraction correction applied. 1 -111.14 -101.84 2 43.50 -44.31 3 18.08 66.22 4 62.73 159.06 5 -63.36 171.37 Objects now: 1 67.10 120.00 1-51 2 58.89 156.56 1-53 3 62.73 159.06 1-52 4 27.06 133.79 1-54 5 31.68 121.59 1-55
To verify that the program coordinates functions correctly, I used one of the globular cluster images taken for the analysis of spatial distortion in the LRIS, lris0335, an image of M71. Kyle Cudworth of Yerkes Observatory provided a list of accurate coordinates for more than 100 stars in this globular cluster, these stars were identified on the LRIS frame, and their (X,Y) CCD locations were measured. I use this set, including only objects with 512 < X < 1036 pixels, i.e. those in the central half of the detector, as input into coordinates. I then solved for the true coordinates on the sky, and hoped to recover the original astrometric coordinates from Cudworth. I used the header information in image lris0335, and looked at the output file arcsec.list, which is the list of offsets North and East of the center of the field in arc-sec for each chosen object. Although arcsec.list is written before the atmospheric refraction corrections are applied, I have checked that for that particular image, the differential atmospheric refraction correction across the image does not exceed 0.06 arc-sec, even when comparing opposite extremes of the field.
I compared the position computed through program coordinates with the astrometric positions for each object given by Kyle Cudworth.
Here are the results for 62 stars in M71.
Arc-sec E(coord) = 2.563 + 0.99947021*(Arc-sec E, Cudworth) -0.01247863*(Arc-sec N, Cudworth) Arc-sec N(coord) = 9.624 + 0.01305634*(Arc-sec E,Cudworth) +1.00093325*(Arc-sec N, Cudworth)
Notice that there is a constant offset, which is only to be expected, as Cudworth's origin is the center of the cluster, and mine is the center of the LRIS image, which was centered on the cluster, but there could have been a telescope pointing error.
Then there is a small rotation of about 0.7 degrees. It is not clear whether this is an error in the zero point of the LRIS instrument rotator or whether this is a problem in Cudworth's plate orientation.
This rotation is clearly illustrated in the appended figure, which shows for each object the difference between Cudworth's position and mine. Note in the figure that there are 62 stars, one of which appears to have been mis-identified on lris0335. (The figure is in file m71_figure.ps, in Postscript form.)
Once this rotation is removed, the agreement is extrmeley good. The mean circular residual using this transformation is 0.06 arc-sec.
I therefore believe that the program coordinates is working correctly, at least up to the point where the file arcsec.list is written.
(relevant files: m71_plot m71_anal_input coords_plot.f m71_figure.ps)
Below, with the listing of the input objects cut off after the first 5 objects, is the screen output of the run of coordinates on the M71 data, adopting the zero point of the center of the field.
(10)% coordinates What is the name of the input file with objects etc. ? m71_coord.input In section to read Figaro files centerfield ra in radians (ra0) 5.1990667700981 centerfield dec in radians (dec0) 0.32545057599202 hour angle in radians 0.27554967342278 There are 5 reference stars. Their x, y, ra, dec, and epoch values are: (RA and DEC are in radians now.) ref: 1589.0 548.7 5.1985 0.3249 1950.0 ref: 864.7 815.7 5.1993 0.3252 1950.0 ref: 979.4 1333.1 5.1989 0.3257 1950.0 ref: 766.2 1767.6 5.1994 0.3262 1950.0 ref: 1356.1 1831.9 5.1988 0.3262 1950.0 There are 66 object stars. Their x, y, ra, mag, priority, and id values are: obj: 748.0 1583.5 14.36 100 1-51 obj: 784.3 1755.9 12.97 100 1-53 obj: 766.2 1767.6 14.33 100 1-52 obj: 934.4 1649.8 14.49 100 1-54 obj: 913.4 1592.3 14.26 100 1-55 The equinox of the object data is 1994.61 Input data corrected for 42.0000 pre-image pixels Input data corrected for 0. pre-image lines Coordinates transformed from pixels to arc-sec. Rotation correction applied, position angle = 0.400780 Arc sec N and E of center offsets in file arcsec.list Refraction corrections applied. For reference stars: Maximum and minimum refraction correction in arc-sec compared to the center field for RA 9.9244155773347D-03 -2.0246358374219D-02 Maximum and minimum refraction correction in arc-sec compared to the center field for DEC 2.8998101009282D-02 -1.9800570791932D-02 Maximum and minimum refraction correction in arc-sec compared to the center field for RA for objects 1.8070699771342D-02 -2.2949630084096D-02 Maximum and minimum refraction correction in arc-sec compared to the center field for DEC for objects 2.9675963436740D-02 -3.0289329050972D-02 Results of reference star offsets in arc-sec 1 Delta RA: -0.12960242E+02 Delta DEC: 0.85307662E+01 2 Delta RA: -0.13680028E+02 Delta DEC: 0.10576328E+02 3 Delta RA: 0.44683312E+02 Delta DEC: 0.13924253E+02 4 Delta RA: -0.16476465E+02 Delta DEC: 0.11076797E+02 5 Delta RA: -0.16383368E+02 Delta DEC: 0.94956824E+01 There are 5 good reference stars. Mean Delta RA, and sigma: -0.29633584E+01 0.26681879E+02 Mean Delta DEC, and sigma: 0.10720765E+02 0.20437024E+01 You now have 3 choices: Choice 1: Use this solution. Type 1. Choice 2: Eliminate a reference star and re-solve. Type 2. Choice 3: Use the centerfield only. Type 3 . 3 Object coordinates set to centerfield position Final output is file coordinates.list
(You can see from this that the third reference star has been mid-identified.)
For my October, 1994 LRIS run I made a mask from an LRIS image (lris0410) taken on August 8, 1994. The field selected was a random high galactic latitude field with no previous astrometry whatsoever which is part of the Caltech Deep survey. I used (X,Y) position measured from the image, and run through the program coordinates to make a slit-mask for the brighter galaxies in this field. I have not yet had time to compare in detail the image and the image of the slitmask taken on Oct. 31, 1994. However, the slitmask alignment program converged with an rms errors of under 0.77 pixels (0.16 arc-sec) in X and 0.52 arc-sec in Y, where the slits are along Y, and hence the error in Y, as long as it reasonably small, is not important. This is another good indication that the program coordinates is working correctly.
(This section will be updated as soon as I've had time to analyze the data from October 31 in more detail.)
coordinates is self contained. It is written in Fortran. Aside from the Figaro libraries, it does not use any libraries that are not appended to the main routine. It has as input an ascii file and a LRIS image. The output file is an ascii file. It has no graphical input or output.
If you wish to run it stand-alone (i.e. as a non-Figaro program), then from honolii:~lris/coordinates, copy both coordinates.f and fake_dta_fig.f. (The second file contains a few dummy routines to substitute for some Figaro calls.) In this case, your compiled version will only work with Fits LRIS images, and will give an error message if you try to use it with Figaro LRIS images.
You must edit the first line of coordinates.f, changing ``subroutine coordinates'' to ``program coordinates''.
The compilation must be:
f77 -xl -o coordinates coordinates.f fake_dta_fig.f
If you use it as a Figaro program, link with the fig command as usual. The resulting executable will work with either Fits or Figaro files from LRIS.
coordinates has no Figaro parameters. Use a con file from some other Figaro command, eliminate all the parameters but one, and create a par file for coordinates that way. If you do nothing and hence don't have a coordinates.par file, you will get an error message upon startup that is obvious in content and can be ignored.
The coordinates sub-directory on honolii also contains two example input files, and small Fits and Figaro images that can be used to try to run it, in case you don't already have any LRIS images.
If you have a list of offsets in arc-sec East and North of some known position, and you need to prepare a file for Autoslit, a program called offset_list can be used. This program uses many of the same routines as does coordinates and is basically a modification of it.
The first line of the input file contains the field center RA and the second contains the field center Dec. Subsequent lines are offsets of objects in seconds of arc in RA and Dec from the field center, followed by an integer object identification code. The output is a file with coordinates for each object.
Again the maximum number of objects is 1000, but it can raised by changing the value of the parameter max_obj in the source code and re-compiling the program.
The compilation is straightforward,
f77 -o offset_list offset_list.f
To download the source code for coordinates, connect to the CARA ftp server, ftp.keck.hawaii.edu:/outgoing/lris/coordinates. The file readme.coordinates there describes the contents of the directory. Download the software by retrieving the file coordinates