Changeset 730
- Timestamp:
- Dec 4, 2009 5:11:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/instedit.tcl
- Property rcs:date changed from 2003/05/22 21:34:13 to 2003/08/11 19:28:27
- Property rcs:rev changed from 1.1 to 1.2
- Property rcs:lines set to +54 -54
r691 r730 17 17 grid [radiobutton $topfr.fr.$i -text $i -value $i \ 18 18 -command "instShowBank $box"\ 19 -variable instparms(bank)] -row $row -col $col19 -variable instparms(bank)] -row $row -column $col 20 20 if {[incr col] > 10} {set col 0; incr row} 21 21 } … … 159 159 grid [label $bnkfr.l1 -text "Bank #$b" -relief raised -bd 2 \ 160 160 -anchor w -justify left] \ 161 -col 0 -row 0 -columnspan 99 -sticky ew162 grid [label $bnkfr.l2 -text "Title: "] -col 0 -row 1 -sticky e161 -column 0 -row 0 -columnspan 99 -sticky ew 162 grid [label $bnkfr.l2 -text "Title: "] -column 0 -row 1 -sticky e 163 163 grid [entry $bnkfr.e2 -textvariable instdat(head$b) -width 60] \ 164 -col 1 -row 1 -sticky w -columnspan 99164 -column 1 -row 1 -sticky w -columnspan 99 165 165 166 166 grid [label $bnkfr.l3 -text "Instrument\nname: " -anchor e -justify r] \ 167 -col 0 -row 2 -sticky e167 -column 0 -row 2 -sticky e 168 168 grid [entry $bnkfr.e3 -textvariable instdat(name$b) -width 30] \ 169 -col 1 -row 2 -sticky w -columnspan 99169 -column 1 -row 2 -sticky w -columnspan 99 170 170 171 171 if {$instparms(banklabel) == "TOF"} return … … 174 174 set col 0 175 175 grid [label $bnkfr.l4a -text "Radiation\ntype:" -anchor e -justify r] \ 176 -col $col -row 4 -sticky e -rowspan 2176 -column $col -row 4 -sticky e -rowspan 2 177 177 set menu [tk_optionMenu $bnkfr.rad instparms(irad) " "] 178 178 $bnkfr.rad config -width 6 179 179 180 grid $bnkfr.rad -col [incr col] -row 4 -sticky w -rowspan 2180 grid $bnkfr.rad -column [incr col] -row 4 -sticky w -rowspan 2 181 181 grid [radiobutton $bnkfr.c4a -text Monochromatic \ 182 182 -command "disableWaveBoxes $bnkfr $b" \ 183 183 -variable instparms(wavemode) -value 1] \ 184 -col [incr col] -row 4 -sticky w184 -column [incr col] -row 4 -sticky w 185 185 grid [radiobutton $bnkfr.c4b -text Dual \ 186 186 -command "disableWaveBoxes $bnkfr $b" \ 187 187 -variable instparms(wavemode) -value 2] \ 188 -col $col -row 5 -sticky w188 -column $col -row 5 -sticky w 189 189 190 190 191 191 grid [label $bnkfr.l4 -text "Wavelength: "] \ 192 -col [incr col] -row 4 -sticky e -rowspan 2192 -column [incr col] -row 4 -sticky e -rowspan 2 193 193 grid [entry $bnkfr.e4d -textvariable instdat(difc$b) -width 10] \ 194 -col [incr col] -row 5 -sticky ew195 grid [label $bnkfr.l4d -text Primary] -col $col -row 4 -sticky ew194 -column [incr col] -row 5 -sticky ew 195 grid [label $bnkfr.l4d -text Primary] -column $col -row 4 -sticky ew 196 196 grid [entry $bnkfr.e4e -textvariable instdat(difa$b) -width 10] \ 197 -col [incr col] -row 5 -sticky ew198 grid [label $bnkfr.l4e -text Secondary] -col $col -row 4 -sticky ew197 -column [incr col] -row 5 -sticky ew 198 grid [label $bnkfr.l4e -text Secondary] -column $col -row 4 -sticky ew 199 199 grid [entry $bnkfr.e4f -textvariable instdat(kratio$b) -width 10] \ 200 -col [incr col] -row 5 -sticky ew201 grid [label $bnkfr.l4f -text ratio] -col $col -row 4 -sticky ew200 -column [incr col] -row 5 -sticky ew 201 grid [label $bnkfr.l4f -text ratio] -column $col -row 4 -sticky ew 202 202 203 203 set col 0 204 204 grid [label $bnkfr.l6 -text "Zero\nCorrection:" \ 205 205 -anchor e -justify r] \ 206 -col $col -row 6 -sticky e206 -column $col -row 6 -sticky e 207 207 grid [entry $bnkfr.e6 -textvariable instdat(zero$b) -width 10] \ 208 -col [incr col] -row 6 -sticky ew208 -column [incr col] -row 6 -sticky ew 209 209 210 210 set col 0 211 211 grid [label $bnkfr.l7 -text "Polarization\nCorrection:" \ 212 212 -anchor e -justify r] \ 213 -col $col -row 7 -sticky e213 -column $col -row 7 -sticky e 214 214 grid [radiobutton $bnkfr.c7a -text "Diffracted Beam" \ 215 215 -variable instdat(ipola$b) -value 0] \ 216 -col [incr col] -row 7 -sticky w216 -column [incr col] -row 7 -sticky w 217 217 grid [radiobutton $bnkfr.c7b -text "Incident Beam" \ 218 218 -variable instdat(ipola$b) -value 1] \ 219 -col [incr col] -row 7 -sticky w219 -column [incr col] -row 7 -sticky w 220 220 grid [radiobutton $bnkfr.c7c -text "None" \ 221 221 -variable instdatr(ipola$b) -value 2] \ 222 -col [incr col] -row 7 -sticky w222 -column [incr col] -row 7 -sticky w 223 223 grid [label $bnkfr.l7a -text "Polarization\nFraction:" \ 224 224 -anchor e -justify r] \ 225 -col [incr col] -row 7 -sticky e225 -column [incr col] -row 7 -sticky e 226 226 grid [entry $bnkfr.e7 -textvariable instdat(pola$b) -width 10] \ 227 -col [incr col] -row 7 -sticky ew227 -column [incr col] -row 7 -sticky ew 228 228 229 229 grid [frame [set prfrm $bnkfr.prof] -bd 2 -relief groove] \ 230 -col 0 -columnspan 99 -row 8231 grid [label $prfrm.l1 -text "Select profile: "] -col 0 -row 0232 grid [frame $prfrm.fr] -col 1 -columnspan 99 -row 0 -sticky w233 grid [frame $prfrm.fr1] -col 0 -columnspan 99 -row 2230 -column 0 -columnspan 99 -row 8 231 grid [label $prfrm.l1 -text "Select profile: "] -column 0 -row 0 232 grid [frame $prfrm.fr] -column 1 -columnspan 99 -row 0 -sticky w 233 grid [frame $prfrm.fr1] -column 0 -columnspan 99 -row 2 234 234 set instparms(profileframe) $prfrm.fr1 235 235 for {set j 1} {$j <= $instparms(proftypes${b})} {incr j} { 236 236 grid [radiobutton $prfrm.fr.$j -text $j -value $j \ 237 237 -command "ShowInstProfile $b" \ 238 -variable instparms(profilenum)] -row 1 -col $j238 -variable instparms(profilenum)] -row 1 -column $j 239 239 } 240 240 grid [button $prfrm.fr.a -text "Add profile" \ 241 -command "AddInstProfile $box $b"] -row 1 -col 98241 -command "AddInstProfile $box $b"] -row 1 -column 98 242 242 grid [button $prfrm.fr.n -text "Import profile" \ 243 -command "ImportInstProfile $box $prfrm.fr1 $b"] -row 1 -col 99243 -command "ImportInstProfile $box $prfrm.fr1 $b"] -row 1 -column 99 244 244 $menu delete 0 end 245 245 foreach lbl {Cr Fe Cu Mo Ag Other} \ … … 314 314 toplevel [set top $instparms(top).sel] 315 315 wm title $top "Select histogram and phase to select" 316 grid [label $top.l1 -text "Histogram: "] -col 1 -row 1316 grid [label $top.l1 -text "Histogram: "] -column 1 -row 1 317 317 set menu [tk_optionMenu $top.w instparms(histimport) ""] 318 318 $menu delete 0 end … … 345 345 } 346 346 } 347 grid $top.w -col 2 -row 1 -columnspan 2 -sticky w347 grid $top.w -column 2 -row 1 -columnspan 2 -sticky w 348 348 set instparms(histimport) [lindex $hlist 0] 349 grid [label $top.l2 -text "Phase: "] -col 1 -row 2349 grid [label $top.l2 -text "Phase: "] -column 1 -row 2 350 350 set col 1 351 351 foreach h {1 2 3 4 5 6 7 8 9} { 352 352 grid [radiobutton $top.r$h \ 353 353 -variable instparms(phaseimport) -value $h -text $h \ 354 ] -col [incr col] -row 2355 } 356 grid [frame $top.prof] -col 0 -columnspan 99 -row 3354 ] -column [incr col] -row 2 355 } 356 grid [frame $top.prof] -column 0 -columnspan 99 -row 3 357 357 grid [button $top.b1 -text Import -command "" -state disabled] \ 358 -col 0 -columnspan 2 -row 4358 -column 0 -columnspan 2 -row 4 359 359 grid [button $top.b2 -text Cancel -command "destroy $top"] \ 360 -col 2 -columnspan 2 -row 4360 -column 2 -columnspan 2 -row 4 361 361 362 362 # there a single histogram, select it … … 403 403 grid [label $frame.${col}_$row -justify left -anchor w \ 404 404 -text "Profile type $lbl"] \ 405 -col $col -row $row -columnspan 99 -sticky w405 -column $col -row $row -columnspan 99 -sticky w 406 406 incr row 407 407 set col 0 408 408 grid [label $frame.${col}_$row -text "Peak cutoff" -padx 4] \ 409 -col $col -row $row -sticky e409 -column $col -row $row -sticky e 410 410 incr col 411 411 grid [label $frame.${col}_$row -text "[lindex $proflist 2]" \ 412 412 -relief groove -bd 2 -padx 2] \ 413 -col $col -row $row -sticky ew413 -column $col -row $row -sticky ew 414 414 incr col 415 415 set N $num … … 423 423 if {$col > 6} {set col 0; incr row} 424 424 grid [label $frame.${col}_$row -text $lbl -padx 4] \ 425 -col $col -row $row -sticky e425 -column $col -row $row -sticky e 426 426 incr col 427 427 grid [label $frame.${col}_$row -text $val \ 428 428 -bd 2 -padx 2 -relief groove] \ 429 -col $col -row $row -sticky ew429 -column $col -row $row -sticky ew 430 430 incr col 431 431 } … … 471 471 set col 0 472 472 grid [label $frame.${col}_$row -text "Profile\ntype"] \ 473 -col $col -row $row473 -column $col -row $row 474 474 incr col 475 475 set menu [tk_optionMenu $frame.${col}_$row instdat(proftype${b}_$j) " "] 476 grid $frame.${col}_$row -col $col -row $row -sticky ew476 grid $frame.${col}_$row -column $col -row $row -sticky ew 477 477 $menu delete 0 end 478 478 foreach val { 1 2 3 4} \ … … 487 487 incr col 488 488 grid [label $frame.${col}_$row -text "Peak\ncutoff"] \ 489 -col $col -row $row489 -column $col -row $row 490 490 incr col 491 491 if [catch {set instdat(profcut${b}_$j)}] { … … 494 494 grid [entry $frame.${col}_$row -width 10 \ 495 495 -textvariable instdat(profcut${b}_$j)] \ 496 -col $col -row $row496 -column $col -row $row 497 497 incr row 498 498 set col 0 … … 507 507 if {$col > 6} {set col 0; incr row} 508 508 grid [label $frame.${col}_$row -text $lbl] \ 509 -col $col -row $row509 -column $col -row $row 510 510 incr col 511 511 if [catch {set instdat(prof${b}_${j}_$i)}] { … … 514 514 grid [entry $frame.${col}_$row -width 14 \ 515 515 -textvariable instdat(prof${b}_${j}_$i)] \ 516 -col $col -row $row516 -column $col -row $row 517 517 incr col 518 518 } … … 649 649 } 650 650 651 grid [frame $instparms(top).b1 -bd 2 -relief groove] -col 1 -row 1652 grid [frame $instparms(top).b1.a] -col 0 -row 0 -sticky ew653 grid [frame $instparms(top).b1.b] -col 0 -row 1 -sticky ew651 grid [frame $instparms(top).b1 -bd 2 -relief groove] -column 1 -row 1 652 grid [frame $instparms(top).b1.a] -column 0 -row 0 -sticky ew 653 grid [frame $instparms(top).b1.b] -column 0 -row 1 -sticky ew 654 654 655 655 instInit
Note: See TracChangeset
for help on using the changeset viewer.