Before running a pointing model, make sure the time is set well on the computer (SETTIME), and check the azimuth motor scale (CAZ). Check the rotator center and implement it in pm.pro.
For a pointing model, one looks at stars of known position at many locations across the sky, and determines the pointing correction as a function of altitude and azimuth. There is an XVISTA procedure, pm.pro, that will take the pointing model data, based on an input file of desired positions, pm.dat. Given the poor pointing of the telescope, one needs to use a preliminary pointing model to even be able to find the stars on the frames.
If totally lost, use spiral.pro to try to find a bright star. Once found, use pmwrite.pro to write a pointing model entry for it; IMPORTANT, pmwrite want to write target RA/DEC with observed az/alt, so need to use GUIDEINST to move telescope, not OFFSET! Can gradually move around sky, adding stars to a pointing model file until enough are found to try to do an initial model. Need to use posrecen to change from output file form to TPOINT input file format.
pm.pro takes images, finds bright star and moves it to rotator center, then takes new image, stored in pm???.fits. So this has observed az/alt to get star in rotator center. For pointing model, compare this with predicted az/alt. pm.pro creates proper input file for TPOINT using program posrecen.c. Use output pm.dat for TPOINT INDAT command, the CALL ALTAZ and USE NRX NRY to implement the proper alt-az Nasmyth pointing model terms, then FIT multiple times to get a solution. To see results graphically, do PLTON xwindows, then CALL A9 (for 9 different graphs) or GSMAP (to see residuals as a function of position in sky). You can remove points using, e.g. MASK r g 50 to mask points with residual greater than 50 arcsec. Once a satisfactory fit is found, OUTPUT file.mod will output the model.
To implement the model, use TPOINT command in command window, which asks for TPOINT .mod file, then transmits the coefficients via the TOCC TPOINT command. Alternatively, TPFILE command will prompt you for the name of a TPOINT model file to input.
OLD WAY: To analyze the data, the positions of the stars on the frames are measured. This can be doing using the XVISTA pos.pro procedure. Then the measured positions need to be reformatted into a file that TPOINT can read; the program coord2 does this; it takes the output .dat file of pos.pro as input and outputs to standard output a .mcd file. The .mcd file needs to have 4 header lines put into it (someday I should fix all the software to just do everything properly automatically!). Once you have the .mcd file, you run TPOINT (currently available on avalon only, after source holtz/star/etc/login and source holtz/star/etc/cshrc). Using INDAT file.mcd to read in star file, INMOD file.mod and UNFIT to undo the pointing corrections made by the operational pointing model, CALL ALTAZ and USE NRX NRY to implement the proper alt-az Nasmyth pointing model terms, then FIT multiple times to get a solution. To see results graphically, do PLTON xwindows, then CALL A9 (for 9 different graphs) or GSMAP (to see residuals as a function of position in sky). You can remove points using, e.g. MASK r g 50 to mask points with residual greater than 50 arcsec. Once a satisfactory fit is found, OUTPUT file.mod will output the model.
To implement this model, move the .mod file to control1m:/export/tocc and edit the file /export/tocc/toccscf.new to use the new .mod file.