- Extensions to the McStas simulated DMC in order to support MountainGum
This commit is contained in:
@ -1,3 +1,3 @@
|
|||||||
133
|
187
|
||||||
NEVER, EVER modify or delete this file
|
NEVER, EVER modify or delete this file
|
||||||
You'll risk eternal damnation and a reincarnation as a cockroach!|n
|
You'll risk eternal damnation and a reincarnation as a cockroach!|n
|
60
mcstas/dmc/gumxml.tcl
Normal file
60
mcstas/dmc/gumxml.tcl
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
proc getdataType {path} {
|
||||||
|
return [lindex [split [hinfo $path] ,] 0]
|
||||||
|
}
|
||||||
|
|
||||||
|
proc make_nodes {path result indent} {
|
||||||
|
set nodename [file tail $path];
|
||||||
|
set type [getdataType $path]
|
||||||
|
set prefix [string repeat " " $indent]
|
||||||
|
set newIndent [expr $indent + 2]
|
||||||
|
array set prop_list [ string trim [join [split [hlistprop $path] =]] ]
|
||||||
|
set we_have_control [info exists prop_list(control)]
|
||||||
|
if {$we_have_control == 0 || $we_have_control && $prop_list(control) == "true"} {
|
||||||
|
append result "$prefix<component id=\"$nodename\" dataType=\"$type\">\n"
|
||||||
|
foreach p [property_elements $path $newIndent] {
|
||||||
|
append result $p
|
||||||
|
}
|
||||||
|
foreach x [hlist $path] {
|
||||||
|
set result [make_nodes [string map {// /} "$path/$x"] $result $newIndent]
|
||||||
|
}
|
||||||
|
append result "$prefix</component>\n"
|
||||||
|
}
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
|
||||||
|
proc property_elements {path indent} {
|
||||||
|
set prefix [string repeat " " $indent]
|
||||||
|
foreach {key value} [string map {= " "} [hlistprop $path]] {
|
||||||
|
if {[string compare -nocase $key "control"] == 0} {continue}
|
||||||
|
lappend proplist "$prefix<property id=\"$key\">\n"
|
||||||
|
# foreach v [split $value ,] {
|
||||||
|
# lappend proplist "$prefix$prefix<value>$v</value>\n"
|
||||||
|
# }
|
||||||
|
lappend proplist "$prefix$prefix<value>$value</value>\n"
|
||||||
|
lappend proplist "$prefix</property>\n"
|
||||||
|
}
|
||||||
|
if [info exists proplist] {return $proplist}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc getgumtreexml {path} {
|
||||||
|
append result "<?xml version = \"1.0\" encoding = \"UTF-8\"?>\n"
|
||||||
|
append result "<hipadaba:SICS xmlns:hipadaba=\"http://www.psi.ch/sics/hipadaba\" >\n"
|
||||||
|
|
||||||
|
if {[string compare $path "/" ] == 0} {
|
||||||
|
foreach n [hlist $path] {
|
||||||
|
set result [make_nodes $n $result 2]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# set result [make_nodes $path $result 2]
|
||||||
|
foreach n [hlist $path] {
|
||||||
|
set result [make_nodes $path/$n $result 2]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
append result "</hipadaba:SICS>\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[info exists guminit] == 0} {
|
||||||
|
set guminit 1
|
||||||
|
Publish getgumtreexml Spy
|
||||||
|
}
|
@ -30,7 +30,7 @@ proc washsimfile {name} {
|
|||||||
# dump its data. Otherwise we observe that data reading fails.
|
# dump its data. Otherwise we observe that data reading fails.
|
||||||
# mcwaittime is used for this. Increase if you see problems
|
# mcwaittime is used for this. Increase if you see problems
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
set mcwaittime 7
|
set mcwaittime 2
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
proc mcstasdump {pid} {
|
proc mcstasdump {pid} {
|
||||||
global mcwaittime
|
global mcwaittime
|
||||||
|
@ -31,21 +31,22 @@ SicsUser lnsmanager lnsSICSlns 1
|
|||||||
SicsUser Manager Manager 1
|
SicsUser Manager Manager 1
|
||||||
SicsUser user looser 2
|
SicsUser user looser 2
|
||||||
SicsUser Spy 007 1
|
SicsUser Spy 007 1
|
||||||
|
SicsUser User 07lns1 2
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# D E V I C E S : M O T O R S
|
# D E V I C E S : M O T O R S
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ClientPut "Installing Motors"
|
ClientPut "Installing Motors"
|
||||||
Motor OmegaM SIM 0 120 -.1 2.
|
Motor OmegaM SIM 0 120 .0000001 2.
|
||||||
Motor TwoThetaM SIM 30 100 -.1 1.
|
Motor TwoThetaM SIM 30 100 .0000001 1.
|
||||||
Motor MonoX SIM -30 30 -.1 3.0
|
Motor MonoX SIM -30 30 .00000001 3.0
|
||||||
Motor MonoY SIM -30 30 -.1 3.0
|
Motor MonoY SIM -30 30 .000000001 3.0
|
||||||
Motor CurveM SIM 0 20 -.1 3.0
|
Motor CurveM SIM 0 20 .000000001 3.0
|
||||||
Motor MonoPhi SIM -30 30 -.1 3.0
|
Motor MonoPhi SIM -30 30 .00000001 3.0
|
||||||
Motor MonoChi SIM -30 30 -.1 3.0
|
Motor MonoChi SIM -30 30 .00000001 3.0
|
||||||
|
|
||||||
# sample Table
|
# sample Table
|
||||||
Motor Table SIM -180 360 -.1 2.
|
Motor Table SIM -180 360 .0000001 2.
|
||||||
Motor TwoThetaD SIM -10 120 -.1 1.
|
Motor TwoThetaD SIM -10 120 .0000001 1.
|
||||||
#-------------------------------------------------------------
|
#-------------------------------------------------------------
|
||||||
# Monochromator
|
# Monochromator
|
||||||
#-------------------------------------------------------------
|
#-------------------------------------------------------------
|
||||||
@ -66,6 +67,7 @@ allowexec $home/dmcafter
|
|||||||
allowexec $home/dmc_sics05
|
allowexec $home/dmc_sics05
|
||||||
|
|
||||||
ClientPut "Installing counter"
|
ClientPut "Installing counter"
|
||||||
|
|
||||||
MakeCounter counter mcstas
|
MakeCounter counter mcstas
|
||||||
counter SetExponent 1
|
counter SetExponent 1
|
||||||
MakeHM banana mcstas
|
MakeHM banana mcstas
|
||||||
@ -79,7 +81,7 @@ banana CountMode Timer
|
|||||||
banana configure Counter counter
|
banana configure Counter counter
|
||||||
banana configure init 0
|
banana configure init 0
|
||||||
banana init
|
banana init
|
||||||
banana exponent 3
|
#banana exponent 3
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# Aliases
|
# Aliases
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -122,6 +124,7 @@ VarMake starttime Text User
|
|||||||
starttime ""
|
starttime ""
|
||||||
VarMake SicsDataPrefix Text Internal
|
VarMake SicsDataPrefix Text Internal
|
||||||
SicsDataPrefix vdmc
|
SicsDataPrefix vdmc
|
||||||
|
|
||||||
#--------- make data number
|
#--------- make data number
|
||||||
MakeDataNumber SicsDataNumber $home/DataNumber
|
MakeDataNumber SicsDataNumber $home/DataNumber
|
||||||
VarMake SicsDataPostFix Text Internal
|
VarMake SicsDataPostFix Text Internal
|
||||||
@ -132,6 +135,8 @@ VarMake fax Text User
|
|||||||
VarMake email Text User
|
VarMake email Text User
|
||||||
VarMake sample_mur Float User
|
VarMake sample_mur Float User
|
||||||
VarMake lastdatafile Text User
|
VarMake lastdatafile Text User
|
||||||
|
VarMake lastscancommand Text User
|
||||||
|
lastscancommand "unknown scan"
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# P R O C E D U R E S
|
# P R O C E D U R E S
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
@ -139,21 +144,44 @@ MakeDrive
|
|||||||
MakeBatchManager
|
MakeBatchManager
|
||||||
MakeNXScript
|
MakeNXScript
|
||||||
MakeRuenBuffer
|
MakeRuenBuffer
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
# simulated scanning for demo purposes
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
MakeCounter lieselotte SIM -1
|
||||||
|
MakeMultiCounter scanCter lieselotte
|
||||||
|
#------------------------------
|
||||||
|
proc SICSValue {command} {
|
||||||
|
set txt [eval $command]
|
||||||
|
set l [split $txt =]
|
||||||
|
return [string trim [lindex $l 1]]
|
||||||
|
}
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
proc scantransfer {} {
|
||||||
|
set FWHM 1.5
|
||||||
|
set pos 5.33
|
||||||
|
set height 700
|
||||||
|
set stddev [expr $FWHM/2.354]
|
||||||
|
set ftmp [expr ([SICSValue a3] - $pos)/$stddev]
|
||||||
|
set count [expr 10 + $height*0.4*exp(-.5*$ftmp*$ftmp)]
|
||||||
|
set counti [expr int($count)]
|
||||||
|
append res [SICSValue "lieselotte gettime"] " "
|
||||||
|
append res $counti " "
|
||||||
|
for {set i 1} {$i < 7} {incr i} {
|
||||||
|
append res [SICSValue "lieselotte getmonitor $i"] " "
|
||||||
|
}
|
||||||
|
return $res
|
||||||
|
}
|
||||||
|
scancter transferscript scantransfer
|
||||||
|
|
||||||
|
MakeScanCommand xxxscan scancter $home/dmc.hdd $home/recover.bin
|
||||||
|
MakePeakCenter xxxscan
|
||||||
|
|
||||||
#-------------------- initialize scripted commands
|
#-------------------- initialize scripted commands
|
||||||
source $home/vdmccom.tcl
|
source $home/vdmccom.tcl
|
||||||
#-------------------- configure commandlog
|
#-------------------- configure commandlog
|
||||||
commandlog auto
|
commandlog auto
|
||||||
commandlog intervall 5
|
commandlog intervall 5
|
||||||
|
|
||||||
#----------- enable sycamore
|
|
||||||
#InstallSinfox
|
|
||||||
#source sycFormat.tcl
|
|
||||||
#source /usr/lib/tcllib1.6.1/stooop/stooop.tcl
|
|
||||||
#namespace import stooop::*
|
|
||||||
#source sinfo.tcl
|
|
||||||
#source sycamore.tcl
|
|
||||||
#Publish sinfo Spy
|
|
||||||
|
|
||||||
#==================== install Hipadaba
|
#==================== install Hipadaba
|
||||||
proc hdbReadOnly {} {
|
proc hdbReadOnly {} {
|
||||||
error "Parameter is READ ONLY"
|
error "Parameter is READ ONLY"
|
||||||
@ -169,82 +197,137 @@ proc maketwotheta {} {
|
|||||||
return $result
|
return $result
|
||||||
}
|
}
|
||||||
#-------------------------------------
|
#-------------------------------------
|
||||||
InstallProtocolHandler
|
|
||||||
InstallHdb
|
InstallHdb
|
||||||
MakeStateMon
|
MakeStateMon
|
||||||
hmake /dmc spy none
|
MakeHdbQueue hdbqueue HdbQueue
|
||||||
hsetprop /dmc type instrument
|
hmake /instrument spy none
|
||||||
|
hsetprop /instrument type instrument
|
||||||
#-------- experiment
|
#-------- experiment
|
||||||
hmake /dmc/experiment spy none
|
hmake /instrument/experiment spy none
|
||||||
hattach /dmc/experiment title title
|
hattach /instrument/experiment title title
|
||||||
hattach /dmc/experiment user user
|
hattach /instrument/experiment starttime starttime
|
||||||
hattach /dmc/experiment starttime starttime
|
hattach /instrument/experiment user user
|
||||||
hattach /dmc/experiment user user
|
hattach /instrument/experiment/user adress address
|
||||||
hattach /dmc/experiment/user adress address
|
hattach /instrument/experiment/user phone phone
|
||||||
hattach /dmc/experiment/user phone phone
|
hattach /instrument/experiment/user email email
|
||||||
hattach /dmc/experiment/user email email
|
hattach /instrument/experiment comment1 comment1
|
||||||
hattach /dmc/experiment comment1 comment1
|
hattach /instrument/experiment comment2 comment2
|
||||||
hattach /dmc/experiment comment2 comment2
|
hattach /instrument/experiment comment3 comment3
|
||||||
hattach /dmc/experiment comment3 comment3
|
|
||||||
#------- SINQ
|
#------- SINQ
|
||||||
hmake /dmc/sinq spy none
|
hmake /instrument/sinq spy none
|
||||||
hmakescript /dmc/sinq/proton_monitor "counter getmonitor 4" hdbReadOnly int
|
hmake /instrument/sinq/proton_monitor internal int
|
||||||
sicspoll /dmc/sinq/proton_monitor hdb 10
|
hattach /instrument/sinq/proton_monitor counter 4
|
||||||
#-------- monochromator
|
#-------- monochromator
|
||||||
hmake /dmc/monochromator spy none
|
hmake /instrument/monochromator spy none
|
||||||
hattach /dmc/monochromator lambda wavelength
|
hattach /instrument/monochromator lambda wavelength
|
||||||
hattach /dmc/monochromator OmegaM theta
|
hsetprop /instrument/monochromator/wavelength priv user
|
||||||
hattach /dmc/monochromator TwoThetaM two_theta
|
hattach /instrument/monochromator OmegaM theta
|
||||||
hattach /dmc/monochromator MonoX x_translation
|
hattach /instrument/monochromator TwoThetaM two_theta
|
||||||
hattach /dmc/monochromator MonoY y_translation
|
hchain /instrument/monochromator/wavelength /instrument/monochromator/two_theta
|
||||||
hattach /dmc/monochromator MonoChi chi
|
hattach /instrument/monochromator MonoX x_translation
|
||||||
hattach /dmc/monochromator MonoPhi phi
|
hattach /instrument/monochromator MonoY y_translation
|
||||||
hattach /dmc/monochromator CurveM vertical_focusing
|
hattach /instrument/monochromator MonoChi chi
|
||||||
hmakescript /dmc/monochromator/d_value "mono dd" "mono dd" float
|
hattach /instrument/monochromator MonoPhi phi
|
||||||
hsetprop /dmc/monochromator/d_value priv manager
|
hattach /instrument/monochromator CurveM vertical_focusing
|
||||||
hmakescript /dmc/monochromator/scattering_sense "mono ss" "mono ss" int
|
hmakescript /instrument/monochromator/d_value "mono dd" "mono dd" float
|
||||||
hsetprop /dmc/monochromator/scattering_sense priv manager
|
hsetprop /instrument/monochromator/d_value priv manager
|
||||||
|
hmakescript /instrument/monochromator/scattering_sense "mono ss" "mono ss" int
|
||||||
|
hsetprop /instrument/monochromator/scattering_sense priv manager
|
||||||
|
|
||||||
#----------- sample
|
#----------- sample
|
||||||
hmake /dmc/sample spy none
|
hmake /instrument/sample spy none
|
||||||
hmakescript /dmc/sample/name sample sample Text
|
hmakescript /instrument/sample/name sample sample Text
|
||||||
hattach /dmc/sample Table rotation
|
hattach /instrument/sample Table rotation
|
||||||
hmakescript /dmc/sample/monitor "counter getmonitor 1" hdbReadOnly int
|
hmake /instrument/sample/monitor internal int
|
||||||
hsetprop /dmc/sample/monitor priv internal
|
hattach /instrument/sample/monitor counter 1
|
||||||
|
hsetprop /instrument/sample/monitor priv internal
|
||||||
|
hsetprop /instrument/sample/monitor sicsdev histogrammemory
|
||||||
#---------- detector
|
#---------- detector
|
||||||
hmake /dmc/detector spy none
|
hmake /instrument/detector spy none
|
||||||
hattach /dmc/detector TwoThetaD two_theta
|
hattach /instrument/detector TwoThetaD two_theta
|
||||||
hmakescript /dmc/detector/preset "counter getpreset" hdbReadOnly float
|
hmakescript /instrument/detector/preset "banana preset" hdbReadOnly float
|
||||||
hsetprop /dmc/detector/preset priv internal
|
hsetprop /instrument/detector/preset priv internal
|
||||||
hmakescript /dmc/detector/countmode "counter getmode" hdbReadOnly text
|
hmakescript /instrument/detector/countmode "banana countmode" hdbReadOnly text
|
||||||
hsetprop /dmc/detector/countmode priv internal
|
hsetprop /instrument/detector/countmode priv internal
|
||||||
sicspoll add /dmc/detector/preset hdb 30
|
sicspoll add /instrument/detector/preset hdb 30
|
||||||
sicspoll add /dmc/detector/countmode hdb 30
|
sicspoll add /instrument/detector/countmode hdb 30
|
||||||
|
hmake /instrument/detector/count_time internal float
|
||||||
|
hattach /instrument/detector/count_time counter -1
|
||||||
#------------ commands
|
#------------ commands
|
||||||
hmake /commands spy none
|
hmake /commands spy none
|
||||||
hcommand /commands/count count
|
hcommand /commands/count count
|
||||||
hsetprop /commands/count type command
|
hsetprop /commands/count type command
|
||||||
|
hsetprop /commands/count priv user
|
||||||
hmake /commands/count/mode user text
|
hmake /commands/count/mode user text
|
||||||
|
hsetprop /commands/count/mode values "monitor,timer"
|
||||||
hmake /commands/count/preset user float
|
hmake /commands/count/preset user float
|
||||||
hset /commands/count/preset 5
|
hset /commands/count/preset 60000
|
||||||
hset /commands/count/mode timer
|
hset /commands/count/mode monitor
|
||||||
|
hcommand /commands/killfile killfile
|
||||||
|
hsetprop /commands/killfile type command
|
||||||
|
hsetprop /commands/killfile priv manager
|
||||||
|
|
||||||
|
#------------- scan command
|
||||||
|
hcommand /commands/scan hdbscan
|
||||||
|
hsetprop /commands/scan type command
|
||||||
|
hsetprop /commands/scan priv user
|
||||||
|
hmake /commands/scan/scan_variables user text
|
||||||
|
hsetprop /commands/scan/scan_variables argtype drivable
|
||||||
|
hmake /commands/scan/scan_start user text
|
||||||
|
hmake /commands/scan/scan_increments user text
|
||||||
|
hmake /commands/scan/NP user int
|
||||||
|
hmake /commands/scan/mode user text
|
||||||
|
hsetprop /commands/scan/mode values "timer,monitor"
|
||||||
|
hmake /commands/scan/preset user float
|
||||||
|
hset /commands/scan/mode timer
|
||||||
|
hset /commands/scan/scan_start 2.
|
||||||
|
hset /commands/scan/scan_increments .3
|
||||||
|
hset /commands/scan/NP 25
|
||||||
|
hset /commands/scan/preset 2
|
||||||
|
|
||||||
#---------------- graphics
|
#---------------- graphics
|
||||||
hmake /Graphics spy none
|
hmake /graphics spy none
|
||||||
hmake /Graphics/powder_diagram spy none
|
hmake /graphics/powder_diagram spy none
|
||||||
hsetprop /Graphics/powder_diagram type graphdata
|
hsetprop /graphics/powder_diagram type graphdata
|
||||||
hsetprop /Graphics/powder_diagram viewer default
|
hsetprop /graphics/powder_diagram viewer default
|
||||||
hmake /Graphics/powder_diagram/rank internal int
|
hmake /graphics/powder_diagram/rank internal int
|
||||||
hset /Graphics/powder_diagram/rank 1
|
hset /graphics/powder_diagram/rank 1
|
||||||
hmake /Graphics/powder_diagram/dim internal intar 1
|
hmake /graphics/powder_diagram/dim internal intar 1
|
||||||
hset /Graphics/powder_diagram/dim 400
|
hset /graphics/powder_diagram/dim 400
|
||||||
hmakescript /Graphics/powder_diagram/two_theta maketwotheta hdbReadOnly floatar 400
|
hmakescript /graphics/powder_diagram/two_theta maketwotheta hdbReadOnly floatar 400
|
||||||
sicspoll add /Graphics/powder_diagram/two_theta hdb 30
|
hchain /graphics/powder_diagram/two_theta /instrument/detector/two_theta
|
||||||
hsetprop /Graphics/powder_diagram/two_theta type axis
|
hsetprop /graphics/powder_diagram/two_theta type axis
|
||||||
hsetprop /Graphics/powder_diagram/two_theta dim 0
|
hsetprop /graphics/powder_diagram/two_theta transfer zip
|
||||||
hattach /Graphics/powder_diagram banana counts
|
hsetprop /graphics/powder_diagram/two_theta dim 0
|
||||||
hsetprop /Graphics/powder_diagram/counts type data
|
hattach /graphics/powder_diagram banana counts
|
||||||
hsetprop /Graphics/powder_diagram/counts priv internal
|
hsetprop /graphics/powder_diagram/counts type data
|
||||||
sicspoll add /Graphics/powder_diagram/counts hdb 60
|
hsetprop /graphics/powder_diagram/counts transfer zip
|
||||||
|
hsetprop /graphics/powder_diagram/counts priv internal
|
||||||
|
sicspoll add /graphics/powder_diagram/counts hdb 60
|
||||||
|
|
||||||
|
hmake /graphics/scan_data spy none
|
||||||
|
hsetprop /graphics/scan_data type graphdata
|
||||||
|
hsetprop /graphics/scan_data viewer default
|
||||||
|
hmake /graphics/scan_data/rank mugger int
|
||||||
|
hset /graphics/scan_data/rank 1
|
||||||
|
hsetprop /graphics/scan_data/rank priv internal
|
||||||
|
hmakescript /graphics/scan_data/dim "xxxscan np" hdbReadOnly intar 1
|
||||||
|
hsetprop /graphics/scan_data/dim priv internal
|
||||||
|
hmakescript /graphics/scan_data/scan_variable "gethdbscanvardata 0" hdbReadOnly floatvarar 1
|
||||||
|
hsetprop /graphics/scan_data/scan_variable type axis
|
||||||
|
hsetprop /graphics/scan_data/scan_variable dim 0
|
||||||
|
hsetprop /graphics/scan_data/scan_variable transfer zip
|
||||||
|
hsetprop /graphics/scan_data/scan_variable priv internal
|
||||||
|
hmakescript /graphics/scan_data/counts "gethdbscancounts" hdbReadOnly intvarar 1
|
||||||
|
hsetprop /graphics/scan_data/counts type data
|
||||||
|
hsetprop /graphics/scan_data/counts transfer zip
|
||||||
|
hsetprop /graphics/scan_data/counts priv internal
|
||||||
|
|
||||||
|
hlink / hdbqueue batch
|
||||||
|
|
||||||
|
hmake /gui spy none
|
||||||
|
hmake /gui/status internal text
|
||||||
|
status hdbinterest /gui/status
|
||||||
|
|
||||||
restore
|
restore
|
||||||
|
|
||||||
|
@ -18,10 +18,14 @@ if { [info exists vdmcinit] == 0 } {
|
|||||||
Publish wwwfilefornumber Spy
|
Publish wwwfilefornumber Spy
|
||||||
mcinstall
|
mcinstall
|
||||||
Publish gethm Spy
|
Publish gethm Spy
|
||||||
|
Publish hdbscan User
|
||||||
|
Publish hdbprepare User
|
||||||
|
Publish hdbcollect User
|
||||||
}
|
}
|
||||||
source $home/log.tcl
|
source $home/log.tcl
|
||||||
source $home/nxsupport.tcl
|
source $home/nxsupport.tcl
|
||||||
source $home/nxdmc.tcl
|
source $home/nxdmc.tcl
|
||||||
|
source $home/gumxml.tcl
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
proc SplitReply { text } {
|
proc SplitReply { text } {
|
||||||
set l [split $text =]
|
set l [split $text =]
|
||||||
@ -193,8 +197,17 @@ proc copydmcdataold { } {
|
|||||||
proc copydmcdata { } {
|
proc copydmcdata { } {
|
||||||
global home
|
global home
|
||||||
set mcversion "McStas 1.8 - Mar. 05, 2004"
|
set mcversion "McStas 1.8 - Mar. 05, 2004"
|
||||||
washsimfile $home/dmc.xml
|
#---- loop till the file can be opened
|
||||||
mcreader open $home/dmc.xml
|
for {set i 0} {$i < 20} {incr i} {
|
||||||
|
washsimfile $home/dmc.xml
|
||||||
|
set stat [catch {mcreader open $home/dmc.xml} msg]
|
||||||
|
if {$stat == 0} {
|
||||||
|
break
|
||||||
|
} else {
|
||||||
|
file copy -force $home/dmc.xml $home/brokenfile.xml
|
||||||
|
wait 1
|
||||||
|
}
|
||||||
|
}
|
||||||
mcreader insertmon \
|
mcreader insertmon \
|
||||||
"/$mcversion/DMC_diff/dmc.xml/PSD_sample/values" \
|
"/$mcversion/DMC_diff/dmc.xml/PSD_sample/values" \
|
||||||
counter 1 [expr 1./350]
|
counter 1 [expr 1./350]
|
||||||
@ -260,6 +273,7 @@ proc count { {mode NULL } { preset NULL } } {
|
|||||||
#------- count
|
#------- count
|
||||||
banana InitVal 0
|
banana InitVal 0
|
||||||
wait 1
|
wait 1
|
||||||
|
hupdate /graphics/powder_diagram/counts
|
||||||
banana count
|
banana count
|
||||||
set ret [catch {Success} msg]
|
set ret [catch {Success} msg]
|
||||||
#------- StoreData
|
#------- StoreData
|
||||||
@ -395,5 +409,65 @@ proc wwwfilefornumber {num} {
|
|||||||
proc gethm {} {
|
proc gethm {} {
|
||||||
banana uuget 0
|
banana uuget 0
|
||||||
}
|
}
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
proc hdbscan {scanvars scanstart scanincr np mode preset} {
|
||||||
|
xxxscan clear
|
||||||
|
xxxscan configure script
|
||||||
|
xxxscan function prepare hdbprepare
|
||||||
|
xxxscan function collect hdbcollect
|
||||||
|
set varlist [split $scanvars ,]
|
||||||
|
set startlist [split $scanstart ,]
|
||||||
|
set incrlist [split $scanincr ,]
|
||||||
|
set count 0
|
||||||
|
foreach var $varlist {
|
||||||
|
if {[string first / $var] >= 0} {
|
||||||
|
set var [string trim [SplitReply [hgetprop $var sicsdev]]]
|
||||||
|
}
|
||||||
|
xxxscan add $var [lindex $startlist $count] [lindex $incrlist $count]
|
||||||
|
incr count
|
||||||
|
}
|
||||||
|
set status [catch {xxxscan run $np $mode $preset} msg]
|
||||||
|
if {$status == 0} {
|
||||||
|
return $msg
|
||||||
|
} else {
|
||||||
|
error $msg
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
proc hdbprepare {obj userdata } {
|
||||||
|
stdscan prepare $obj userdata
|
||||||
|
hupdate /graphics/scan_data/dim
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
proc hdbcollect {obj userobj np} {
|
||||||
|
stdscan collect $obj $userobj $np
|
||||||
|
hupdate /graphics/scan_data/scan_variable
|
||||||
|
hupdate /graphics/scan_data/counts
|
||||||
|
}
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
proc gethdbscanvardata {no} {
|
||||||
|
set np [string trim [SplitReply [xxxscan np]]]
|
||||||
|
if {$np == 0} {
|
||||||
|
return ".0 .0 .0"
|
||||||
|
}
|
||||||
|
set status [catch {SplitReply [xxxscan getvardata $no]} txt]
|
||||||
|
if {$status == 0} {
|
||||||
|
return [join $txt]
|
||||||
|
} else {
|
||||||
|
return ".0 .0 .0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
proc gethdbscancounts {} {
|
||||||
|
set np [string trim [SplitReply [xxxscan np]]]
|
||||||
|
if {$np == 0} {
|
||||||
|
return "0 0 0"
|
||||||
|
}
|
||||||
|
set status [catch {SplitReply [xxxscan getcounts]} txt]
|
||||||
|
if {$status == 0} {
|
||||||
|
return [join $txt]
|
||||||
|
} else {
|
||||||
|
return "0 0 0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ omegam InterruptMode 0.000000
|
|||||||
omegam precision 0.010000
|
omegam precision 0.010000
|
||||||
omegam ignorefault 0.000000
|
omegam ignorefault 0.000000
|
||||||
omegam AccessCode 2.000000
|
omegam AccessCode 2.000000
|
||||||
|
omegam failafter 3.000000
|
||||||
|
omegam maxretry 3.000000
|
||||||
omegam movecount 10.000000
|
omegam movecount 10.000000
|
||||||
# Motor twothetam
|
# Motor twothetam
|
||||||
twothetam sign 1.000000
|
twothetam sign 1.000000
|
||||||
@ -21,6 +23,8 @@ twothetam InterruptMode 0.000000
|
|||||||
twothetam precision 0.010000
|
twothetam precision 0.010000
|
||||||
twothetam ignorefault 0.000000
|
twothetam ignorefault 0.000000
|
||||||
twothetam AccessCode 2.000000
|
twothetam AccessCode 2.000000
|
||||||
|
twothetam failafter 3.000000
|
||||||
|
twothetam maxretry 3.000000
|
||||||
twothetam movecount 10.000000
|
twothetam movecount 10.000000
|
||||||
# Motor monox
|
# Motor monox
|
||||||
monox sign 1.000000
|
monox sign 1.000000
|
||||||
@ -32,6 +36,8 @@ monox InterruptMode 0.000000
|
|||||||
monox precision 0.010000
|
monox precision 0.010000
|
||||||
monox ignorefault 0.000000
|
monox ignorefault 0.000000
|
||||||
monox AccessCode 2.000000
|
monox AccessCode 2.000000
|
||||||
|
monox failafter 3.000000
|
||||||
|
monox maxretry 3.000000
|
||||||
monox movecount 10.000000
|
monox movecount 10.000000
|
||||||
# Motor monoy
|
# Motor monoy
|
||||||
monoy sign 1.000000
|
monoy sign 1.000000
|
||||||
@ -43,6 +49,8 @@ monoy InterruptMode 0.000000
|
|||||||
monoy precision 0.010000
|
monoy precision 0.010000
|
||||||
monoy ignorefault 0.000000
|
monoy ignorefault 0.000000
|
||||||
monoy AccessCode 2.000000
|
monoy AccessCode 2.000000
|
||||||
|
monoy failafter 3.000000
|
||||||
|
monoy maxretry 3.000000
|
||||||
monoy movecount 10.000000
|
monoy movecount 10.000000
|
||||||
# Motor curvem
|
# Motor curvem
|
||||||
curvem sign 1.000000
|
curvem sign 1.000000
|
||||||
@ -54,6 +62,8 @@ curvem InterruptMode 0.000000
|
|||||||
curvem precision 0.010000
|
curvem precision 0.010000
|
||||||
curvem ignorefault 0.000000
|
curvem ignorefault 0.000000
|
||||||
curvem AccessCode 2.000000
|
curvem AccessCode 2.000000
|
||||||
|
curvem failafter 3.000000
|
||||||
|
curvem maxretry 3.000000
|
||||||
curvem movecount 10.000000
|
curvem movecount 10.000000
|
||||||
# Motor monophi
|
# Motor monophi
|
||||||
monophi sign 1.000000
|
monophi sign 1.000000
|
||||||
@ -65,6 +75,8 @@ monophi InterruptMode 0.000000
|
|||||||
monophi precision 0.010000
|
monophi precision 0.010000
|
||||||
monophi ignorefault 0.000000
|
monophi ignorefault 0.000000
|
||||||
monophi AccessCode 2.000000
|
monophi AccessCode 2.000000
|
||||||
|
monophi failafter 3.000000
|
||||||
|
monophi maxretry 3.000000
|
||||||
monophi movecount 10.000000
|
monophi movecount 10.000000
|
||||||
# Motor monochi
|
# Motor monochi
|
||||||
monochi sign 1.000000
|
monochi sign 1.000000
|
||||||
@ -76,6 +88,8 @@ monochi InterruptMode 0.000000
|
|||||||
monochi precision 0.010000
|
monochi precision 0.010000
|
||||||
monochi ignorefault 0.000000
|
monochi ignorefault 0.000000
|
||||||
monochi AccessCode 2.000000
|
monochi AccessCode 2.000000
|
||||||
|
monochi failafter 3.000000
|
||||||
|
monochi maxretry 3.000000
|
||||||
monochi movecount 10.000000
|
monochi movecount 10.000000
|
||||||
# Motor table
|
# Motor table
|
||||||
table sign 1.000000
|
table sign 1.000000
|
||||||
@ -87,6 +101,8 @@ table InterruptMode 0.000000
|
|||||||
table precision 0.010000
|
table precision 0.010000
|
||||||
table ignorefault 0.000000
|
table ignorefault 0.000000
|
||||||
table AccessCode 2.000000
|
table AccessCode 2.000000
|
||||||
|
table failafter 3.000000
|
||||||
|
table maxretry 3.000000
|
||||||
table movecount 10.000000
|
table movecount 10.000000
|
||||||
# Motor twothetad
|
# Motor twothetad
|
||||||
twothetad sign 1.000000
|
twothetad sign 1.000000
|
||||||
@ -98,12 +114,14 @@ twothetad InterruptMode 0.000000
|
|||||||
twothetad precision 0.010000
|
twothetad precision 0.010000
|
||||||
twothetad ignorefault 0.000000
|
twothetad ignorefault 0.000000
|
||||||
twothetad AccessCode 2.000000
|
twothetad AccessCode 2.000000
|
||||||
|
twothetad failafter 3.000000
|
||||||
|
twothetad maxretry 3.000000
|
||||||
twothetad movecount 10.000000
|
twothetad movecount 10.000000
|
||||||
# Counter counter
|
# Counter counter
|
||||||
counter SetPreset 30000000.000000
|
counter SetPreset 60000.000000
|
||||||
counter SetMode Monitor
|
counter SetMode Monitor
|
||||||
banana CountMode monitor
|
banana CountMode monitor
|
||||||
banana preset 300.000000
|
banana preset 60000.000000
|
||||||
# Motor a1
|
# Motor a1
|
||||||
a1 sign 1.000000
|
a1 sign 1.000000
|
||||||
a1 SoftZero 0.000000
|
a1 SoftZero 0.000000
|
||||||
@ -114,6 +132,8 @@ a1 InterruptMode 0.000000
|
|||||||
a1 precision 0.010000
|
a1 precision 0.010000
|
||||||
a1 ignorefault 0.000000
|
a1 ignorefault 0.000000
|
||||||
a1 AccessCode 2.000000
|
a1 AccessCode 2.000000
|
||||||
|
a1 failafter 3.000000
|
||||||
|
a1 maxretry 3.000000
|
||||||
a1 movecount 10.000000
|
a1 movecount 10.000000
|
||||||
# Motor a2
|
# Motor a2
|
||||||
a2 sign 1.000000
|
a2 sign 1.000000
|
||||||
@ -125,6 +145,8 @@ a2 InterruptMode 0.000000
|
|||||||
a2 precision 0.010000
|
a2 precision 0.010000
|
||||||
a2 ignorefault 0.000000
|
a2 ignorefault 0.000000
|
||||||
a2 AccessCode 2.000000
|
a2 AccessCode 2.000000
|
||||||
|
a2 failafter 3.000000
|
||||||
|
a2 maxretry 3.000000
|
||||||
a2 movecount 10.000000
|
a2 movecount 10.000000
|
||||||
# Motor a3
|
# Motor a3
|
||||||
a3 sign 1.000000
|
a3 sign 1.000000
|
||||||
@ -136,6 +158,8 @@ a3 InterruptMode 0.000000
|
|||||||
a3 precision 0.010000
|
a3 precision 0.010000
|
||||||
a3 ignorefault 0.000000
|
a3 ignorefault 0.000000
|
||||||
a3 AccessCode 2.000000
|
a3 AccessCode 2.000000
|
||||||
|
a3 failafter 3.000000
|
||||||
|
a3 maxretry 3.000000
|
||||||
a3 movecount 10.000000
|
a3 movecount 10.000000
|
||||||
# Motor a4
|
# Motor a4
|
||||||
a4 sign 1.000000
|
a4 sign 1.000000
|
||||||
@ -147,6 +171,8 @@ a4 InterruptMode 0.000000
|
|||||||
a4 precision 0.010000
|
a4 precision 0.010000
|
||||||
a4 ignorefault 0.000000
|
a4 ignorefault 0.000000
|
||||||
a4 AccessCode 2.000000
|
a4 AccessCode 2.000000
|
||||||
|
a4 failafter 3.000000
|
||||||
|
a4 maxretry 3.000000
|
||||||
a4 movecount 10.000000
|
a4 movecount 10.000000
|
||||||
# Motor a5
|
# Motor a5
|
||||||
a5 sign 1.000000
|
a5 sign 1.000000
|
||||||
@ -158,6 +184,8 @@ a5 InterruptMode 0.000000
|
|||||||
a5 precision 0.010000
|
a5 precision 0.010000
|
||||||
a5 ignorefault 0.000000
|
a5 ignorefault 0.000000
|
||||||
a5 AccessCode 2.000000
|
a5 AccessCode 2.000000
|
||||||
|
a5 failafter 3.000000
|
||||||
|
a5 maxretry 3.000000
|
||||||
a5 movecount 10.000000
|
a5 movecount 10.000000
|
||||||
# Motor a6
|
# Motor a6
|
||||||
a6 sign 1.000000
|
a6 sign 1.000000
|
||||||
@ -169,6 +197,8 @@ a6 InterruptMode 0.000000
|
|||||||
a6 precision 0.010000
|
a6 precision 0.010000
|
||||||
a6 ignorefault 0.000000
|
a6 ignorefault 0.000000
|
||||||
a6 AccessCode 2.000000
|
a6 AccessCode 2.000000
|
||||||
|
a6 failafter 3.000000
|
||||||
|
a6 maxretry 3.000000
|
||||||
a6 movecount 10.000000
|
a6 movecount 10.000000
|
||||||
# Motor a7
|
# Motor a7
|
||||||
a7 sign 1.000000
|
a7 sign 1.000000
|
||||||
@ -180,6 +210,8 @@ a7 InterruptMode 0.000000
|
|||||||
a7 precision 0.010000
|
a7 precision 0.010000
|
||||||
a7 ignorefault 0.000000
|
a7 ignorefault 0.000000
|
||||||
a7 AccessCode 2.000000
|
a7 AccessCode 2.000000
|
||||||
|
a7 failafter 3.000000
|
||||||
|
a7 maxretry 3.000000
|
||||||
a7 movecount 10.000000
|
a7 movecount 10.000000
|
||||||
# Motor a8
|
# Motor a8
|
||||||
a8 sign 1.000000
|
a8 sign 1.000000
|
||||||
@ -191,6 +223,8 @@ a8 InterruptMode 0.000000
|
|||||||
a8 precision 0.010000
|
a8 precision 0.010000
|
||||||
a8 ignorefault 0.000000
|
a8 ignorefault 0.000000
|
||||||
a8 AccessCode 2.000000
|
a8 AccessCode 2.000000
|
||||||
|
a8 failafter 3.000000
|
||||||
|
a8 maxretry 3.000000
|
||||||
a8 movecount 10.000000
|
a8 movecount 10.000000
|
||||||
# Motor a9
|
# Motor a9
|
||||||
a9 sign 1.000000
|
a9 sign 1.000000
|
||||||
@ -202,10 +236,12 @@ a9 InterruptMode 0.000000
|
|||||||
a9 precision 0.010000
|
a9 precision 0.010000
|
||||||
a9 ignorefault 0.000000
|
a9 ignorefault 0.000000
|
||||||
a9 AccessCode 2.000000
|
a9 AccessCode 2.000000
|
||||||
|
a9 failafter 3.000000
|
||||||
|
a9 maxretry 3.000000
|
||||||
a9 movecount 10.000000
|
a9 movecount 10.000000
|
||||||
title D3C in Senfsosse
|
title Lieselotte Nass
|
||||||
title setAccess 2
|
title setAccess 2
|
||||||
user UNKNOWN
|
user Lukas
|
||||||
user setAccess 2
|
user setAccess 2
|
||||||
collimation UNKNOWN
|
collimation UNKNOWN
|
||||||
collimation setAccess 2
|
collimation setAccess 2
|
||||||
@ -217,17 +253,25 @@ comment2 UNKNOWN
|
|||||||
comment2 setAccess 2
|
comment2 setAccess 2
|
||||||
comment3 UNKNOWN
|
comment3 UNKNOWN
|
||||||
comment3 setAccess 2
|
comment3 setAccess 2
|
||||||
starttime 2007-02-20 11:27:09
|
starttime 2007-08-14 15:30:24
|
||||||
starttime setAccess 2
|
starttime setAccess 2
|
||||||
adress UNKNOWN
|
adress 2223 Luketown, 33 Luke Drive
|
||||||
adress setAccess 2
|
adress setAccess 2
|
||||||
phone UNKNOWN
|
phone UNKNOWN
|
||||||
phone setAccess 2
|
phone setAccess 2
|
||||||
fax UNKNOWN
|
fax UNKNOWN
|
||||||
fax setAccess 2
|
fax setAccess 2
|
||||||
email UNKNOWN
|
email Luke@luke.ch
|
||||||
email setAccess 2
|
email setAccess 2
|
||||||
sample_mur 0.000000
|
sample_mur 0.000000
|
||||||
sample_mur setAccess 2
|
sample_mur setAccess 2
|
||||||
lastdatafile /afs/psi.ch/user/k/koennecke/src/workspace/sics/mcstas/dmc/000/vdmc2007n000133.xml
|
lastdatafile /afs/psi.ch/user/k/koennecke/src/workspace/sics/mcstas/dmc/000/vdmc2007n000187.xml
|
||||||
lastdatafile setAccess 2
|
lastdatafile setAccess 2
|
||||||
|
lastscancommand unknown scan
|
||||||
|
lastscancommand setAccess 2
|
||||||
|
# Counter lieselotte
|
||||||
|
lieselotte SetPreset 2.000000
|
||||||
|
lieselotte SetMode Timer
|
||||||
|
# Counter scancter
|
||||||
|
scancter SetPreset 2.000000
|
||||||
|
scancter SetMode Timer
|
||||||
|
Reference in New Issue
Block a user