Changeset 669 for trunk/liveplot


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

# on 2003/04/10 22:01:33, toby did:
change header
keep weights (for export)
use normalized data for BKGEDIT (fit is incorrect for TOF w/o)
allow export routines (for FOX)
allow 1,2,... keys to turn on phase tickmarks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/liveplot

    • Property rcs:date changed from 2002/10/31 17:28:17 to 2003/04/10 22:01:33
    • Property rcs:lines changed from +17 -11 to +29 -8
    • Property rcs:rev changed from 1.30 to 1.31
    r659 r669  
    1 #!/usr/local/bin/wish
     1#!/bin/sh
     2# the next line restarts this script using wish found in the path\
     3exec wish "$0" "$@"
     4# If this does not work, change the #!/usr/bin/wish line below
     5# to reflect the actual wish location and delete all preceeding lines
     6#
     7# (delete here and above)
     8#!/usr/bin/wish
    29# $Id$
    310set Revision {$Revision$ $Date$}
     
    3744
    3845# default values
     46set weightlist {}
    3947set graph(outname) out.ps
    4048set graph(outcmd) lpr
     
    6674    set peakinfo(obssize) 0.15
    6775    set graph(color_calc) pink
     76    set graph(yunits) 1
    6877} else {
    6978    set peakinfo(obssize) 1.0
     
    258267    global expgui expnam reflns
    259268    global lasthst
    260     global hst peakinfo xunits
     269    global hst peakinfo xunits weightlist
    261270    $box config -title "(Histogram update in progress)"
    262271    update
     
    287296    set bcklist {}
    288297    set xunits {}
     298    set weightlist {}
    289299    # define a list of reflection positions for each phase
    290300    for {set i 1} {$i < 10} {incr i} {
     
    349359proc readdata_tcl {box} {
    350360    global expgui expnam reflns
    351     global lasthst graph
     361    global lasthst graph weightlist
    352362    global hst peakinfo xunits yunits
    353363    $box config -title "(Histogram update in progress)"
     
    396406    refposvec set $refpos
    397407    diffvec set [obsvec - calcvec]
     408    set weightlist $WGT
    398409    if {$graph(chi2)} {
    399410        wifdvec set $WGT
     
    19441955
    19451956if {$program == "liveplot"} {
    1946     $box y2axis config -min 0 -title {Cumulative Chi Squared}
     1957    $box y2axis config -title {Cumulative Chi Squared}
     1958    catch {$box y2axis config -min 0}
    19471959} elseif {$program == "bkgedit"}  {
    19481960    eval $box element config 0 $graph(ElementHideOption)
     
    20092021.a.file.menu.export add command -label "as .csv file" \
    20102022        -command makecsvfile
    2011 
     2023# source additional export routines
     2024set filelist [glob -nocomplain [file join $expgui(scriptdir) liveplot_*.tcl]]
     2025foreach file $filelist {
     2026    if [catch {
     2027        source $file
     2028        .a.file.menu.export add command -label $label -command $action
     2029    } errmsg] {puts "error = $errmsg"}
     2030}
    20122031pack [menubutton .a.options -text Options -underline 0 -menu .a.options.menu] \
    20132032        -side left   
     
    22552274            -variable  peakinfo(flag$num) \
    22562275            -command plotdata
    2257     bind . <Key-$num> ".a.file.menu.tick invoke $num"
     2276    if {$program != "bkgedit"}  {
     2277        bind . <Key-$num> ".a.file.menu.tick invoke $num"
     2278    }
    22582279    .a.options.menu.tick add command -label "Phase $num opts" \
    22592280            -command "minioptionsbox $num"
Note: See TracChangeset for help on using the changeset viewer.