How to make lookup tables

INSTRUCTIONS TO BUILD LOOKUP TABLES FOR THE 4M ACTIVE OPTICS

Revision of J.Baldwin's notes from 17Dec98 

All the updated programs are stored in /ua76/boccas/4m/make_lookup/

STEP 0:

  • Do a sky map with Iman or Shap at the standard positions all over the sky (see "Calibration Positions for 4MAP Lookup Tables"). There are 2 plotting programs, one for Iman data and one for Shap data, that will produce graphs of the sky in (HA,Dec) coordinates showing the aberration vectors (the center of the graph is the zenith):
  • In order to plot the sky map data taken with Iman (which measures aberration amplitude in microns), use the program 'listmap' with the input file 'list.in' (which is a copy, that you can edit, of 'iman.log.av'). See the format of 'iman.log.av' in paragraph 4.5 of the Iman manual). You will simply be asked for the aberration desired. Output can be displayed by selecting '/Xwin' or copied into a poscript file by selecting 'name.ps/ps'. 'Listav' is another useful program that will calculate the average aberrations in your sky map (especially useful when there is a constant aberration over the sky).
  • In order to plot the sky map data taken with Shap (which measures aberration amplitude in nanometers), use the program 'map4' with the input file 'shap.in' (which is a copy, that you can edit, of 'shap.av'). You will be asked to specify the columns containing HA, Dec, aberration value, aberration pa. In 'shap.av', HA is column 1, Dec is 2, Defocus is 3, Spherical is 4, Coma is 5, Coma pa is 6, Astig is 7, Astig pa is 8, Tref is 9, Tref pa is 10, Quad is 11, Quad pa is 12. Output can be displayed by selecting '/Xwin' or copied into a poscript file by selecting 'name.ps/ps'.

STEP 1:

  •  Use the fortran program 'xyiman' or 'xyshap' (depending on whether the data are in iman or shap format) to convert (r,theta) results for aberrations into (x,y) vector components. Either program writes its output into the files 'xgrid.out' and 'ygrid.out'.
  • For xyiman, the input is read from file 'xyiman.in', which is in the format written by the program 'imanav' (see paragraph 4.1 of the Iman manual) into the file 'iman.log.av'.
  • The normal way to run 'xyiman' is:

    • cp iman.log.av xyiman.in
    • textedit xyiman.in (cut out any unwanted runs)
    • xyiman [aberration]
    • aberration = number from list below

      • + 1 = defocus
      • + 2 = decenter
      • + 3 = coma
      • + 4 = spherical
      • + 5 = astigmatism
      • + 6 = trefoil
      • + 7 = quadrafoil
  • For xyshap, the input is read from file 'xyshap.in' (a copy of 'shap.av'), and you will be asked to specify the columns containing HA, Dec, aberration value, aberration pa. In 'shap.av', HA is column 1, Dec is 2, Defocus is 3, Spherical is 4, Coma is 5, Coma pa is 6, Astig is 7, Astig pa is 8, Tref is 9, Tref pa is 10, Quad is 11, Quad pa is 12. HA and Dec must be in decimal format (this is done when you use 'newshap', see shapzz.help).

STEP 2:

  • Then use the IRAF routine ctio.stsdas.toolbox.imgtools.xyztable to fit to x components, and provide output x components interpolated to the standard "Calibration Positions for 4MAP Lookup Tables". The desired output HA and Dec are in the file outpos.in.
  • lpar xyztable


 

intable1= "xgrid.out") input files to fit to
intable2= "outpos.in") positions at which to evaluate fit
outtable= "xinterp.out") list of output tables
(xname= "c1") name of column for X values
(yname= "c2") name of column for Y values
(zname= "c3") name of column for Z values
(xorder= 3) number of coefficients in X
(yorder= 3) number of coefficients in Y
(x1= INDEF) minimum X value for fit
(x2= INDEF) maximum X value for fit
(y1= INDEF) minimum Y value for fit
(y2= INDEF) maximum Y value for fit
(cross_terms= yes) include cross-terms?
(function= "chebyshev") function to be fit
(verbose= yes) print file names?
(coefficients= no) print coefficients?
(Version= "8February1994") date of installation
(mode= "al")  

