Thu Mar 7 From: F Peter Schloerb Telescope Pointing Model Fits ----------------------------- Here's a draft of a writeup about fitting the telescope pointing models. --- Telescope Pointing Model Fit Logging Data In order to determine a pointing model for one of the IOTA telescopes, it is necessary to make a set of observations of stars with the system which span a good range of roll and tilt angles. The way to do this is to acquire a star and then write an entry into a special file containing logged star positions for the telescope in question. These log files are found in the path: /home/iota/iotamc/lmt/mc and they have the names APointingLog.dat, BPointingLog.dat, and CPointingLog.dat for the A, B, and C telescopes respectively. The logging is done through the telescope paddle panel. At the top of the panel is a menubar which is used to select the telescope for paddling. The menubar also has a menu labeled "Operations". Under the Operations menu, you will find operations for zeroing the paddle offsets, indexing the pointing offsets, and logging the present position of the currently active telescope. Selecting "log" will write an entry to the appropriate telescope log file. There is also a "log all" item under the Operations menu which will log the positions of all telescopes to their appropriate file. The log file is a text file with one line per log entry. The columns are: Col 1: Telescope ID (A, B, or C) followed by a ":" Col 2: Azimuth of Star (degrees) Col 3: Elevation of Star (degrees) Col 4: roll position of Star (degrees) Col 5: roll pointing offset (degrees) Col 6: tilt position of Star (degrees) Col 7: tilt pointing offset (degrees) Col 8: date of observation Col 9: time of observation Col10: star name Obviously, if you are looking at the file "APointingLog.dat" then all the telescope IDs should be expected to be "A:". I intend to replace the primitive "log file" approach with an actual database eventually. In the mean time, since all logged data for a particular telescope are written to the same file, it is important to save the old file and start a new one when a telescope is moved and we wish to start taking pointing data. I suggest simply renaming the file to something with a date in the name. For example, suppose that we've moved telescope A. Then we would rename the logfile: mv APointingLog.dat A_2002_03_06.dat or something like that and we'd be ready to start recording new entries. Fitting the Model There is a program in the path: /home/iota/iotamc/lmt/mc/c++ called ModelFit which is used to fit a log file of data to the IOTA telescope pointing model. The ModelFit program takes either 3 or 9 commandline arguments. The first 3 command line arguments are always required. They are: 1. name of input file with log data. 2. number of iterations for the fit. (This is a non-linear least squares fit, which typically requires more than one iteration to converge. 5 usually is plenty.) 3. name of file for writing fit residuals. In the 3 command argument version, the initial guess at the solution is some nominal number. Usually, this initial guess is sufficient to get the program to converge to the correct least squares solution. However, since this thing is non-linear, for some data distributions we don't get a good stable solution and must try to start the process with a different initial guess. To enter a different initial guess, you supply an additional 6 arguments (in degrees): 4. Dip of Roll-Tilt Axis (nominal: 30 degrees) 5. Azimuth of Roll-Tilt Axis (nominal: -90 degrees) 6. Zero of Roll (nominal: 0 degrees) 7. Zero of Tilt (nominal: 0 degrees) 8. Roll Autocoll position (nominal: 0 degrees) 9. Tilt Autocoll position (nominal: 89.5 degrees; note that 90 degrees leads to a singularity ... ugh) Note that the autocoll positions are very close to the pole of roll-tilt space, and accordingly, are quite sensitive. My advice on running this program is to try the nominal position first. Then, you might try again starting the roll autocol position in another quadrant ... perhaps 90 degrees rather than 0 ... to see if this makes a difference. Another good strategy is to make the initial model close to the last best fitting model for the position. For each iteration in the fit, we print out the rms of the fit and the values of the fit parameters for that iteration. After the maximum number of iterations or convergence of the fit, we print the final model parameters in the same order as given above. The program also writes an output file with the residuals. Each observation is a line in an ascii text file with the following data: Col 1: id number (an integer) Col 2: observed roll of star Col 3: roll of best fitting model Col 4: residual for roll (observed - model) Col 5: observed tilt of star Col 6: tilt of best fitting model Col 7: residual for tilt (observed - model) You can use your favorite plotting program to view the residuals, but just scanning the numbers often provides useful feedback as far as assessing whether there are bad points. You can cope with bad points in one of two ways: (1) edit the log file and delete the offending line (Might be good to make a copy first); or (2) edit the log and replace the Telescope ID character with an "X". Thus, the first string on the line would read "X:" rather than "A:", "B:", or "C:" depending on which telescope log was being fit. The advantage to the latter approach is that you can try fits by eliminating a suspected bad point from the data without totally removing the point from the file. This makes it easy to reinstate points.