(1) The following are contained in the input file:
a) date of observation [for precession AND refraction]
b) wavelength of observation [for refraction]
c) wavelength of guide camera [for refraction]
d) LST of observation [for refraction]
d) coordinates and equinox of field center
e) coordinates and equinox of each object (star, sky, fobs)
The program assigns an expected night-time temperature based upon the
date of observation for the purposes of computing refraction (which is
temperature and wavelength dependent.
(2) The program determines gripper x and y for plunking down a fiber on the
flattened plate, in such a way that its location will be correct when
the plat is warped. For the purposes of lab testing, we want the
gripper to move to the location where it would plunk down a fiber,
as that is how the Hydra code should treat an input list of coordinates.
(3) Here are the steps in going from (1) to (2):
(a) Determine the optimal angle for the rotator (maximum exposure time)
based upon the precessed center coordinates
(b) Precess coordinates and correct for refraction:
(i) Assumes average night-time temperatures of Jan-33.5, Feb--33.4,
Mar-35.6, April--41.4, May--49.7, June--57.3, July--61.6, Aug--60.0,
Sept--57.1, Oct--49.9, Nov--41.0, Dec--28.3
(ii) Computes refraction coeficens A, B for spectrograph
wavelength and camera wavelength using STARLINK reoutines
(iii) Corrects for refraction for plate center using Acam, Bcam
(iv) Corrects for refraction for fobs using Acam, Bcam
(v) Corrects for refraction for normal objects and skys using Aspect,
Bspect
(c) Convert to xi and eta [standard coordinates] for each object
These are in units of radians relative to the plate center, and
this uses STARLINK's DS2TP subroutine
(d) Correct for the pincushion distortion and convert to mm:
(i) scale = 9.4000
(ii) c = 81.0
(iii) f= 1.+ c * (xi**2 + eta**2)
(iv) xi_new = xi * f, eta_new = eta * f
(v) x = xi_new / scale / as2r
y = eta_new / scale / as2r
where as2r = 4.8481368110953599D-6, the number of radians/arcsec.
These are the x and y coordinates along the curved focal surface.
(e) Convert to where these project on the flat plate:
xp = x * R * [sin(sqrt(x^2 + y^2) / R)] / sqrt(x^2 + y^2)
yp = y * R * [sin(sqrt(x^2 + y^2) / R)] / sqrt(x^2 + y^2)
where R is the radius of curvature, 223.4 inches = 5675.2mm
(f) Rotate the coordiantes based upon the angle
(g) Dewarp: the plate has a funny shape when it's warped---it's not
quite spherical. Sam provided equations:
subroutine dewarp(xin,yin,xout,yout)
implicit real*8 (a-h,o-z)
C These are Sam's estimage of the radius from the pupil to the focal
C surface
data rfocal/5675.2/
C
C What is the actual orthogonal distance that we want from the
C radius vector to the top of the fiber.
din=dsqrt(xin**2+yin**2)
C The following were modified as per Sam's 13 March note
C re the "mid radius" where length is conserved....
if(din.lt.151.9325) then
reff=5679.881
else
temp=din*400.
reff=5670.799 + temp*(2.988726e-4 - 2.458933e-9 * temp)
C Note that Sam's equation was in terms of encoder units.
end if
C Great. Now, what is the distance we want along the plate prior to
C being warped?
dout=reff*dasin(din/rfocal)
C Now make sure that the proportions work out:
xout=0.
yout=0.
if(din.gt.0.) then
yout=(dout/din)*yin
xout=(dout/din)*xin
end if
Cwrite(9,1234) din,dout,reff,rfocal,xin,xout,yin,yout
1234 format('Din='f10.3,' Dout=',f10.3,' reff=',f10.3, 'rfoc=',
& f10.3,'xin,out; yin,out=',f10.3)
return
end
(h) The final step is to convert to encoder steps:
ix=xp * 400 + 0.5
iy=yp * 400 + 0.5
That's it!