// OvernightTest.txt John Meriwether Greg Twork Tom Rogan Clemson University // // 11 July 2007 // The following code has an OVERLAY of this script file at the end which allows // convenient modification of the script. // // Sequence of laser, and dark count images // one bias image // Observatory log closed at end of night observations ControlFileRead("XTimes.txt","xTimeLaser","xTime630","xTimeDark","xTimeHCL") // Read in exposure times BiasTime = 0.01 // very short exposure time for a bias image // Define image-type counters. I.e. in L07302005001.img, 001 is the ImageSeqeuence counter ImageSequenceB = 1 ImageSequenceL = 0 // L refers to laser images ImageSequenceK = 1 // D refers to dark count image in sky mode SETUP CAMERA FPI // Initialize Andor camera SETUP COOLER FPI // Turn on Andor cooling GET_STATUS CAMERA FPI, TEMPERATURE,CurrentTemp GET_STATUS CAMERA FPI, STATE, CurrentState iCycle = -1 // Initialize iCycle counter d = DateToInteger($CurrentTime) date = ConvertToString("%8d",d) SETUP CAMERA FPI // Initialize camera SETUP COOLER FPI // Turn on cooling to maintain temp, cooler already at low temp wanted GET_STATUS CAMERA FPI, TEMPERATURE, CurrentTemp GET_STATUS CAMERA FPI, STATE, CurrentState while (CurrentTemp > -60) { DELAY 5 GET_STATUS CAMERA FPI, TEMPERATURE, CurrentTemp } // Take a bias image SET_PARAMETER CAMERA FPI,ShutterMode = CLOSE SET_PARAMETER CAMERA FPI,ExposureTime = BiasTime dataType = "B" seq = ImageSequenceB TAKE_IMAGE FPI, dataType CALL "AcquireStoreDisplayImageFPI" LOG_OUTPUT ANALYZE, OPEN // Take an initial dark count image SET_PARAMETER CAMERA FPI,ShutterMode = CLOSE SET_PARAMETER CAMERA FPI,ExposureTime = xTime630 dataType = "K" seq = ImageSequenceK TAKE_IMAGE FPI, dataType CALL "AcquireStoreDisplayImageFPI" ImageSequenceK = ImageSequenceK + 1 ControlFileRead("XTimes.txt","xTimeLaser","xTime630","xTimeDark","xTimeHCL") // Re-read exposure times. This allows for // alteration in the midst of running the program endTestTime = $CurrentTime + 10*3600 while($CurrentTime < endTestTime) { nExposuresInCycle = 10 for (iCycle = 0; iCycle < nExposuresInCycle; iCycle = iCycle+1) { LEVEL 0,0 LEVEL 1,1 SET_PARAMETER CAMERA FPI,ExposureTime = xTimeHCL SET_PARAMETER CAMERA FPI,ShutterMode = AUTO dataType = "H" ImageSequenceH = ImageSequenceH + 1 seq = ImageSequenceH TAKE_IMAGE FPI, dataType CALL "AcquireStoreDisplayImageFPI" LEVEL 1,0 DELAY 300 LEVEL 0,1 SET_PARAMETER CAMERA FPI,ExposureTime = xTimeLaser SET_PARAMETER CAMERA FPI,ShutterMode = AUTO dataType = "L" ImageSequenceL = ImageSequenceL + 1 seq = ImageSequenceL TAKE_IMAGE FPI, dataType CALL "AcquireStoreDisplayImageFPI" LEVEL 0,0 DELAY 300 } // END of iCycle FOR loop // Take a dark image SET_PARAMETER CAMERA FPI,ShutterMode = CLOSE SET_PARAMETER CAMERA FPI,ExposureTime = xTime630 dataType = "K" seq = ImageSequenceK TAKE_IMAGE FPI, dataType CALL "AcquireStoreDisplayImageFPI" ImageSequenceK = ImageSequenceK + 1 } LOG_OUTPUT OBSERVATORY,ClOSE LOG_OUTPUT ANALYZE, CLOSE