# Focus the MDM4K # Based on earlier scripts by Jay Frogel, Andy Stephens, and John Thorstensen # # Paul Martini # 30 October 2011 # # Usage: call focus4k minfocus parameter fmin if fmin==0 ask 'Minimum telescope focus value to start with? ' fmin end_if printf 'This script will take five exposures with the current configuration ' printf 'to measure the telescope focus starting with %i5' fmin printf 'Is this correct?' printf 'And is the ROI set appropriately? (the 1k or 512 ROI should suffice)' wait 'Press RETURN to continue or Ctrl-C and then RETURN to abort' bell # Remove hysteresis set ff=fmin-30 printf 'Setting telescope focus to %i5 to remove hysteresis' ff telfocus $ff sleep 5 silent # Set to first focus, take first exposure set ff=fmin printf 'Setting telescope focus to %i5 to start sequence' ff telfocus $ff string NAME 'Telescope Focus %i5' ff object '{NAME}' go set ff=fmin+10 telfocus $ff string NAME 'Telescope Focus %i5' ff object '{NAME}' go set ff=fmin+20 telfocus $ff string NAME 'Telescope Focus %i5' ff object '{NAME}' go set ff=fmin+30 telfocus $ff string NAME 'Telescope Focus %i5' ff object '{NAME}' go set ff=fmin+40 telfocus $ff string NAME 'Telescope Focus %i5' ff object '{NAME}' go end