# Move to a random location, wait ten seconds. Execute spiral reset, move to target # location, wait ten seconds and measure position. The target location varies with # the pass counter so as to explore a 3 x 3 grid spanning the range of the fiber. # Set the north and east control values randomly, make the south and west # be opposite and write north and south to outfile. tcl set config(n_out) [expr round(rand()*255)] tcl set config(s_out) [expr 255 - $config(n_out)] tcl set config(e_out) [expr round(rand()*255)] tcl set config(w_out) [expr 255 - $config(e_out)] tcl LWDAQ_print -nonewline $outfile "$config(n_out) $config(e_out) " # Move to the new position, wait ten seconds. tcl set info(trace_enable) 0 tcl Fiber_Positioner_move tcl set info(trace_enable) 1 wait 10 # Perform the spiral. 253 13 133 133 214 52 214 52 133 133 243 23 59 207 207 59 33 233 133 133 66 200 66 200 133 133 43 223 193 73 73 193 213 53 133 133 186 80 186 80 133 133 203 63 87 179 179 87 73 193 133 133 94 172 94 172 133 133 83 183 165 101 101 165 173 93 133 133 158 108 158 108 133 133 163 103 115 151 151 115 113 153 133 133 122 144 122 144 133 133 123 143 137 129 129 137 133 133 133 133 # Determine a target position based upon the pass counter. tcl if {($config(pass_counter) % 9) == 0} {Fiber_Positioner_goto Point_1} tcl if {($config(pass_counter) % 9) == 1} {Fiber_Positioner_goto Point_2} tcl if {($config(pass_counter) % 9) == 2} {Fiber_Positioner_goto Point_3} tcl if {($config(pass_counter) % 9) == 3} {Fiber_Positioner_goto Point_4} tcl if {($config(pass_counter) % 9) == 4} {Fiber_Positioner_goto Point_5} tcl if {($config(pass_counter) % 9) == 5} {Fiber_Positioner_goto Point_6} tcl if {($config(pass_counter) % 9) == 6} {Fiber_Positioner_goto Point_7} tcl if {($config(pass_counter) % 9) == 7} {Fiber_Positioner_goto Point_8} tcl if {($config(pass_counter) % 9) == 8} {Fiber_Positioner_goto Point_9} label Point_1 tcl set config(n_out) 0 tcl set config(e_out) 0 tcl Fiber_Positioner_goto move label Point_2 tcl set config(n_out) 0 tcl set config(e_out) 133 tcl Fiber_Positioner_goto move label Point_3 tcl set config(n_out) 0 tcl set config(e_out) 255 tcl Fiber_Positioner_goto move label Point_4 tcl set config(n_out) 133 tcl set config(e_out) 0 tcl Fiber_Positioner_goto move label Point_5 tcl set config(n_out) 133 tcl set config(e_out) 133 tcl Fiber_Positioner_goto move label Point_6 tcl set config(n_out) 133 tcl set config(e_out) 255 tcl Fiber_Positioner_goto move label Point_7 tcl set config(n_out) 255 tcl set config(e_out) 0 tcl Fiber_Positioner_goto move label Point_8 tcl set config(n_out) 255 tcl set config(e_out) 133 tcl Fiber_Positioner_goto move label Point_9 tcl set config(n_out) 255 tcl set config(e_out) 255 tcl Fiber_Positioner_goto move # Move to our fixed position, wait ten seconds, record result to disk. label move tcl set config(s_out) [expr 255 - $config(n_out)] tcl set config(w_out) [expr 255 - $config(e_out)] tcl LWDAQ_print -nonewline $outfile "$config(n_out) $config(e_out) " tcl Fiber_Positioner_move wait 10 tcl Fiber_Positioner_check tcl LWDAQ_print $outfile "$info(spot_positions)"