2. New focus scripts for setting up the IDS detector.
   Date: 10/2/1999
   By  : S. Smartt

The current script for focusing the detector (ids_tilt)
gives out the wrong advice for the capstan turns for the 500mm
camera. This is not just a wrong sign, the actual numbers are
completely incorrect.

I have re-written this script so that it calculates the capstan turns,
AND the collimator offsets in a correct manner for the 500mm camera. 
There are some changes to the advice it gives. The advice is now 
split into four separate sections :
1. Advice on overall capstan turns.
2. Advice on top-bottom captsan turns
3. Advice on left-right capstan turns. 
4. Advice on collimator movement if necessary. 

Previously there was 1 single number returned for each capstan which 
combined the advice for 1+2+3. Hence if a sign was wrong in one 
capstan, the NUMBER of turns advised was wrong, not the direction.
I prefer the new advice, as it doesn't try to be too clever and end
up getting itself, and you. in mess. 

-----------------------------------------------------------------------
Advice for setting up the 500mm camera:

Note that the new advice calculates an off-set for the collimator
aswell as an overall shift on the capstans. The focus position is
rather insensitive to collimator position. The acceptable range for
the collimator within astigmatism limits is 200 - 240 units 
(measured 16/01/98 by sjs). A change of +/- 20 units will change 
the Hartmann shifts by approx +/-0.5 pixels. The FWHM of the arc-lines
change by approx +/- 0.2 pix across this range. 
 Hence the recommended way to do the focusing is first to set the
collimator to around 220 units, and then move the capstans so that the
detector is de-tilted, and the overall focus is better than 0.5
pixels. Then adjust the collimator focus to fine tune it. 
It is probably a good idea to set it to a lower value than you want
and move up, to avoid hysteresis effects. 

------------------------------------------------------------------------

General Notes for setting up either the 235 or the 500mm cameras:

* READ THE ON-LINE HELP PAGES FOR THE IRAF SCRIPTS ids_tilt AND
  ids_rotation (Especially if you are unfamiliar with their workings) 
  DO NOT use them as black-boxes, they have not been designed to cover all
  evenualities. Understand what they do, and their limitations. On the
  whole they are very reliable, and the bugs reported to me have been 
  addressed. There may be others in there, so don't blindly follow the
  scripts advice - use them as an aid, but think about what you are 
  doing also.
  To access the on-line help pages, type for example
  ing> help ids_tilt  

* You should ALWAYS window in the spatial direction and make   
  sure that the arc lines cover the whole of the chip for any of the
  IRAF focus proceedures that you run.
  (This is in on the on-line help pages)

* When using the large EEV42 chips (the 4k x 2k ones), always window
  in the spectral direction also so that you have only the unvignetted
  region of the spectrum on your CCD window. This is because the 
  focal plane of the cameras is not flat in this region, and on top
  of the spectrum intensity being attenuated, the arc lines are way
  out of focus. If you choose arclines in this region to do the tilt
  proceedure, you will get inconsistent and crazy results.