plot2d
index
/home/oxygen3/CHA/epics/extensions/lang/python/plot2d.py

 
Modules Used
       
AppShell
Tkinter
matplotlib
Numeric
os
string
sys
tkFileDialog
_tkinter

 
Classes
       
AppShell.AppShell(_Pmw.Pmw_1_2.lib.PmwBase.MegaWidget)
plot2d

 
class plot2d(AppShell.AppShell)
    
Method resolution order:
plot2d
AppShell.AppShell
_Pmw.Pmw_1_2.lib.PmwBase.MegaWidget
_Pmw.Pmw_1_2.lib.PmwBase.MegaArchetype

Methods defined here:
Print(self)
Print(self) - save current figure as plot2d.png and send to printPicture
addMoreMenuBar(self)
addMoreMenuBar(self) - create menubar user interface
captionOff(self)
captionOff(self) - toggle caption on or off
changeclim(self)
changeclim(self) - set image color limit
changeclimdone(self)
changeclimdone(self) - close image color limit dialog
changeclimreset(self)
changeclimreset(self) - reset to image default limit color
changeclimset(self)
changeclimset(self) - accept color limit and redraw image
changecmap(self)
changecmap(self) - call change color map dialog
changeinterp(self)
changeinterp(self) - pop up change interpolation dialog
closefigures(self)
closefigures(self) - close all matplotlib generated figures
closeup(self)
closeup(self) - close window and exit the plot2d program
closewin(self, event)
closewin(slef,event) - check for button 3 and close window
colorbar(self)
colorbar(self) - define colorbar region and draw colorbar
columnOn(self)
columnOn(self) - set text data in column or default row oriented
columndata(self)
columndata(self) - extract x,y vectors from column oriented text array
contourdone(self)
contourdone(self) - close contour setting dialog
createButtons(self)
createButtons(self) - create command buttons
createFields(self)
createFields(self) - create modifiable control fields for plot
createInterface(self)
createInterface(self) - plot2d object creation
displayAscii(self)
displayAscii(self) - pick and disply the text file
displayFile(self)
displayFile(self) - display picked text file and update fields
draw3dgraph(self)
draw3dgraph(self) - save image to pass to 3dgraph.py program
drawcaption(self)
drawcaption(self) - draw title, x and y labels if caption is desired
getcontour(self)
getcontour(self) - redraw contour with current contour setting
heading(self)
heading(self) - draw image vmin, vmax heading
helpinfo(self)
helpinfo(self) - display plot2d_help.txt with scrolled text
imageshow(self)
imageshow(self) - redraw image with specified interpolation method
initfields(self, x, y)
initfields(self,x,y) - initialize X,Y Index fields from x,y vectors
initfigure(self)
initfigure(self) - initialize new figure window for image plot
lineprofile(self, event)
lineprofile(slef,event) - draw line profiles at the mouse clicked cursor location of image area
message(self, text=None, nm=None)
message(self,text=None,nm=None) - display message info
text - specify message infomation
nm - specify function name where error occurs
panimage(self)
panimage(self) - generate panimage window for picked MDA file
pickDetector(self, event)
pickDetector(self,event) - use mouse event to select desired detector
pickFile(self)
pickFile(self) - dialog to pick a row  oriented text data file
pickLegpos(self)
pickLegpos(self) - dialog to pick legend position
pickMDAFile(self)
pickMDAFile(self) - dialog to pick a MDA file
pickPicture(self)
pickPicture(self) - invoke the Scrapbook python program for graphic picture file
printer(self)
printer(self) - dialog to set up printer
refreshimage(self)
refreshimage(self) - refresh image plot
removeAscii(self)
removeAscii(self) - remove all ascii file
report2D(self)
report2D(self) - generate 2D file for picked MDA file
report2D1D(self)
report2D1D(self) - generate 1D report from 2D MDA array
report2Drow(self)
report2D(self) - generate 2D row oriented ascii file for picked MDA file
reportALL(self)
reportALL(self) - generate all report for selected MDA directory
reportIGOR(self)
reportIGOR(self) - generate 2D IGOR file for picked MDA file
rowdata(self)
rowdata(self) - extract x,y vectors from row oriented text array
setXYrange(self)
setXYrange(self) - set X,Y coordinate ranges
setXYrangearray(self)
setXYrangarray(self) - set X,Y range array
setXYrangedone(self)
setXYrangedown(self) - close X, Y range diallog
setcolor(self)
setcolor(self) - set color from a set of radio button
setcolorfield(self)
setcolorfield(self) - set contour line color
setcolormap(self)
setcolormap(self) - set color map to picked new value
setcolormapclose(self)
setcolormapclose(self) - close setcolormap dialog
setcontour(self)
setcontour(self) - dialog to set up contour properties
setinterp(self)
setinterp(self) - redraw with picked interpolation method
setinterpclose(self)
setinterpclose(self) - close smoothing interpolation dialog
settitle(self)
settitle(self) - update the title of plot figure
setvlimit(self)
setvlimit(self) - set and update array vlim for plot figure
setxcid(self)
setxcid(self) - reset data as column array
setxlabel(self)
setxlabel(self) - update the xlabel of plot figure
setxlimit(self)
setxlimit(self) - set and update xlim for plot figure
setxrid(self)
setxrid(self) - reset data as row array
setylabel(self)
setylabel(self) - update the ylabel of plot figure
setylimit(self)
setylimit(self) - set and update ylim for plot figure
showDetector(self)
showDetector(self) - draw panimage and pick detector image
showPNG(self)
showPNG(self) - disply plot2d.png image if file exists
startup(self)
startup(self) - initialize variables at object plot2d creation
takeXslice(self)
takeXslice(self) - extract X slices from image array
takeXsliceall(self)
takeXsliceall(self) - plot all X slices
takeXsliceclose(self)
takeXsliceclose(self) - close X slice dialog
takeXsliceselect(self, ls)
takeXsliceselect(self,ls) - plot the entered vertical slices
takeXsliceset(self)
takeXsliceset(self) - accept and parse entered X slices
takeYslice(self)
takeYslice(self) - extract column  slices from image array
takeYsliceall(self)
takeYsliceall(self) - plot all Y slices
takeYsliceclose(self)
takeYsliceclose(self) - close Y slices dialog
takeYsliceselect(self, ls)
takeYsliceselect(self,ls) - plot entered horizontal curves in ls
takeYsliceset(self)
takeYsliceset(self) - accept and parse entered Y slices
toggleColorbar(self)
toggleColorbar(self) - toggle colorbar on the image plot
toggleLeg(self)
toggleLeg(self) - get default legend position
toggleLegclose(self)
toggleLegclose(self) - close toggle legend dialog
tvcontour(self)
tvcontour(self) - default contour plot
tvcontourf(self)
tvcontourf(self) - default filled contour plot
tvimage(self)
tvimage(self) - draw a new image window
tvimage1(self)
tvimage(self) - draw a new image window
tvimagehoriz(self)
tvimagehoriz(self) - draw image flip horizontally
tvimagetranspose(self)
tvimagetranspose(self) - draw a transposed new image window
tvimageupdown(self)
tvimageupdown(self) - draw image flip upside down

