Changeset 453
- Timestamp:
- Dec 4, 2009 5:06:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/readexp.tcl
- Property rcs:date changed from 2001/09/04 22:57:16 to 2001/09/25 23:35:54
- Property rcs:lines changed from +11 -0 to +61 -7
- Property rcs:rev changed from 1.29 to 1.30
r429 r453 81 81 # =1 nuclear; 2 mag+nuc; 3 mag; 4 macro 82 82 # expmap(atomlist_$p) gives a list of defined atoms in phase $p 83 # expmap(htype_$n) gives the GSAS histogram type for histogram 84 # expmap(powderlist) gives a list of powder histograms 83 # expmap(htype_$n) gives the GSAS histogram type for histogram (all) 84 # expmap(powderlist) gives a list of powder histograms in use 85 85 # expmap(phaselist_$n) gives a list of phases used in histogram $n 86 # expmap(nhst) the number of GSAS histograms 86 87 # 87 88 proc mapexp {} { … … 127 128 } 128 129 # now get the histogram types 129 set nhist[string trim [readexp { EXPR NHST }]]130 set expmap(nhst) [string trim [readexp { EXPR NHST }]] 130 131 set n 0 131 132 set expmap(powderlist) {} 132 for {set i 0} {$i < $ nhist} {incr i} {133 for {set i 0} {$i < $expmap(nhst)} {incr i} { 133 134 set ihist [expr {$i + 1}] 134 135 if {[expr {$i % 12}] == 0} { … … 143 144 incr j 144 145 } 145 set expmap(htype_$ihist) [lindex $line $j] 146 set expmap(htype_$ihist) [string range $line [expr 2+5*$j] [expr 5*($j+1)]] 147 # is this a dummy histogram? 148 if {$ihist <=9} { 149 set key "HST $ihist DUMMY" 150 } else { 151 set key "HST $ihist DUMMY" 152 } 146 153 # at least for now, ignore non-powder histograms 147 154 if {[string range $expmap(htype_$ihist) 0 0] == "P" && \ 148 155 [string range $expmap(htype_$ihist) 3 3] != "*"} { 156 if {[existsexp $key]} { 157 set expmap(htype_$ihist) \ 158 [string replace $expmap(htype_$ihist) 3 3 D] 159 } 149 160 lappend expmap(powderlist) $ihist 150 161 } … … 967 978 # parm: 968 979 # title 980 # file -- file name of raw data for histogram (*) 969 981 # scale (*) 970 982 # sref/sdamp -- refinement flag/damping value for the scale factor (*) … … 993 1005 # excl -- excluded regions (*) 994 1006 # dmin -- minimum d-space for reflection generation (*) 1007 # use -- use flag; 1 = use; 0 = do not use (*) 1008 # dstart -- dummy histogram starting tmin/emin/2theta (*) 1009 # dstep -- dummy histogram step size tmin/emin/2theta (*) 1010 # dpoints -- dummy histogram number of points (*) 995 1011 proc histinfo {histlist parm "action get" "value {}"} { 996 1012 global expgui … … 1364 1380 if ![validreal value 10 4] {return 0} 1365 1381 setexp "${key} NREF" $value 6 10 1382 } 1383 use-get { 1384 set k [expr {($hist+11)/12}] 1385 set line [readexp " EXPR HTYP$k"] 1386 set j [expr {((($hist-1) % 12)+1)*5}] 1387 if {[string range $line $j $j] == "*"} {return 0} 1388 return 1 1389 } 1390 use-set { 1391 set k [expr {($hist+11)/12}] 1392 set line [readexp " EXPR HTYP$k"] 1393 set j [expr {((($hist-1) % 12)+1)*5+1}] 1394 if {$value} { 1395 setexp " EXPR HTYP$k" " " $j 1 1396 } else { 1397 setexp " EXPR HTYP$k" "*" $j 1 1398 } 1399 } 1400 dstart-get { 1401 return [string trim [string range [readexp "${key} DUMMY"] 20 29]] 1402 } 1403 dstart-set { 1404 if ![validreal value 10 3] {return 0} 1405 setexp "${key} DUMMY" $value 21 10 1406 } 1407 dstep-get { 1408 return [string trim [string range [readexp "${key} DUMMY"] 30 39]] 1409 } 1410 dstep-set { 1411 if ![validreal value 10 3] {return 0} 1412 setexp "${key} DUMMY" $value 31 10 1413 } 1414 dpoints-get { 1415 return [string trim [string range [readexp "${key} DUMMY"] 0 9]] 1416 } 1417 dpoints-set { 1418 if ![validint value 10] {return 0} 1419 setexp "${key} DUMMY" $value 1 10 1366 1420 } 1367 1421 default {
Note: See TracChangeset
for help on using the changeset viewer.