STEP 3:

  •   Use xyztable again for ygrid.out --> yinterp.out

STEP 4:

  • At this point, there are a pair of files xinterp.out,yinterp.out which list the standard position HA & Dec, and then either the x or y component of the coma vector at that position.
  • Now run the fortran program 'tabmake'. It reads in the files xinterp.out and yinterp.out, assuming that THE FIRST DATA VALUE IS FOR THE ZENITH, and writes an output file in the correct format for the lookup table.
  • If you are making a coma lookup table, it needs to be referenced to zero coma at the zenith. The program tabmake does this if you answer 'Y' or 'y' to the question "Is this a coma lookup table?". tabmake then converts the output (r,theta) values into the units wanted by the TCP keyboard entry command for tilting the f14 secondary.
  • If you answer that it is not a coma lookup table, then tabmake produces an astigmatism (or trefoil, or quadrafoil) lookup table, for which the value at zenith is NOT subtracted off.
  • Tabmake writes 12 lines of output in the correct format for the lookup table (amplitude must be in nm for astigmatism, trefoil and quadrafoil lookup tables, and in degrees for a coma lookup table). BUT, you must now use a texteditor to copy the first line of output to also be a final (13th) line. At the same time you can add comment lines at the start, with a * as their first character.
  • Here is a sample coma lookup table called f14jul98.cof:

    • f14tbl.cof
    • skymap for f14 tilt. Made 9 Jul '98 using data taken 12 Mar '98 and 8 Jul '98
    • J.Baldwin, M.Boccas
    • zenith collimation value obtained 9 July was:
    • secondary tilt .0650, PA 147 for primary tilt NW,S,NE=-19.2,-5.0,-13.5
    • the first 5 columns are amplitudes and the last 5 are angles
    • each line corresponds to a zenith distance, in steps of 15deg

      0.0000 0.0170 0.0360 0.0568 0.0793 0 191 190 190 190
      0.0000 0.0122 0.0253 0.0373 0.0455 0 181 182 183 185
      0.0000 0.0056 0.0121 0.0167 0.0158 0 155 163 169 177
      0.0000 0.0053 0.0074 0.0085 0.0084 0 90 90 102 119
      0.0000 0.0117 0.0177 0.0172 0.0129 0 90 90 90 90
      0.0000 0.0162 0.0291 0.0356 0.0263 0 90 90 90 90
      0.0000 0.0156 0.0293 0.0412 0.0511 0 90 90 90 90
      0.0000 0.0098 0.0141 0.0165 0.0457 0 356 343 288 240
      0.0000 0.0042 0.0117 0.0271 0.0495 0 287 247 229 221
      0.0000 0.0095 0.0237 0.0412 0.0604 0 220 217 216 217
      0.0000 0.0154 0.0339 0.0538 0.0743 0 206 206 208 213
      0.0000 0.0183 0.0389 0.0616 0.0857 0 198 198 199 202
      0.0000 0.0170 0.0360 0.0568 0.0793 0 191 190 190 190

STEP 5:

  • Tabmake also writes a file called 'tabmake.out' (with 4 columns: HA, Dec, aberration amplitude, aberration pa), which can be used as the input file to the program 'map4'. You should run map4, and check that this map looks like a smoothed version of the input data.

STEP 6:

  • Finally, once you have your lookup table all made and edited, run the fortran program 'maplookup' on it. This will produce a sky map in the same format as is produced by map4.
  • If it is an astigmatism (or trefoil, or quadrafoil) lookup table, the map of the lookup table should look like the sky map of aberrations which you are trying to correct, with the vectors pointing in the SAME directions in the two maps.
  • For a coma lookup table, you should see that the vector value at the zenith has been subtracted at all points on the sky.

 

 

 

Maxime Boccas, 4Feb01