Data and other attributes defined here:
appname = '2D Array Image Data Plotter'
frameHeight = 450
frameWidth = 500
usecommandarea = 1

Methods inherited from AppShell.AppShell:
__init__(self, **kw)
appInit(self)
balloon(self)
bind(self, child, balloonHelpMsg, statusHelpMsg=None)
busyEnd(self)
busyStart(self, newcursor=None)
buttonAdd(self, buttonName, helpMessage=None, statusMessage=None, **kw)
buttonBox(self)
createMenuBar(self)
initializeTk(self, root)
interior(self)
main(self)
messageBar(self)
run(self)
showAbout(self)
toggleBalloon(self)
updateProgress(self, newValue=0, newMax=0)

Data and other attributes inherited from AppShell.AppShell:
appversion = '1.0'
balloonhelp = 1
busyCursor = 'watch'
contactemail = 'cha@aps.anl.gov'
contactname = 'Ben-chin K Cha'
contactphone = '(630) 252-8653'
copyright = 'ANL-APS-AOD-BCDA, All Rights Reserved.'
padx = 5
pady = 5

 
Functions
       
arange(...)
arange(start, stop=None, step=1, typecode=None)
 
 Just like range() except it returns an array whose type can be
specified by the keyword argument typecode.
array(...)
array(sequence, typecode=None, copy=1, savespace=0) will return a new array formed from the given (potentially nested) sequence with type given by typecode.  If no typecode is given, then the type will be determined as the minimum type required to hold the objects in sequence.  If copy is zero and sequence is already an array, a reference will be returned.  If savespace is nonzero, the new array will maintain its precision in operations.
arrayrange = arange(...)
arange(start, stop=None, step=1, typecode=None)
 
 Just like range() except it returns an array whose type can be
specified by the keyword argument typecode.
choose(...)
choose(a, (b1,b2,...))
cross_correlate(...)
cross_correlate(a,v, mode=0)
ct0()
ct0() - rainbow color map
ct1()
ct1() - rainbow + white color map
ct2()
ct1() - rainbow + black color map
fromstring(...)
fromstring(string, typecode='l', count=-1) returns a new 1d array initialized from
   the new binary data in string. If count is positive, the new array will have
   count elements, otherwise it's size is determined by the size of string.
message(root, text=None, nm=None, title=None)
message(root,text=None,nm=None) - display message info
title - specify message window title
text - specify message infomation
nm - specify function name where error occurs
minmax(y)
minmax(y) - return minimum, maximum of 2D array y
parsefloat(ll)
parsefloat(ll) - parse string ll and return a float list
parseint(ll)
parseint(ll) - parse string ll and return a int list
printPicture(fn, ptr='', size=None)
printPicture(fn,ptr='',size=None) - send PNG or JPEF picture file to pilprint.py
    ptr - specify desired printer to override the default printer
    size - (W,H) specifies the resize width and height of new print image
reshape(...)
reshape(a, (d1, d2, ..., dn)).  Change the shape of a to be an n-dimensions array
   with dimensions given by d1...dn. Note: the size specified to new array must be
   exactly equal to the size of the old one.
searchsorted = binarysearch(...)
binarysearch(a,v)
take(...)
take(a, indices, axis=0).  Selects the elements in indices from array a along the given axis.
zeros(...)
zeros((d1,...,dn),typecode='l',savespace=0) will return a new array
   of shape (d1,...,dn) and type typecode with all it's entries initialized
   to zero. If savespace is nonzero the array will be a spacesaver array.