Remove superfluous trailing white space from TCL files
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
#-------------------------------------------------------------------------
|
||||
# Functions for writing NeXus files for a triple axis spectrometer and
|
||||
# Functions for writing NeXus files for a triple axis spectrometer and
|
||||
# configuration of the internal scan object to support this.
|
||||
#
|
||||
# Mark Koennecke, May 2005
|
||||
# reworked to new NeXus standards, Mark Koennecke, February 2007
|
||||
#-----------------------------------------------------------------------
|
||||
catch {sicsdatafactory new __transfer}
|
||||
catch {sicsdatafactory new __transfer}
|
||||
set __tasdata(out) ""
|
||||
#----------------------------------------------------------------------
|
||||
proc appendMotor {np motor alias} {
|
||||
set val [tasSplit [$motor]]
|
||||
if { [string length $val] > 0} {
|
||||
__transfer putfloat 0 $val
|
||||
nxscript putslab $alias [list $np] [list 1] __transfer
|
||||
nxscript putslab $alias [list $np] [list 1] __transfer
|
||||
} else {
|
||||
clientput "WARNING: failed to read $motor"
|
||||
}
|
||||
@@ -33,22 +33,22 @@ proc appendIfPresent {np obj alias} {
|
||||
proc appendFloat {np alias val} {
|
||||
if {[string length $val] > 0} {
|
||||
__transfer putfloat 0 $val
|
||||
nxscript putslab $alias [list $np] [list 1] __transfer
|
||||
nxscript putslab $alias [list $np] [list 1] __transfer
|
||||
} else {
|
||||
clientput "WARNING: failed to read $alias"
|
||||
clientput "WARNING: failed to read $alias"
|
||||
}
|
||||
}
|
||||
#-------------------------------------------------------------------
|
||||
proc appendCount {np value alias} {
|
||||
__transfer putint 0 $value
|
||||
nxscript putslab $alias [list $np] [list 1] __transfer
|
||||
nxscript putslab $alias [list $np] [list 1] __transfer
|
||||
}
|
||||
#--------------------------------------------------------------------
|
||||
#--------------------------------------------------------------------
|
||||
proc donothing {obj userobj} {
|
||||
}
|
||||
#---------------------------------------------------------------------
|
||||
proc xmlprepare {obj userobj} {
|
||||
global __tasdata
|
||||
global __tasdata
|
||||
#------- normal prepare
|
||||
tasscan prepare $obj $userobj
|
||||
|
||||
@@ -92,24 +92,24 @@ proc xmlprepare {obj userobj} {
|
||||
#--------------------------------------------------------------------
|
||||
proc xmlwritepoint {obj userobj np} {
|
||||
global __tasdata scripthome
|
||||
|
||||
|
||||
nxscript reopen $__tasdata(file) $scripthome/tasub.dic
|
||||
|
||||
|
||||
append line [format " %3d" $np]
|
||||
set scanvars [split [tasSplit [iscan getscanvars]]]
|
||||
foreach var $scanvars {
|
||||
if { [string length $var] > 1} {
|
||||
set val [tasSplit [eval $var]]
|
||||
append line [format "%9.4f " [tasSplit [$var]]]
|
||||
appendMotor $np $var sc_$var
|
||||
append line [format "%9.4f " [tasSplit [$var]]]
|
||||
appendMotor $np $var sc_$var
|
||||
lappend storedvars $var
|
||||
}
|
||||
}
|
||||
foreach var $__tasdata(out) {
|
||||
append line [format "%9.4f " [tasSplit [eval $var]]]
|
||||
appendMotor $np $var sc_$var
|
||||
appendMotor $np $var sc_$var
|
||||
lappend storedvars $var
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -118,12 +118,12 @@ proc xmlwritepoint {obj userobj np} {
|
||||
append line [format "%8.2f " [tasSplit [counter gettime]]]
|
||||
append line [format "%8d " [tasSplit [counter getcounts]]]
|
||||
clientput $line
|
||||
|
||||
|
||||
appendCount $np [tasSplit [counter getcounts]] counts
|
||||
appendCount $np [tasSplit [counter getmonitor 1]] cter_01
|
||||
appendCount $np [tasSplit [counter getcounts]] cter_02
|
||||
appendFloat $np motime [tasSplit [counter gettime]]
|
||||
|
||||
appendFloat $np motime [tasSplit [counter gettime]]
|
||||
|
||||
set varlist [list qh qk ql qm en ei ef a1 a2 a3 a4 a5 a6 sgu sgl]
|
||||
|
||||
foreach var $varlist {
|
||||
@@ -131,11 +131,11 @@ proc xmlwritepoint {obj userobj np} {
|
||||
appendMotor $np $var sc_${var}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if {$np == 0} {
|
||||
makeTASLinks
|
||||
}
|
||||
|
||||
|
||||
nxscript close
|
||||
}
|
||||
#====================== actual XML stuff ============================
|
||||
@@ -144,7 +144,7 @@ proc writeUserData {} {
|
||||
writeTextVar usaff affiliation
|
||||
writeTextVar usadd address
|
||||
writeTextVar usmail email
|
||||
writeTextVar lonam local
|
||||
writeTextVar lonam local
|
||||
}
|
||||
#-------------------------------------------------------------------
|
||||
proc writeMonochromator {} {
|
||||
@@ -249,19 +249,19 @@ proc makeScanLinks {} {
|
||||
if {$testalias == 1} {
|
||||
nxscript putattribute $alias axis 1
|
||||
set axis 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
# if axis = 0 there is no alias; so we create something in here from the
|
||||
# scan data in iscan
|
||||
# if axis = 0 there is no alias; so we create something in here from the
|
||||
# scan data in iscan
|
||||
if {$axis == 0} {
|
||||
set data [tasSplit [iscan getvardata 0]]
|
||||
set count 0
|
||||
foreach e $data {
|
||||
set ar($count) [string trim $e]
|
||||
incr count
|
||||
}
|
||||
}
|
||||
nxscript putarray danascanvar ar [llength $data]
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ proc xmltaswrite {obj userobj} {
|
||||
|
||||
writeAnalyzer
|
||||
|
||||
writeDetector
|
||||
writeDetector
|
||||
|
||||
|
||||
nxscript close
|
||||
@@ -326,7 +326,7 @@ proc xmlpowderwrite {obj userobj} {
|
||||
|
||||
writeAnalyzer
|
||||
|
||||
writeDetector
|
||||
writeDetector
|
||||
|
||||
makePowderLinks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user