- Timestamp:
- Dec 4, 2009 5:00:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 1999/09/09 19:05:54 to 1999/10/11 19:48:35
- Property rcs:lines changed from +3 -3 to +80 -48
- Property rcs:rev changed from 1.18 to 1.19
r100 r112 224 224 set entryvar(cycles) [expinfo cycles] 225 225 set entrycmd(cycles) "expinfo cycles" 226 set expgui(globalmode) 0226 # set expgui(globalmode) 0 227 227 set expgui(printopt) "Print Options ([expinfo print])" 228 228 set entryvar(title) [expinfo title] … … 304 304 set expgui(expfile) $newexpfile 305 305 catch {cd [string trim [file dirname $expgui(expfile)]]} 306 set expgui(globalmode) 0 306 307 loadexp $expgui(expfile) 307 308 … … 1078 1079 proc DisplayHistogram {} { 1079 1080 global expgui entrycmd entryvar expmap 1081 1082 # trap if more than one histogram is selected unless global mode 1083 if {$expgui(globalmode) == 0 && [llength $expgui(curhist)] > 1} { 1084 set expgui(curhist) [lindex $expgui(curhist) 0] 1085 } 1080 1086 1081 1087 # display the selected histograms … … 1447 1453 global expgui entrycmd entryvar expmap 1448 1454 1455 # trap if more than one histogram is selected unless global mode 1456 if {$expgui(globalmode) == 0 && [llength $expgui(curhist)] > 1} { 1457 set expgui(curhist) [lindex $expgui(curhist) 0] 1458 } 1459 1449 1460 # display the selected histograms 1450 1461 $expgui(fracFrame).hs.lbox selection clear 0 end … … 1577 1588 proc DisplayProfile {} { 1578 1589 global expgui entrycmd entryvar expmap 1590 1591 # trap if more than one histogram is selected unless global mode 1592 if {$expgui(globalmode) == 0 && [llength $expgui(curhist)] > 1} { 1593 set expgui(curhist) [lindex $expgui(curhist) 0] 1594 } 1595 # display the selected histograms 1579 1596 $expgui(profFrame).hs.lbox selection clear 0 end 1580 1597 foreach h $expgui(curhist) { … … 1660 1677 # disable traces on entryvar for right now 1661 1678 set entrycmd(trace) 0 1662 # loop through histograms & phases, set up an array by type1663 catch {unset p typearray histarray phasearray}1679 # loop through histograms & phases, set up an array by phase & profile type 1680 catch {unset prtyparray histarray phasearray} 1664 1681 foreach hist $histlist { 1665 foreach i $expmap(phaselist_$hist) { 1666 set ptype [string trim [hapinfo $hist $i proftype]] 1667 lappend ptypearray(${ptype}_$i) $hist 1668 lappend histarray($ptype) $hist 1669 lappend phasearray($ptype) $i 1682 foreach phase $expmap(phaselist_$hist) { 1683 set prtyp [string trim [hapinfo $hist $phase proftype]] 1684 set key ${prtyp}_$phase 1685 lappend prtyparray($key) $hist 1686 lappend histarray($key) $hist 1687 lappend phasearray($key) $phase 1670 1688 } 1671 1689 } 1672 1690 1673 1691 set ptype "" 1674 set title ""1675 set ind -11676 foreach key "[lsort [array names ptypearray]] 0_0"{1692 set i -1 1693 # loop over all combined phases and profile types, sorted 1st by profile number 1694 foreach key [lsort [array names prtyparray]] { 1677 1695 # split key 1678 scan $key %d_%d type p 1679 # 1st time through 1680 if {$ptype == ""} {set ptype $type} 1681 if {$ptype == $type} { 1682 # we've seen this one before 1683 if {$title != ""} {append title "\n"} 1684 append title "Phase $p, hist [CompressList $ptypearray($key)]" 1685 } else { 1686 set hist [lindex $histarray($ptype) 0] 1687 set phase [lindex $phasearray($ptype) 0] 1688 set nterms [hapinfo $hist $phase profterms] 1689 set htype [string range $expmap(htype_$hist) 2 2] 1696 scan $key %d_%d prftyp p 1697 1698 if {$ptype != $prftyp || !$expgui(globalphasemode)} { 1699 set ptype $prftyp 1700 set curhistlist $histarray($key) 1701 set curphaslist $phasearray($key) 1702 1703 set hist1 [lindex $curhistlist 0] 1704 set phase1 [lindex $curphaslist 0] 1705 set nterms [hapinfo $hist1 $phase1 profterms] 1706 set htype [string range $expmap(htype_$hist1) 2 2] 1690 1707 set lbls $expgui(prof-$htype-$ptype) 1691 set i $ptype 1692 # Create one frame for this type 1693 incr ind 1708 # for type 4, add extra terms depending on the cell type 1709 if {$ptype == 4} {set lbls [type4lbls $lbls $nterms $phase1]} 1710 # Create a frame for this type 1711 incr i 1712 set boxtitle "Phase $p, hist [CompressList $histarray($key)]" 1694 1713 grid [frame $expgui(ProfileBox).f.$i -relief groove -bd 4] \ 1695 -column 0 -row $i nd-sticky ew1714 -column 0 -row $i -sticky ew 1696 1715 grid [frame $expgui(ProfileBox).f.$i.0] \ 1697 1716 -column 0 -row 0 -columnspan 20 -sticky ew … … 1699 1718 -text "Profile Type $ptype "] -row 0 -column 0 1700 1719 grid [label $expgui(ProfileBox).f.$i.0.1 \ 1701 - text $title -anchor w] -row 0 -column 11720 -anchor w] -row 0 -column 1 1702 1721 grid [frame $expgui(ProfileBox).f.$i.1] \ 1703 1722 -column 0 -row 1 -columnspan 20 -sticky ew … … 1705 1724 -text "Damping"] -row 0 -column 2 1706 1725 tk_optionMenu $expgui(ProfileBox).f.$i.1.tkOptDamp \ 1707 entryvar(pdamp_$ptype) 0 1 2 3 4 5 6 7 8 9 1708 set entrycmd(pdamp_$ptype) "hapinfo \ 1709 [list $histarray($ptype)] \ 1710 [list $phasearray($ptype)] pdamp" 1711 set entryvar(pdamp_$ptype) [hapinfo $hist $phase pdamp] 1726 entryvar(pdamp_$i) 0 1 2 3 4 5 6 7 8 9 1712 1727 grid $expgui(ProfileBox).f.$i.1.tkOptDamp -row 0 -column 3 1713 1728 grid [button $expgui(ProfileBox).f.$i.1.edit \ 1714 -text "Global Edit" \ 1715 -command "EditProfile [list $title] \ 1716 [list $histarray($ptype)] [list $phasearray($ptype)] " \ 1717 ] -row 0 -column 4 -sticky w 1718 # for type 4, add extra terms depending on the cell type 1719 if {$ptype == 4} {set lbls [type4lbls $lbls $nterms $phase]} 1729 -text "Global Edit"] -row 0 -column 4 -sticky w 1730 set entryvar(pdamp_$i) [hapinfo $hist $phase pdamp] 1720 1731 set col -1 1721 1732 set row 2 … … 1725 1736 if {$term == ""} {set term $num} 1726 1737 incr col 1727 grid [label $expgui(ProfileBox).f.$i.l${num}_${i} -text "$term"]\1728 - row $row -column $col1738 grid [label $expgui(ProfileBox).f.$i.l${num}_${i} \ 1739 -text "$term"] -row $row -column $col 1729 1740 incr col 1730 1741 grid [checkbutton $expgui(ProfileBox).f.$i.ref${num}_${i} \ 1731 1742 -variable entryvar(pref${num}_$i)] \ 1732 1743 -row $row -column $col 1733 set entrycmd(pref${num}_$i) "hapinfo \1734 [list $histarray($ptype)] \1735 [list $phasearray($ptype)] pref$num"1736 1744 set entryvar(pref${num}_$i) [hapinfo $hist $phase pref$num] 1737 1745 if {$col > 10} {set col -1; incr row} 1738 1746 } 1739 1747 grid columnconfigure $expgui(ProfileBox).f 0 -weight 1 1740 set ptype "" 1748 } else { 1749 # add to the current entry 1750 eval lappend curhistlist $histarray($key) 1751 eval lappend curphaslist $phasearray($key) 1752 append boxtitle "\nPhase $p, hist [CompressList $histarray($key)]" 1753 } 1754 $expgui(ProfileBox).f.$i.0.1 config -text $boxtitle 1755 $expgui(ProfileBox).f.$i.1.edit config -command "\ 1756 EditProfile \"\n$boxtitle\" \ 1757 [list $curhistlist] \ 1758 [list $curphaslist]" 1759 set entrycmd(pdamp_$i) "hapinfo \ 1760 [list $curhistlist] \ 1761 [list $curphaslist] pdamp" 1762 for { set num 1 } { $num <= $nterms } { incr num } { 1763 set entrycmd(pref${num}_$i) "hapinfo \ 1764 [list $curhistlist] \ 1765 [list $curphaslist] pref$num" 1741 1766 } 1742 1767 } … … 2905 2930 -variable expgui(globalmode) -underline 0 -value 5 \ 2906 2931 -command sethistlist 2907 set expgui(globalmode) 0 2932 $expgui(fm).option.menu.editmode add separator 2933 $expgui(fm).option.menu.editmode add checkbutton \ 2934 -label "Group phases together" \ 2935 -variable expgui(globalphasemode) \ 2936 -command sethistlist 2937 2938 set expgui(globalmode) 0 2939 set expgui(globalphasemode) 1 2908 2940 2909 2941 if {$tcl_platform(platform) != "windows"} {
Note: See TracChangeset
for help on using the changeset viewer.