histmem.c
sicvar.c SICS-93 Save histogram data and instrument state during an acquisition hipadaba_configuration_common.tcl SICS-185 Preserve case on hdb node names hmm_configuration_common_1.tcl nxscripts_common_1.tcl sicvar.c SICS-174 Allow saving of histmem data and instrument status during a count operation. wombat_configuration.tcl echidna_configuration.tcl platypus_configuration.tcl kowari_configuration.tcl quokka_configuration.tcl SICS-153 Move setup of statemon to new server_init function for the new sics_uid state variable server_config.tcl SICS-153 set attributes on the sics_suid var which is now created by MakeStateMon SICS-187 Add cold source info (TODO move to platypus,quokka and pelican configs) utility.tcl SICS-185 Added normalgetatt to preserve case on hdb node names etc. sans/config/optics/aperture_configuration.tcl New file, Provides lookup tables for attenuation and entrance apertures. (SICS-157) sans/config/optics/optics.tcl Load the new aperture_configuration.tcl sans/config/parameters/parameters.tcl SICS-157 Add instrument parameters section with derived parameters and their dependencies statemon.c SICS-153 Create sics_suid sicsvariable when loading statemon and increment it on each status change. r2635 | ffr | 2008-06-23 12:41:12 +1000 (Mon, 23 Jun 2008) | 38 lines
This commit is contained in:
committed by
Douglas Clowes
parent
eea4d4d9eb
commit
ef7c2a6f87
@@ -0,0 +1,78 @@
|
||||
namespace eval optics {
|
||||
array set AttRotLookupTable {
|
||||
0 0.0
|
||||
30 1.5
|
||||
60 3.4
|
||||
90 4.9
|
||||
120 6.4
|
||||
150 8.3
|
||||
180 9.8
|
||||
210 11.2
|
||||
240 13.2
|
||||
270 18.1
|
||||
300 23.0
|
||||
330 25.0
|
||||
}
|
||||
|
||||
array set EApLookupTable {
|
||||
0 { 5 circ}
|
||||
30 {10 circ}
|
||||
60 {20 circ}
|
||||
90 {30 circ}
|
||||
120 {40 circ}
|
||||
150 {50 circ}
|
||||
180 {50 squ }
|
||||
210 {open open}
|
||||
240 {open open}
|
||||
270 {open open}
|
||||
300 {open open}
|
||||
330 {open open}
|
||||
}
|
||||
}
|
||||
|
||||
proc ::optics::AttRotLookup {angle} {
|
||||
variable AttRotLookupTable
|
||||
set foundit false
|
||||
foreach vangle [array names AttRotLookupTable] {
|
||||
if {$vangle == [expr int($angle)]} {
|
||||
set foundit true
|
||||
break
|
||||
}
|
||||
}
|
||||
if {$foundit == true} {
|
||||
return [lindex $AttRotLookupTable($vangle) 0]
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
proc ::optics::EApLookUp {angle param} {
|
||||
variable EApLookupTable
|
||||
set foundit false
|
||||
if [ catch {
|
||||
switch $param {
|
||||
"size" {set index 0}
|
||||
"shape" {set index 1}
|
||||
default {
|
||||
error "ERROR: Invalid lookup parameter $param"
|
||||
}
|
||||
}
|
||||
foreach vangle [array names EApLookupTable] {
|
||||
if {$vangle == [expr int($angle)]} {
|
||||
set foundit true
|
||||
break
|
||||
}
|
||||
}
|
||||
if {$foundit == true} {
|
||||
return [lindex $EApLookupTable($vangle) $index]
|
||||
} else {
|
||||
switch $param {
|
||||
"size" {return 0}
|
||||
"shape" {return "UNKNOWN"}
|
||||
}
|
||||
}
|
||||
} message ] {
|
||||
if {$::errorCode == "NONE"} {return $message}
|
||||
return -code error "$message"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user