#
# PLATE parameters
#

# params for makePlates

# Params for diff. refraction done by slalib
obsPres       1013.25  # typical pressure (millbars)
obsRH         0.2      # typical relative humidity
tropLR        0.0065   # tropospheric lapse rate (deg K / meter)
wave          0.5      # wavelength (in microns) for diff. refraction

# Params for optical plate distortion; this gets us from (ra,dec)
# to focal plane (x,y), in mm
optDistScale  217.7358   # plate scale, mm / degree
optDistParity   1        # +1 if (x,y) system is right handed
                         # -1 if (x,y) system is left handed
optDistXcenter  0.0      # center of radial distortion pattern
optDistYcenter  0.0
optDistCoeff   -0.000137627 -0.00125238 1.5447e-09 8.23673e-08 -2.74584e-13 -1.53239e-12 6.04194e-18 1.38033e-17 -2.97064e-23 -3.58767e-23 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

# quality holes : num. of quality holes, 
# then x,y of each quality hole location (in mm)
qualityHoles    6 \
              300.0    0.0    \
             -300.0    0.0    \
              150.0  259.8076 \
             -150.0  259.8076 \
             -150.0 -259.8076 \
              150.0 -259.8076



# params for fiberPlates
guideSelection 0.5  # this sets how the guide star selection is done;
                    # 1.0 means select purely by magnitude;
                    # 0.0 means select purely by dist. from the preferred x,y;
                    # a float between 1 and 1 means a mixture of the 2.

spectrographs {1 2} # which spectrographs are being used? 1 or 2 or both?

# reach goes as : number of fibers; then for each fiber, 1 set of : 
#   x,y of the center of the fiber reach; radius of the reach; 
#   x,y of the preferred guide hole location (all in mm)
guideReach 11  1  199.0  -131.0  165.0  199.0  -131.0 \
               2   93.0  -263.0  165.0   93.0  -263.0 \
               3 -121.0  -263.0  165.0 -121.0  -263.0 \
               4 -227.0  -131.0  165.0 -227.0  -131.0 \
               5 -199.0   131.0  165.0 -199.0   131.0 \
               6  -93.0   263.0  165.0  -93.0   263.0 \
               7  121.0   263.0  165.0  121.0   263.0 \
               8  227.0   131.0  165.0  227.0   131.0 \
               9   14.0   131.0  139.5   14.0    65.0 \
              10  -14.0  -131.0  165.0  -14.0   -65.0 \
              11   93.0  -131.0  139.5   93.0  -131.0

#cSkyReach   1 11   93.0  -131.0  139.5   93.0  -131.0
cSkyReach 0





# params for makeFanuc. makes file formatted for input into U.Washington 
# plate drilling machine

# Params for plate bending distortion
# from http://www.apo.nmsu.edu/Telescopes/SDSS/eng.papers/19990112_PlugPlateDistortion/19990112.html
bendDistScale   1.0    # at the moment, scale not used for bending
bendDistParity  1
bendDistXcenter 0.0
bendDistYcenter 0.0
bendDistCoeff   0.0 -5.193e-4 0.0 9.09e-9 0.0 -5.42e-14 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

# Params for plate shape (deflection in z, perpendicular to the plate face
plateShapeScale   1.0    # at the moment, scale not used for curvature
plateShapeParity  1
plateShapeXcenter 0.0
plateShapeYcenter 0.0
plateShapeCoeff   -5.6607e-02 0.0 -1.5059e-04 0.0 1.6822e-09 0.0 -1.8194e-14 0.0 1.1702e-19 0.0 -2.8400e-25 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

tempShop         20         # temperature of plate during drilling (deg C)
ZOffset          -3.9624    # drilling offset (mm)
ZOffsetR          0.762     # drilling offset (mm)
thermalExpand    21.24e-6   # percentage expansion per deg C
maxRadius       326.644     # max hole position radius (mm)
objectCodesFile g_codes_object.txt
trapCodesFile   g_codes_lighttrap.txt
endCodesFile    g_codes_completion.txt
alignCodesFile  g_codes_alignment.txt




# params for makeDrillPos. Makes files for plate measuring QA
# (also uses tempShop, thermalExpand, and the bending distortion 
# from makeFanuc params

# plate flattening distortion
# from http://www.apo.nmsu.edu/Telescopes/SDSS/eng.papers/19990112_PlugPlateDistortion/19990112.html
# note : for some reason the measured hole positions match the drilled 
# positions better without applying this distortion. So for now I have 
# commented them out and added zeros for this distortion so that it is 
# not used.
flatDistScale   1.0    # at the moment, scale not used for flattening
flatDistParity  1
flatDistXcenter 0.0
flatDistYcenter 0.0
#flatDistCoeff   0.0 5.28e-4 0.0 -1.109e-8 0.0 5.26e-14 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
#flatDistCoeff  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

#12/12/01 Steve Kent
#Use new distortion coefficients from Russ Owen.  These give drill - flat.
flatDistCoeff  0.0 6.322e-4 -4.733e-6 1.775e-8 -6.639e-11 1.412e-13 -1.039e-16 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
