Optics subsystem.
Currently only guide configuration is implemented. r2194 | ffr | 2007-10-23 12:59:44 +1000 (Tue, 23 Oct 2007) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
3077fddc3b
commit
3fcb976816
1
site_ansto/instrument/sans/config/optics/README.TXT
Normal file
1
site_ansto/instrument/sans/config/optics/README.TXT
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Optical Components: Neutron Guides, Apertures, Polariser, Focussing Lenses and Prisms
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
##
|
||||||
|
# @file
|
||||||
|
# A guide configuration table where each line describes the setup
|
||||||
|
# for a mode of operation.
|
||||||
|
# The table will have a corresponding interpretation list which provides
|
||||||
|
# commands to setup the instrument.
|
||||||
|
|
||||||
|
namespace eval optics {
|
||||||
|
# A configuration table is made up of a set of named rows which provide
|
||||||
|
# configuration parameters
|
||||||
|
# Rows can be of mixed type
|
||||||
|
array set guide_configuration {
|
||||||
|
GA {MT A A A A A A A A }
|
||||||
|
MT {MT MT MT MT MT MT MT MT MT }
|
||||||
|
LP {MT MT MT MT MT MT MT MT LP }
|
||||||
|
LENS {MT MT MT MT MT MT MT MT L }
|
||||||
|
P1 {P A MT MT MT MT MT MT MT }
|
||||||
|
P1LP {P A MT MT MT MT MT MT LP }
|
||||||
|
P1LENS {P A MT MT MT MT MT MT L }
|
||||||
|
G1 {G A MT MT MT MT MT MT MT }
|
||||||
|
P2 {P G A MT MT MT MT MT MT }
|
||||||
|
G2 {G G A MT MT MT MT MT MT }
|
||||||
|
P3 {P G G A MT MT MT MT MT }
|
||||||
|
G3 {G G G A MT MT MT MT MT }
|
||||||
|
P4 {P G G G A MT MT MT MT }
|
||||||
|
G4 {G G G G A MT MT MT MT }
|
||||||
|
P5 {P G G G G A MT MT MT }
|
||||||
|
G5 {G G G G G A MT MT MT }
|
||||||
|
P6 {P G G G G G A MT MT }
|
||||||
|
G6 {G G G G G G A MT MT }
|
||||||
|
P7 {P G G G G G G A MT }
|
||||||
|
G7 {G G G G G G G A MT }
|
||||||
|
P8 {P G G G G G G G A }
|
||||||
|
G8 {G G G G G G G G A }
|
||||||
|
P9 {P G G G G G G G G }
|
||||||
|
G9 {G G G G G G G G G }
|
||||||
|
}
|
||||||
|
|
||||||
|
# This list maps the motor names to columns of the
|
||||||
|
# guide_configuration table.
|
||||||
|
set guide_configuration_columns {
|
||||||
|
c1 c2 c3 c4 c5 c6 c7 c8 c9
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace eval optics {
|
||||||
|
variable guide_configuration
|
||||||
|
variable guide_configuration_columns
|
||||||
|
namespace export set_guide
|
||||||
|
}
|
||||||
|
##
|
||||||
|
# @brief set_guide uses a lookup table to setup the collimation system
|
||||||
|
# @param row, selects a row from the guide configuration table
|
||||||
|
#
|
||||||
|
# eg\n
|
||||||
|
# set_guide HIRES
|
||||||
|
proc ::optics::set_guide {row} {
|
||||||
|
variable guide_configuration
|
||||||
|
variable guide_configuration_columns
|
||||||
|
|
||||||
|
array set c1_map {G 1 MT 2 P 3}
|
||||||
|
array set c2_map {MT 1 G 2 A 3}
|
||||||
|
array set c3_map {MT 1 G 2 A 3}
|
||||||
|
array set c4_map {MT 1 G 2 A 3}
|
||||||
|
array set c5_map {MT 1 G 2 A 3}
|
||||||
|
array set c6_map {MT 1 G 2 A 3}
|
||||||
|
array set c7_map {MT 1 G 2 A 3}
|
||||||
|
array set c8_map {MT 1 G 2 A 3}
|
||||||
|
array set c9_map {LP 1 MT 2 G 3 A 4 L 5}
|
||||||
|
|
||||||
|
foreach el $guide_configuration($row) guide $guide_configuration_columns {
|
||||||
|
lappend to_config $guide
|
||||||
|
lappend to_config [set ${guide}_map($el)]
|
||||||
|
}
|
||||||
|
drive $to_config
|
||||||
|
}
|
||||||
|
namespace import ::optics::set_guide
|
||||||
|
|
||||||
|
publish set_guide user
|
||||||
1
site_ansto/instrument/sans/config/optics/optics.tcl
Normal file
1
site_ansto/instrument/sans/config/optics/optics.tcl
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fileeval $cfPath(optics)/guide_configuration.tcl
|
||||||
Reference in New Issue
Block a user