! ! fixrampids.scr - NewBug routines ! Jan 13, 1999 ! Copyright Zygo Corporation 1996, 1997, 1998, 1999 ! !! fixrampids Fix phase ramp ids to work with older software ! fixrampids: if si.cameraType <> CAMERA_XC77CE then print "fixrampids only works for the Sony XC77CE camera" goto fixrampids_exit endif for i = 0 to (si.nRamps-1) select ramp i t% = rh.rampType if t% < RAMP_PMI_MIN or t% > RAMP_PMI_MAX then goto fixrampids_next endif if abs(rh.cameraRate - 25) < 1 then if rh.nBuckets = 5 then newID = 1 endif if rh.nBuckets = 7 then newID = 3 endif if rh.nBuckets = 11 then newID = 2 endif if rh.nBuckets = 13 then newID = 5 endif endif if abs(rh.cameraRate - 50) < 1 then if rh.nBuckets = 5 then newID = 11 endif if rh.nBuckets = 7 then newID = 13 endif if rh.nBuckets = 11 then newID = 12 endif if rh.nBuckets = 13 then newID = 15 endif endif print ri.fileName$; if newID = rh.rampID then print ": ID = " & val$(rh.rampID) & " unchanged" else print ": ID = " & val$(rh.rampID) & " changed to " & val$(newID) rh.rampID = newID rh.rampType = newID write ramp endif fixrampids_next: next i fixrampids_exit: return