Changeset 1033


Ignore:
Timestamp:
Oct 27, 2010 9:08:37 PM (15 years ago)
Author:
toby
Message:

fix writing of abscor2 on all platforms; show abs cor on Histogram panel

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/expgui

    r1025 r1033  
    18641864        set expgui(backtermlbl) ""
    18651865        set expgui(backtypelbl) ""
     1866        set expgui(abstypelbl) ""
    18661867        foreach var {bref bdamp absref absdamp} {
    18671868            set entrycmd($var) "histinfo [list $histlist] $var"
     
    18931894            set entrycmd($var) "histinfo $hist $var"
    18941895            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]"
    18951902        }
    18961903    }
     
    32993306    RecordMacroEntry "incr expgui(changed)" 0
    33003307    destroy $top
     3308    DisplayHistogram
    33013309}
    33023310
     
    39113919            -row 2 -column 4 -sticky news -padx 4 -pady 3 -sticky e
    39123920    # 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
    39133925    grid [label $expgui(absBox).rf1 -text "  Refine Abs./Refl." ] \
    3914             -row 2 -column 1 -sticky news -padx 4 -pady 3
     3926            -row 2 -column 1 -sticky news -padx 2 -pady 3
    39153927    grid [checkbutton $expgui(absBox).rf2 -text "" \
    39163928            -variable  entryvar(absref) ] \
     
    39203932    tk_optionMenu $expgui(absBox).d2  entryvar(absdamp) 0 1 2 3 4 5 6 7 8 9
    39213933    grid $expgui(absBox).d2 \
    3922             -row 2 -column 4 -sticky news -padx 4 -pady 3 -sticky e
     3934        -row 2 -column 4 -sticky news -padx 4 -pady 3 -sticky e
    39233935    grid [button $expgui(absBox).edit -textvariable expgui(abslbl) \
    3924             -command editabsorption] \
    3925             -row 2 -column 5 -sticky w -padx 2 -pady 3
     3936              -command editabsorption] \
     3937        -row 2 -column 5 -sticky nsw -padx 2 -pady 3
    39263938
    39273939    #^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^END OF HISTOGRAM PANE CODE ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
  • TabularUnified trunk/readexp.tcl

    r1025 r1033  
    19081908            }
    19091909            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]
    19201929                    }
    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
    19231936            }
    19241937            abstype-get {
Note: See TracChangeset for help on using the changeset viewer.