Changeset 1221 for branches/sandbox/export_drawxtl.tcl
- Timestamp:
- Sep 21, 2012 5:56:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/export_drawxtl.tcl
r1220 r1221 162 162 -command "$bx.f.canvas yview"] -sticky ns -row 3 -column 2 163 163 grid [button $bx.f.1.1 -text "Setup\nFourier" \ 164 -command EditFourier] -column 0 -row 0 164 -command {EditFourier $::expgui(export_phase); SetupFourierButtons} \ 165 ] -column 0 -row 0 165 166 grid [button [set ::DXTL(FourCompute) $bx.f.1.2] -text "Compute\nFourier" \ 166 167 -command {DXTLwritegrd $expgui(export_phase)}] -column 1 -row 0 … … 186 187 trace variable ::expgui(export_phase) w OnNewFourierPhase 187 188 OnNewFourierPhase 188 #SetupFourierButtons189 #return190 189 # this appears to be needed by OSX 191 190 ResizeWin .export … … 584 583 # and the files that are present 585 584 proc SetupFourierButtons {} { 586 set phase $::expgui(export_phase) 587 $::DXTL(FourCompute) config -state disabled 588 $::DXTL(AddContour) config -state disabled 589 $::DXTL(fmenu) delete 0 end 585 if {[catch { 586 set phase $::expgui(export_phase) 587 $::DXTL(FourCompute) config -state disabled 588 $::DXTL(AddContour) config -state disabled 589 $::DXTL(fmenu) delete 0 end 590 }]} return 590 591 set ::DXTL(mtype) "" 591 592 set ::DXTL(mfil) "" … … 619 620 incr i 620 621 } 621 }622 623 proc EditFourier {} {624 set phase $::expgui(export_phase)625 # check that all Fourier records are set to the current phase626 foreach i [listFourier] {627 set ph [Fourierinfo $i phase]628 if {$ph != $phase} {Fourierinfo $i phase set $phase}629 }630 # for now we will not offer access to section, (dmin, dmax not supported)631 set typelist {}632 foreach i [listFourier] {633 lappend typelist [Fourierinfo $i type]634 }635 set histlist [FourierHists $phase]636 set limits [getFourierLimits $phase]637 set box .export.fourier638 catch {destroy $box}639 toplevel $box640 grid [frame $box.1] -row 1 -column 1 -rowspan 10641 grid [frame $box.2] -row 1 -column 2 -rowspan 10642 grid [frame $box.b] -sticky news -row 11 -column 1 -columnspan 2643 grid columnconfigure $box.b 0 -weight 1644 grid columnconfigure $box.b 3 -weight 1645 grid [button $box.b.1 -text Continue \646 -command "set ::DXTL(quit) 0; destroy $box" \647 ] -row 1 -column 1648 grid [button $box.b.2 -text Quit \649 -command "set ::DXTL(quit) 1; destroy $box" \650 ] -row 1 -column 2651 652 # map type selection653 set row 0654 grid [label $box.1.$row -text "Select map type(s)"] -column 1 -row $row655 foreach typ {DELF FCLC FOBS 2FDF 3FDF 4FDF PTSN DPTS} lbl {656 "Difference Fourier" "Fcalc Fourier" "Fobs Fourier"657 "2*Fo-Fc Fourier" "3*Fo-2*Fc Fourier" "4*Fo-3*Fc Fourier" "Patterson map" "Delta-F Patterson"\658 } {659 incr row660 grid [ \661 checkbutton $box.1.$row -variable ::DXTL($typ) \662 -text "$lbl ($typ)" \663 ] -column 1 -row $row -sticky w664 if {[lsearch $typelist $typ] == -1} {665 set ::DXTL($typ) 0666 } else {667 set ::DXTL($typ) 1668 }669 }670 grid [label $box.2.a1 -text "Histogram(s) to be used\n(last superceeds)"] -column 1 -row 1671 grid [entry $box.2.a2 -textvariable ::DXTL(histlist) -width 20] -column 2 -row 1 -columnspan 3672 set ::DXTL(histlist) $histlist673 grid [label $box.2.m1 -text min] -column 2 -row 2674 grid [label $box.2.m2 -text max] -column 3 -row 2675 grid [label $box.2.m3 -text "map step\n(A)"] -column 4 -row 2676 set row 3677 foreach axis {X Y Z} lim [lrange $limits 1 end] step [lindex $limits 0] {678 incr row679 grid [label $box.2.0$axis -text "$axis limits"] -column 1 -row $row -sticky e680 grid [entry $box.2.min$axis -width 10 -textvariable ::DXTL(min$axis)] -column 2 -row $row681 grid [entry $box.2.max$axis -width 10 -textvariable ::DXTL(max$axis)] -column 3 -row $row682 grid [entry $box.2.step$axis -width 10 -textvariable ::DXTL(step$axis)] -column 4 -row $row683 set ::DXTL(min$axis) [lindex $lim 0]684 set ::DXTL(max$axis) [lindex $lim 1]685 set ::DXTL(step$axis) [format "%.4f" [expr {$step + 0.0001}]]686 }687 putontop $box688 tkwait window $box689 afterputontop690 if $::DXTL(quit) return691 delFourier692 foreach typ {DELF FCLC FOBS 2FDF 3FDF 4FDF PTSN DPTS} {693 if {$::DXTL($typ)} {694 addFourier $phase $typ695 }696 }697 FourierHists $phase set $::DXTL(histlist)698 setFourierLimits $phase \699 [list $::DXTL(stepX) $::DXTL(stepY) $::DXTL(stepZ)] \700 [list $::DXTL(minX) $::DXTL(maxX)] \701 [list $::DXTL(minY) $::DXTL(maxY)] \702 [list $::DXTL(minZ) $::DXTL(maxZ)]703 SetupFourierButtons704 incr ::expgui(changed)705 622 } 706 623
Note: See TracChangeset
for help on using the changeset viewer.