Changeset 483


Ignore:
Timestamp:
Dec 4, 2009 5:06:55 PM (14 years ago)
Author:
toby
Message:

# on 2001/11/07 18:12:46, toby did:
change filename to avoid liveplot conflict
catch error if nothing is read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/excledt.tcl

    • Property rcs:date changed from 2001/10/31 19:28:03 to 2001/11/07 18:12:46
    • Property rcs:lines changed from +776 -585 to +32 -30
    • Property rcs:rev changed from 1.5 to 1.6
    r475 r483  
    3131    # parse the output of a file
    3232    # use histdmp for histogram info
    33     set input [open histdump$hst.inp w]
     33    set input [open excl$hst.inp w]
    3434    puts $input "[file rootname [file tail $expgui(expfile)]]"
    3535    puts $input "L"
     
    3939    # use hstdmp without an experiment name so that output
    4040    # is not sent to the .LST file
    41     exec $expgui(gsasexe)/hstdmp < histdump$hst.inp > histdump$hst.out
    42     set input [open histdump$hst.out r]
    43     catch {file delete histdump$hst.inp}
     41    exec $expgui(gsasexe)/hstdmp < excl$hst.inp > excl$hst.out
     42    set input [open excl$hst.out r]
     43    catch {file delete excl$hst.inp}
    4444    # initalize arrays
    4545    set num -1
     
    9797        set graph(xcaption) Q
    9898    }
    99     catch {file delete histdump$hst.out}
    100     if {[llength $allxlist] > 0} {
    101         allxvec set $allxlist
    102         xvec set $xlist
    103         obsvec set $obslist
    104         calcvec set $calclist
    105         diffvec set [obsvec - calcvec]
    106         exxvec set $exclistx
    107         exobsvec set $exclistobs
    108         global obsvec calcvec diffvec
    109         set maxdiff  [set diffvec(max)]
    110         set cmin [set calcvec(min)]
    111         set omin [set obsvec(min)]
    112         set cmax [set calcvec(max)]
    113         set omax [set obsvec(max)]
    114         foreach {expgui(min) expgui(max)} {0 0} {}
    115         catch {
    116             set expgui(min) [expr $omin < $cmin ? $omin : $cmin]
    117             set expgui(max) [expr $omax > $cmax ? $omax : $cmax]
    118             set ymin1 [expr $cmin - 1.1*$maxdiff]
    119             set ymin2 [expr $omin - 1.1*$maxdiff]
    120             if {$ymin1 < $ymin2} {
    121                 diffvec set [diffvec + $ymin1]
    122             } {
    123                 diffvec set [diffvec + $ymin2]
     99    catch {file delete excl$hst.out}
     100    catch {
     101        if {[llength $allxlist] > 0} {
     102            allxvec set $allxlist
     103            xvec set $xlist
     104            obsvec set $obslist
     105            calcvec set $calclist
     106            diffvec set [obsvec - calcvec]
     107            exxvec set $exclistx
     108            exobsvec set $exclistobs
     109            global obsvec calcvec diffvec
     110            set maxdiff  [set diffvec(max)]
     111            set cmin [set calcvec(min)]
     112            set omin [set obsvec(min)]
     113            set cmax [set calcvec(max)]
     114            set omax [set obsvec(max)]
     115            foreach {expgui(min) expgui(max)} {0 0} {}
     116            catch {
     117                set expgui(min) [expr $omin < $cmin ? $omin : $cmin]
     118                set expgui(max) [expr $omax > $cmax ? $omax : $cmax]
     119                set ymin1 [expr $cmin - 1.1*$maxdiff]
     120                set ymin2 [expr $omin - 1.1*$maxdiff]
     121                if {$ymin1 < $ymin2} {
     122                    diffvec set [diffvec + $ymin1]
     123                } {
     124                    diffvec set [diffvec + $ymin2]
     125                }
    124126            }
    125127        }
Note: See TracChangeset for help on using the changeset viewer.