mcaCalibrateEnergy
index
/usr/local/python/epics/mcaCalibrateEnergy.py

Creates a GUI window to calibrate energy for an Mca.
 
Author:         Mark Rivers
Created:        Sept. 18, 2002
Modifications:

 
Modules
            
BltPlot
CARSMath
Mca
Numeric
Xrf
copy
math
sys
tkMessageBox
_tkinter
 
Classes
            
mcaCalibrateEnergy
mcaCalibrateEnergy_widgets
 
class mcaCalibrateEnergy
       
   Methods defined here:
__init__(self, mca, command=None)
Creates a new GUI window for calibrating energy for an Mca object.
 
Inputs:
   mca:
      An Mca instance to be calibrated.  The Mca must have at least 2
      Regions of Interest (ROIs) defined for a linear calibration and
      2 ROIs defined for a quadratic calibration.
 
Keywords:
   command:
      A callback command that will be executed if the OK button on
      the GUI window is pressed.  The callback will be invoked as:
         command(exit_status)
      where exit_status is 1 if OK was pressed, and 0 if Cancel was
      pressed or the window was closed with the window manager.
 
Procedure:
   The calibration is done by determining the centroid position and
   energy of each ROI.
 
   The centroids positions are computed by fitting the
   ROI counts to a Gaussian, using CARSMath.fit_gaussian.
 
   The energy the ROI can be entered manually in the GUI window, or it
   can be determined automatically if the label of the ROI can be
   successfully used in Xrf.lookup_xrf_line() or Xrf.lookup_gamma_line().
 
   Each ROI can be selectively used or omitted when doing the calibration.
 
   The errors in the energy calibration and the FWHM of each ROI as a
   function of energy, can be plotted using BltPlot.
menu_centroid(self, roi)
 Private method
menu_do_fit(self)
 Private method
menu_energy(self, roi)
 Private method
menu_line(self, roi)
 Private method
menu_ok_cancel(self, button)
 Private method
menu_plot_calibration(self)
 Private method
menu_plot_fwhm(self)
 Private method
menu_use(self, value, roi)
 Private method

Data and non-method functions defined here:
__doc__ = None
__module__ = 'mcaCalibrateEnergy'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
class mcaCalibrateEnergy_widgets
       Private class
 
   Methods defined here:
__init__(self, nrois)

Data and non-method functions defined here:
__doc__ = ' Private class '
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'mcaCalibrateEnergy'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
Data
             ACTIVE = 'active'
ALL = 'all'
ANCHOR = 'anchor'
ARC = 'arc'
BASELINE = 'baseline'
BEVEL = 'bevel'
BOTH = 'both'
BOTTOM = 'bottom'
BROWSE = 'browse'
BUTT = 'butt'
CASCADE = 'cascade'
CENTER = 'center'
CHAR = 'char'
CHECKBUTTON = 'checkbutton'
CHORD = 'chord'
COMMAND = 'command'
CURRENT = 'current'
DISABLED = 'disabled'
E = 'e'
END = 'end'
EW = 'ew'
EXCEPTION = 8
EXTENDED = 'extended'
FALSE = 0
FIRST = 'first'
FLAT = 'flat'
GROOVE = 'groove'
HORIZONTAL = 'horizontal'
INSERT = 'insert'
INSIDE = 'inside'
LAST = 'last'
LEFT = 'left'
MITER = 'miter'
MOVETO = 'moveto'
MULTIPLE = 'multiple'
N = 'n'
NE = 'ne'
NO = 0
NONE = 'none'
NORMAL = 'normal'
NS = 'ns'
NSEW = 'nsew'
NUMERIC = 'numeric'
NW = 'nw'
OFF = 0
ON = 1
OUTSIDE = 'outside'
PAGES = 'pages'
PIESLICE = 'pieslice'
PROJECTING = 'projecting'
Pmw = <Pmw.Pmw_0_8_5.lib.PmwLoader.PmwLoader instance>
RADIOBUTTON = 'radiobutton'
RAISED = 'raised'
READABLE = 2
RIDGE = 'ridge'
RIGHT = 'right'
ROUND = 'round'
S = 's'
SCROLL = 'scroll'
SE = 'se'
SEL = 'sel'
SEL_FIRST = 'sel.first'
SEL_LAST = 'sel.last'
SEPARATOR = 'separator'
SINGLE = 'single'
SOLID = 'solid'
SUNKEN = 'sunken'
SW = 'sw'
StringTypes = (<type 'str'>, <type 'unicode'>)
TOP = 'top'
TRUE = 1
TclError = 'TclError'
TclVersion = 8.3000000000000007
TkVersion = 8.3000000000000007
UNITS = 'units'
VERTICAL = 'vertical'
W = 'w'
WORD = 'word'
WRITABLE = 4
X = 'x'
Y = 'y'
YES = 1
__file__ = './mcaCalibrateEnergy.pyc'
__name__ = 'mcaCalibrateEnergy'