taper_lin = caget("SATUN:TAPER-LIN") * 1e-6 taper_qua = caget("SATUN:TAPER-QUA") * 1e-6 taper_lin_start = caget("SATUN:TAPER-LIN-START.RVAL") taper_lin_stop = caget("SATUN:TAPER-LIN-STOP.RVAL") taper_qua_start = caget("SATUN:TAPER-QUA-START.RVAL") taper_qua_stop = caget("SATUN:TAPER-QUA-STOP.RVAL") undlist = ("SATUN06","SATUN07","SATUN08","SATUN09","SATUN10","SATUN11","SATUN12","SATUN13", "SATUN15","SATUN16","SATUN17","SATUN18","SATUN19","SATUN20","SATUN21","SATUN22") screen_pos = caget("SATBD01-DSCR120:GET_SCREEN1_POS") if screen_pos != "Out of beam": caput("SATBD01-DSCR120:SET_SCREEN1_POS", 0) u = 0 i, j = 0, 0 for und in undlist: K_taper = taper_lin * i + taper_qua * j**2 if taper_lin_start <= u <= taper_lin_stop: i = i + 1 if taper_qua_start <= u <= taper_qua_stop: j = j + 1 if 0 <= u <= 7: caputq(und + "-UIND030:K_TAPER_SET", K_taper) u = u + 1 set_return("Success")