Changeset 1162
- Timestamp:
- Aug 9, 2011 11:57:02 AM (9 years ago)
- Location:
- branches/sandbox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/liveplot
r1159 r1162 178 178 source [file join $expgui(scriptdir) readexp.tcl] 179 179 source [file join $expgui(scriptdir) opts.tcl] 180 #---------------------------------------------------------------- 181 # use EXPGUI directory for packages 182 lappend auto_path $expgui(scriptdir) 180 183 181 184 if {$program == "bkgedit"} { -
branches/sandbox/readexp.tcl
r1152 r1162 1393 1393 # absdamp -- damping for absorption refinement (*) 1394 1394 # absref -- refinement damping for absorption refinement (*) 1395 # proftbl -- returns number of profile table termns 1395 # proftbl -- returns number of profile table terms 1396 # anomff -- returns a list of elements, f' and f" 1396 1397 # parameters transferred from the instrument parameter file: 1397 1398 # ITYP -- returns the contents of the ITYP record … … 1982 1983 return $val 1983 1984 } 1985 anomff-get { 1986 set l {} 1987 foreach i {1 2 3 4 5 6 7 8 9} { 1988 if {![existsexp "${key}FFANS$i"]} continue 1989 set line [readexp "${key}FFANS$i"] 1990 set elem [string trim [string range $line 2 9]] 1991 set fp [string trim [string range $line 10 19]] 1992 set fpp [string trim [string range $line 20 29]] 1993 lappend l [list $elem $fp $fpp] 1994 } 1995 return $l 1996 } 1997 anomff-set { 1998 # match up input against elements in list. 1999 # change elements included, return any elements that are 2000 # not found. 2001 set errorlist {} 2002 foreach triplet $value { 2003 foreach {e fp fpp} $triplet {} 2004 foreach i {1 2 3 4 5 6 7 8 9} { 2005 if {![existsexp "${key}FFANS$i"]} continue 2006 # note that the element name is not used or validated 2007 set elem [string trim [string range \ 2008 [readexp "${key}FFANS$i"] 2 9]] 2009 if {[string match -nocase $e $elem]} { 2010 if ![validreal fp 10 3] {return 0} 2011 setexp "${key}FFANS$i" $fp 11 10 2012 if ![validreal fpp 10 3] {return 0} 2013 setexp "${key}FFANS$i" $fpp 21 10 2014 set e {} 2015 break 2016 } 2017 } 2018 if {$e != ""} { 2019 # oops, no match 2020 lappend errorlist $e 2021 } 2022 } 2023 if {$errorlist != ""} {return [list 0 $errorlist]} 2024 } 1984 2025 default { 1985 2026 set msg "Unsupported histinfo access: parm=$parm action=$action"
Note: See TracChangeset
for help on using the changeset viewer.