Generate anticollider rules for the collimation system on Bilby.
This commit is contained in:
committed by
Ferdi Franceschini
parent
64870e7bc8
commit
7be4438b59
@@ -2,6 +2,27 @@
|
||||
|
||||
source $cfPath(anticollider)/anticollider_common.tcl
|
||||
|
||||
namespace eval ::anticollider {
|
||||
set guide_posit 1
|
||||
set aperture_posit 2
|
||||
set ap100X100_posit 1
|
||||
set coltol 0.1
|
||||
set aptol 0.1
|
||||
|
||||
for {set n 1} {$n < 8} {incr n} {
|
||||
foreach {col ap} "col$n ap$n ap$n col$n" {
|
||||
set col_limit [expr [SplitReply [$col posit2unit $aperture_posit]] - $coltol]
|
||||
set ap_limit [expr [SplitReply [$ap posit2unit $ap100X100_posit]] - $aptol]
|
||||
set acrule [subst {forbid {-inf inf} for $ap when $col in {-inf $col_limit} }]
|
||||
lappend ::anticollider::prog $acrule
|
||||
clientput $acrule
|
||||
set acrule [subst {forbid {-inf inf} for $col when $ap in {-inf $ap_limit} }]
|
||||
lappend ::anticollider::prog $acrule
|
||||
clientput $acrule
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# NOTE: This is called with a list of motorname target pairs
|
||||
proc ::anticollider::enable {args} {
|
||||
if {[SplitReply [::anticollider::protect_detector]] == "false"} {
|
||||
@@ -11,4 +32,3 @@ proc ::anticollider::enable {args} {
|
||||
}
|
||||
}
|
||||
|
||||
::anticollider::loadscript acscript.txt
|
||||
|
||||
Reference in New Issue
Block a user