Changeset 394


Ignore:
Timestamp:
Dec 4, 2009 5:05:26 PM (11 years ago)
Author:
toby
Message:

# on 2001/05/23 20:06:32, toby did:
Use TOF-min for default when reading TOF banks
for TOF banks default inst parameter set to match the TOF bank
add definition for gsas environment variable (lc) before running exptool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/addcmds.tcl

    • Property rcs:date changed from 2001/04/17 22:46:55 to 2001/05/23 20:06:32
    • Property rcs:lines changed from +76 -163 to +29 -3
    • Property rcs:rev changed from 1.19 to 1.20
    r383 r394  
    247247    grid [radiobutton $np.cb3 -text "D-min" -variable newhist(LimitMode) \
    248248            -value 0] -column 2 -row 5 -sticky w
    249     grid [radiobutton $np.cb4 -text "TOF/2-Theta Max" -variable newhist(LimitMode)\
     249    grid [radiobutton $np.cb4 -text "TOF-min\n2-Theta Max" \
     250            -variable newhist(LimitMode) -anchor w -justify l \
    250251            -value 1] -column 2 -row 6 -sticky w
    251252   
     
    400401            lappend newhist(banklist) $num
    401402            # compute last point
     403            set tmin 0
    402404            set tmax 0
    403405            catch {
    404406                scan $line "BANK%d%d%d%s%f%f" num nchan nrec rest start step
     407                set tmin [expr $start/100.]
    405408                set tmax [expr ($start + $step*($nchan-1))/100.]
    406409            }
     410            set newhist(tmin$num) $tmin
    407411            set newhist(tmax$num) $tmax
    408412        }
     
    451455    global newhist
    452456    set num $newhist(banknum)
    453     set newhist(2tLimit) $newhist(tmax$num)
     457    if {$newhist(insttype) == "TOF"} {
     458        set newhist(2tLimit) $newhist(tmin$num)
     459        if {[llength $newhist(banklist)] == $newhist(instbanks)} {
     460            set newhist(setnum) $newhist(banknum)
     461        }
     462    } else {
     463        set newhist(2tLimit) $newhist(tmax$num)
     464    }
    454465    set newhist(LimitMode) 1
     466
    455467}
    456468
     
    509521            set newhist(instbanks) \
    510522                    [string trim [string range $line 12 end]]
     523        }
     524        # scan for the INS   BANK line
     525        if {[string first "INS   HTYPE" $line] == 0} {
     526            if {[string index [lindex $line 2] 2] == "T"} {
     527                set newhist(insttype) TOF
     528            } elseif {[string index [lindex $line 2] 2] == "E"} {
     529                set newhist(insttype) ED
     530            } else {
     531                set newhist(insttype) CW
     532            }
    511533        }
    512534    }
     
    880902    # needed in UNIX
    881903    set env(ATOMDATA) [file join $expgui(gsasdir) data atmdata.dat]
     904    set env(gsas) [file nativename $expgui(gsasdir)]
    882905    # needed in Windows
    883906    set env(GSAS) [file nativename $expgui(gsasdir)]
     
    15751598    # needed in UNIX
    15761599    set env(ATOMDATA) [file join $expgui(gsasdir) data atmdata.dat]
     1600    set env(gsas) [file nativename $expgui(gsasdir)]
    15771601    # needed in Windows
    15781602    set env(GSAS) [file nativename $expgui(gsasdir)]
     
    16621686    }
    16631687}
     1688# default
     1689set newhist(insttype) CW
Note: See TracChangeset for help on using the changeset viewer.