Changeset 1033
- Timestamp:
- Oct 27, 2010 9:08:37 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/expgui ¶
r1025 r1033 1864 1864 set expgui(backtermlbl) "" 1865 1865 set expgui(backtypelbl) "" 1866 set expgui(abstypelbl) "" 1866 1867 foreach var {bref bdamp absref absdamp} { 1867 1868 set entrycmd($var) "histinfo [list $histlist] $var" … … 1893 1894 set entrycmd($var) "histinfo $hist $var" 1894 1895 set entryvar($var) [eval $entrycmd($var)] 1896 } 1897 set abstype [histinfo $hist abstype] 1898 if {$abstype > 1} { 1899 set expgui(abstypelbl) " Model #$abstype, values: [histinfo $hist abscor1], [histinfo $hist abscor2]" 1900 } else { 1901 set expgui(abstypelbl) " Model #$abstype, value: [histinfo $hist abscor1]" 1895 1902 } 1896 1903 } … … 3299 3306 RecordMacroEntry "incr expgui(changed)" 0 3300 3307 destroy $top 3308 DisplayHistogram 3301 3309 } 3302 3310 … … 3911 3919 -row 2 -column 4 -sticky news -padx 4 -pady 3 -sticky e 3912 3920 # Absorption information. 3921 set expgui(abstypelbl) "" 3922 grid [label $expgui(absBox).lbl1 \ 3923 -textvariable expgui(abstypelbl)] \ 3924 -row 1 -column 1 -columnspan 5 -sticky nws 3913 3925 grid [label $expgui(absBox).rf1 -text " Refine Abs./Refl." ] \ 3914 -row 2 -column 1 -sticky news -padx 4-pady 33926 -row 2 -column 1 -sticky news -padx 2 -pady 3 3915 3927 grid [checkbutton $expgui(absBox).rf2 -text "" \ 3916 3928 -variable entryvar(absref) ] \ … … 3920 3932 tk_optionMenu $expgui(absBox).d2 entryvar(absdamp) 0 1 2 3 4 5 6 7 8 9 3921 3933 grid $expgui(absBox).d2 \ 3922 3934 -row 2 -column 4 -sticky news -padx 4 -pady 3 -sticky e 3923 3935 grid [button $expgui(absBox).edit -textvariable expgui(abslbl) \ 3924 -command editabsorption] \3925 -row 2 -column 5 -stickyw -padx 2 -pady 33936 -command editabsorption] \ 3937 -row 2 -column 5 -sticky nsw -padx 2 -pady 3 3926 3938 3927 3939 #^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^END OF HISTOGRAM PANE CODE ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ -
TabularUnified trunk/readexp.tcl ¶
r1025 r1033 1908 1908 } 1909 1909 abscor2-set { 1910 # can't use validreal as the decimal must be in col 20 1911 if {[catch { 1912 if {abs($value) < 99.99 && abs($value) > 1.e-4} { 1913 set tmp [format "%15.10f" $value] 1914 # make a final check of decimal 1915 if {[string range $tmp 4 4] != "."} { 1916 set tmp [format "%15.6E" $value] 1917 } 1918 } else { 1919 set tmp [format "%15.6E" $value] 1910 # this must have a decimal as the 5th character, so that we end up with a 1911 # decimal point in column 20. 1912 set tmp $value 1913 if ![validreal tmp 12 7] {return 0} 1914 set pos [string first "." $tmp] 1915 while {$pos < 4} { 1916 set tmp " $tmp" 1917 set pos [string first "." $tmp] 1918 } 1919 if {$pos == 4} { 1920 setexp "${key}ABSCOR" $tmp 16 15 1921 return 1922 } 1923 catch { 1924 set tmp [format "%12.6E" $value] 1925 set pos [string first "." $tmp] 1926 while {$pos < 4} { 1927 set tmp " $tmp" 1928 set pos [string first "." $tmp] 1920 1929 } 1921 }]} {return 0} 1922 setexp "${key}ABSCOR" $tmp 16 15 1930 if {$pos == 4} { 1931 setexp "${key}ABSCOR" $tmp 16 15 1932 return 1933 } 1934 } 1935 return 0 1923 1936 } 1924 1937 abstype-get {
Note: See TracChangeset
for help on using the changeset viewer.