February, 2012
A great introduction to the F5 wavefront sensor hardware is the 2003 manual written by Daniel Fabricant.
A dedicated computer named "wavefront" is used to control the F5 wavefront sensor camera and associated hardware. This computer is physically located in the "cone" area inside the telescope and is difficult to physically acess. The machine is a small form factor motherboard, and runs windows XP "Professional". A solid state hard drive holds the operating system, with the hopes that this would achieve reliability. It has failed once already. The original 6G drive was replaced with a 32G drive, and the old partition copied verbatim (using Norton Ghost). This leaves 24G of the new drive unused. We do not install windows updates on this machine as we have discovered that this breaks the software.
We access this box over the network via VNC using the password "w4u".
Windows is required to run some of the drivers used to control motors and such. Cygwin is used to provide a unix like environment which runs the camera software, which at the top level at least is coded in Tcl. The bulk of the software was written by the SAO staff, with major contributions by John Roll. The MMT staff does their best to treat this as a black box -- it was provided to us as a turnkey system that should not require significant maintenance or additional software development.
chdir c:\cygwin\bin bash --rcfile /.wfsrc -iThe file .wfsrc contains:
export PATH=$PATH:/home/wave/bin export CVS_RSH=ssh export [email protected]:/data/mmti/CVSROOT . /home/wave/wfs.shThe file /home/wave/wfs.sh contains:
#!/bin/sh cd ~/src/waveserv wish waveserv.tcl & sleep 120 wish wavecamr.tcl &And that is how things startup up.
The proper "thing to do" is to type "make install" in the /home/wave/src/wavefront directory after modifying files there. This copies a whole gang of tcl files to /Tcl/lib/mmti, along with copying the file pkgIndex.tcl to that directory. This apparently sets things up the way Tcl expects to find them.
The lenslet array is part of the Puntino assembly, and yields a square grid of spots (in contrast to the hexagonal grid yielded by the f9 lenslet array. The Camera which captures the spot images is an SBIG (Santa Barbara Instrument Group) SBIG ST9XE unit with a Kodak KAF-0261E chip. It yields a 512x512 pixel image. The pixels themselves are 20x20 micron, the chip is 10.2 by 10.2 mm. The Camera has a USB 1.1 interface, and has a 16 bit A to D converter. Exposures from 0.12 to 3600 seconds are possible with 10 ms resolution.
Two servers run on this computer. Both are coded in Tcl and use the MSG protocol developed by SAO.
We use the following shell script to read an image from the camera hosted by this computer. This script takes two arguments. The first is the exposure time in seconds. The second is the name of the file that should be saved. The sleep delays in this script have been tuned by trial and error, and are a source of some concern and annoyance.
#!/bin/sh echo "1 expose 0 light $1" | nc -w 10 wavefront 3001 > /dev/null sleep $1 sleep 2 echo "1 readout" | nc -w 10 wavefront 3001 > /dev/null sleep 5 echo "1 fits 0 1322240" | nc -w 10 wavefront 3001 | tail -n +2 > $2 echo "1 idle" | nc -w 10 wavefront 3001 > /dev/nullA single image is captured as a 532800 byte file with a name like manual_wfs_0000.fits. This file holds a 512 by 512 pixel image with each pixel represented by 16 bits (2 bytes). The pixels themselves occupy 524288 bytes; the remaining 8512 bytes are FITS header records. Processing will nearly double these file sizes when 2 byte integer pixels are replaced by 4 byte floating point values.
The port 3001 "wavecamr" server is implemented by the file /home/wave/src/waveserv/wavecamr.tcl. This file pull in 3 files:
The sbig.tcl is a tcl wrapper that uses the critcl Tcl extension to embed C code which accesses the vendor supplied dynamic library: C:\Windows\system\SBIGUDrv.dll. Some documentation for the driver API provided in this library can be found in the file SBIGUDrv_4r22.pdf (26 pages, September, 2002).
The following MSG procedures are registered:
The following MSG variables are published: