PyMcaCore Package

DataObject Module

class PyMca5.PyMcaCore.DataObject.DataObject[source]

Bases: object

Simple container of an array and associated information. Basically it has the members: info: A dictionnary data: An array, usually 2D, 3D, ...

In the past also incorporated selection methods. Now each different data source implements its selection methods.

Plotting routines may add additional members

x: A list containing arrays to be considered axes y: A list of data to be considered as signals m: A list containing the monitor data

GETDATA_DEPRECATION_WARNING = True
GETINFO_DEPRECATION_WARNING = True
SELECT_DEPRECATION_WARNING = True
getData()[source]

Deprecated method

getInfo()[source]

Deprecated method

select(selection=None)[source]

Deprecated method

EdfFileDataSource Module

PyMca5.PyMcaCore.EdfFileDataSource.DataSource(name='', source_type='EdfFile')[source]
class PyMca5.PyMcaCore.EdfFileDataSource.EdfFileDataSource(nameInput, fastedf=False)[source]

Bases: object

getDataObject(key, selection=None)[source]
selection: a dictionnary with the keys pos and size: (x), (x,y) or (x,y,z)
tuples defining a roi If not defined, takes full array
getKeyInfo(key)[source]
getSourceInfo()[source]

Returns information about the EdfFile object created by SetSource, to give application possibility to know about it before loading. Returns a dictionary with the key “KeyList” (list of all available keys in this source). Each element in “KeyList” has the form ‘n1.n2’ where n1 is the source number and n2 image number in file starting at 1.

isUpdated(sourceName, key)[source]
refresh()[source]

EdfFileLayer Module

class PyMca5.PyMcaCore.EdfFileLayer.EdfFileLayer(refresh_interval=None, info={}, fastedf=None)[source]

Bases: object

Specializes Data class in order to access Edf files. Interface: Data class interface.

AppendPage(info={}, array=None)[source]
GetPageArray(index=0)[source]

Returns page’s data (NumPy array) Parameters: index: Either an integer meaning the sequencial position of the page

or a dictionary that logically index the page based on keys of the page’s Info dictionary.
GetPageInfo(index={})[source]
GetPageListIndex(index)[source]

Converts a physical or logical index, into a physical one

GetSourceInfo(key=None)[source]

Returns information about the EdfFile object created by SetSource, to give application possibility to know about it before loading. Returns a dictionary with the keys “Size” (number of possible keys to this source) and “KeyList” (list of all available keys in this source). Each element in “KeyList” is an integer meaning the index of the array in the file.

LoadSource(key_list='ALL', append=0, invalidate=1, pos=None, size=None)[source]

Creates a given number of pages, getting data from the actual source (set by SetSource) Parameters: key_list: list of all keys to be read from source. It is a list of

keys, meaning the indexes to be read from the file. It can be also one integer, if only one array is to be read.
append: If non-zero appends to the end of page list.
Otherwise, initializes the page list
invalidate: if non-zero performas an invalidade call after
loading
pos and size: (x), (x,y) or (x,y,z) tuples defining a roi
If not defined, takes full array Stored in page’s info
LoadSourceSingle(key_list='ALL', append=0, invalidate=1, pos=None, size=None)[source]

Creates a given number of pages, getting data from the actual source (set by SetSource) Parameters: key_list: list of all keys to be read from source. It is a list of

keys, meaning the indexes to be read from the file. It can be also one integer, if only one array is to be read.
append: If non-zero appends to the end of page list.
Otherwise, initializes the page list
invalidate: if non-zero performas an invalidade call after
loading
pos and size: (x), (x,y) or (x,y,z) tuples defining a roi
If not defined, takes full array Stored in page’s info
SetSource(source_name=None, source_obj=None)[source]

Sets a new source for data retrieving, an edf file. If the file exists, self.Source will be the EdfFile object associated to this file. Parameters: source_name: name of the edf file

EventHandler Module

class PyMca5.PyMcaCore.EventHandler.Event[source]

Bases: object

class PyMca5.PyMcaCore.EventHandler.EventHandler[source]

Bases: object

create(fulleventstr, myid=None)[source]

Create the event. This call will take a full classname a.b.c and create the event calls and all the parent classes if necessary. It returns the eventclassobject which can be used to fire the event later. It is no error to create the class after registering for it, but it is an error to fire an event before creating it. Normally the event producer is responsible for creating it

dumpalltostr()[source]
dumptostr(fullname, cbflag=1)[source]
event(event, *args, **kw)[source]

Fire the event with arguments and keywords

getevents()[source]

return a list with name item tuples.

getfullevents()[source]

return a list with fully specified event names (a.b.c)

preparefastevents()[source]

calculate the callback functions for all possible events

register(fulleventstr, callback, myid=None, source=None)[source]

Register the event a.b.c with callback . You have to specify the full name of the event class as it might be created during this call. A later create call with the same event will just confirm this creation. You can specify an id for yourself and an id for the source you would like to listen to. The source restrictions are not yet implemented because of performance considerations.

unregister(fulleventstr, callback, myid=None)[source]

Unregister the callback from the eventclass a.b.c. The id has to be specified if it has been specified on registering the callback

class PyMca5.PyMcaCore.EventHandler.OneEvent(parent=None, event=None)[source]

Bases: object

PyMca5.PyMcaCore.EventHandler.test(eh=None)[source]

EventHandler class test function

HtmlIndex Module

class PyMca5.PyMcaCore.HtmlIndex.HtmlIndex(htmldir)[source]

Bases: object

buildIndex(directory=None)[source]
buildRecursiveIndex(directory=None)[source]
getBody(htmldir=None)[source]
getFooter()[source]
getHeader(addlink=None)[source]
isHtml(x)[source]
isHtmlDir(x)[source]

NexusDataSource Module

Plugin1DBase Module

A 1D plugin is a module that can be added to the PyMca 1D window in order to perform user defined operations of the plotted 1D data.

Plugins can be automatically installed provided they are in the appropriate place:

  • In the user home directory: ${HOME}/PyMca/plugins (POSIX systems)
  • In “My Documents\PyMca\plugins” (Windows)

A plugin inherit the Plugin1DBase.Plugin1DBase class and implement the methods:

  • getMethods
  • getMethodToolTip (optional but convenient)
  • getMethodPixmap (optional)
  • applyMethod

and modify the static module variable MENU_TEXT and the static module function getPlugin1DInstance according to the defined plugin.

These plugins will be compatible with any 1D-plot window that implements the Plot1D interface. The plot window interface is described in the Plot1DBase class.

The main items are reproduced here and can be directly accessed as plugin methods.

  • addCurve
  • getActiveCurve
  • getAllCurves
  • getGraphXLimits
  • getGraphYLimits
  • getGraphTitle
  • getGraphXLabel
  • getGraphXTitle
  • getGraphYLabel
  • getGraphYTitle
  • removeCurve
  • setActiveCurve
  • setGraphTitle
  • setGraphXLimits
  • setGraphYLimits
  • setGraphXLabel
  • setGraphYLabel
  • setGraphXTitle
  • setGraphYTitle

A simple plugin example, normalizing each curve to its maximum and vertically shifting the curves.

from PyMca5 import Plugin1DBase

class Shifting(Plugin1DBase.Plugin1DBase):
    def getMethods(self, plottype=None):
        return ["Shift"]

    def getMethodToolTip(self, methodName):
        if methodName != "Shift":
            raise InvalidArgument("Method %s not valid" % methodName)
        return "Subtract minimum and shift up by 100"

    def applyMethod(self, methodName):
        if methodName != "Shift":
            raise InvalidArgument("Method %s not valid" % methodName)
        allCurves = self.getAllCurves()
        increment = 0.1
        for i in range(len(allCurves)):
            x, y, legend, info = allCurves[i][:4]
            delta = float(y.max() - y.min())
            if delta < 1.0e-15:
                delta = 1.0
            y = (y - y.min())/delta + i * increment
            if i == len(allCurves):
                replot = True
            else:
                replot = False
            if i == 0:
                replace = True
            else:
                replace = False
            self.addCurve(x, y, legend=legend + " %.2f" % (i * increment),
                                info=info, replace=replace, replot=replot)
 
MENU_TEXT="Simple Shift Example"
def getPlugin1DInstance(plotWindow, **kw):
    ob = Shifting(plotWindow)
    return ob
class PyMca5.PyMcaCore.Plugin1DBase.Plugin1DBase(plotWindow, **kw)[source]

Bases: object

addCurve(x, y, legend=None, info=None, replace=False, replot=True, **kw)[source]

Add the 1D curve given by x an y to the graph.

Parameters:
  • x (list or numpy.ndarray) – The data corresponding to the x axis
  • y (list or numpy.ndarray) – The data corresponding to the y axis
  • legend (string or None) – The legend to be associated to the curve
  • info (dict or None) – Dictionary of information associated to the curve
  • replace (boolean default False) – Flag to indicate if already existing curves are to be deleted
  • replot (boolean default True) – Flag to indicate plot is to be immediately updated
  • **kw

    Additional keywords recognized by the plot window

applyMethod(name)[source]

The plugin is asked to apply the method associated to name.

getActiveCurve(just_legend=False)[source]
Parameters:just_legend (boolean) – Flag to specify the type of output required
Returns:legend of the active curve or list [x, y, legend, info]
Return type:string or list

Function to access the graph currently active curve. It returns None in case of not having an active curve.

Default output has the form:
xvalues, yvalues, legend, dict where dict is a dictionnary containing curve info. For the time being, only the plot labels associated to the curve are warranted to be present under the keys xlabel, ylabel.
If just_legend is True:
The legend of the active curve (or None) is returned.
getAllCurves(just_legend=False)[source]
Parameters:just_legend (boolean) – Flag to specify the type of output required
Returns:legend of the curves or list [[x, y, legend, info], ...]
Return type:list of strings or list of curves

It returns an empty list in case of not having any curve. If just_legend is False:

It returns a list of the form:
[[xvalues0, yvalues0, legend0, dict0],
[xvalues1, yvalues1, legend1, dict1], [...], [xvaluesn, yvaluesn, legendn, dictn]]

or just an empty list.

If just_legend is True:
It returns a list of the form:
[legend0, legend1, ..., legendn]

or just an empty list.

getGraphTitle()[source]
Returns:The graph title
Return type:string
getGraphXLabel()[source]
Returns:The graph X axis label
Return type:string
getGraphXLimits()[source]

Get the graph X limits.

Returns:Two floats with the X axis limits
getGraphXTitle()[source]
Returns:The graph X axis label
Return type:string
getGraphYLabel()[source]
Returns:The graph Y axis label
Return type:string
getGraphYLimits()[source]

Get the graph Y (left) limits.

Returns:Two floats with the Y (left) axis limits
getGraphYTitle()[source]
Returns:The graph Y axis label
Return type:string
getMethodPixmap(name)[source]
Parameters:name – The method for which a pixmap is asked
Return type:QPixmap or None
getMethodToolTip(name)[source]

Returns the help associated to the particular method name or None.

Parameters:name – The method for which a tooltip is asked
Return type:string
getMethods(plottype=None)[source]
Parameters:plottype – string or None for the case the plugin only support one type of plots. Implemented values “SCAN”, “MCA” or None
Returns:A list with the NAMES associated to the callable methods that are applicable to the specified type plot. The list can be empty.
Return type:list[string]
getMonotonicCurves()[source]

Convenience method that calls getAllCurves and makes sure that all of the X values are strictly increasing.

Returns:It returns a list of the form: [[xvalues0, yvalues0, legend0, dict0],
[xvalues1, yvalues1, legend1, dict1], [...], [xvaluesn, yvaluesn, legendn, dictn]]
removeCurve(legend, replot=True)[source]

Remove the curve associated to the supplied legend from the graph. The graph will be updated if replot is true.

Parameters:
  • legend (string or None) – The legend associated to the curve to be deleted
  • replot (boolean default True) – Flag to indicate plot is to be immediately updated
setActiveCurve(legend)[source]

Funtion to request the plot window to set the curve with the specified legend as the active curve.

Parameters:legend (string) – The legend associated to the curve
setGraphTitle(title)[source]
Parameters:title (string) – The title to be set
setGraphXLimits(xmin, xmax, replot=False)[source]

Set the graph X limits.

Parameters:
  • xmin (float) – minimum value of the axis
  • xmax (float) – minimum value of the axis
  • replot (boolean default False) – Flag to indicate plot is to be immediately updated
setGraphXTitle(title)[source]
Parameters:title (string) – The title to be associated to the X axis
setGraphYLimits(ymin, ymax, replot=False)[source]

Set the graph Y (left) limits.

Parameters:
  • ymin (float) – minimum value of the axis
  • ymax (float) – minimum value of the axis
  • replot (boolean default False) – Flag to indicate plot is to be immediately updated
setGraphYTitle(title)[source]
Parameters:title (string) – The title to be associated to the X axis
PyMca5.PyMcaCore.Plugin1DBase.getPlugin1DInstance(plotWindow, **kw)[source]

This function will be called by the plot window instantiating and calling the plugins. It passes itslef as first argument, but the default implementation of the base class only keeps a weak reference to prevent cirvular references.

PyMcaBatchBuildOutput Module

class PyMca5.PyMcaCore.PyMcaBatchBuildOutput.PyMcaBatchBuildOutput(inputdir=None, outputdir=None)[source]

Bases: object

buildOutput(inputdir=None, outputdir=None, delete=None)[source]
getIndexedFileList(filename, begin=None, end=None, skip=None, fileindex=0)[source]

PyMcaDirs Module

PyMcaMatplotlibSave Module

class PyMca5.PyMcaCore.PyMcaMatplotlibSave.PyMcaMatplotlibSave(size=(7, 3.5), logx=False, logy=False, legends=True, bw=False)[source]

Bases: matplotlib.backends.backend_agg.FigureCanvasAgg

addDataToPlot(x, y, legend=None, color=None, linewidth=None, linestyle=None, **kw)[source]
plotLegends()[source]
saveFile(filename, format=None)[source]
setLimits(xmin, xmax, ymin, ymax)[source]
setTitle(title)[source]
setXLabel(label)[source]
setYLabel(label)[source]
class PyMca5.PyMcaCore.PyMcaMatplotlibSave.PyMcaMatplotlibSaveImage(imageData=None, fileName=None, dpi=300, size=(5, 5), xaxis='off', yaxis='off', xlabel='', ylabel='', nxlabels=0, nylabels=0, colorbar=None, title='', interpolation='nearest', colormap=None, linlogcolormap='linear', origin='lower', contour='off', contourlabels='on', contourlabelformat='%.3f', contourlevels=10, contourlinewidth=10, xorigin=0.0, yorigin=0.0, xpixelsize=1.0, ypixelsize=1.0, xlimits=None, ylimits=None, vlimits=None, extent=None)[source]
saveImage(filename)[source]
setImage(image=None)[source]
setParameters(ddict)[source]
setPixmapImage(image=None, bgr=False)[source]

SPSLayer Module

class PyMca5.PyMcaCore.SPSLayer.SPSLayer(refresh_interval=None, info={})[source]

Bases: object

Specializes Data class to access Spec shared memory. Interface: Data class interface.

AppendPage(scan_info, scan_data)[source]
GetPageInfo(index={})[source]
GetSourceInfo(key=None)[source]

Returns information about the Spec version set by SetSource, to give application possibility to know about it before loading. Returns a dictionary with the keys “Size” (number of possible keys to this source) and “KeyList” (list of all available keys in this source). Each element in “KeyList” is an shared memory array name. If key is set as an array name, returns information about it.

LoadSource(key_list='ALL', append=0, invalidate=1, row='ALL', col='ALL')[source]

Creates a given number of pages, getting data from the actual source (set by SetSource) Parameters: key_list: list of all keys to be read from source. It is a list of

string, shared memory array names, to be read from the file. It can be also one single string, if only one array is to be read.
append: If non-zero appends to the end of page list.
Otherwise, initializes the page list
invalidate: if non-zero performas an invalidade call after
loading

row: If set to an integer, loads a single row (0-based indexed) col: If set to an integer, loads a single column (0-based indexed)

RefreshPage(sourcename, key)[source]
SetSource(source_name=None)[source]

Sets a new source for data retrieving, an spec version. If spec exists, self.Source will be this spec name. Parameters: source_name: name of spec version

SpecFileDataSource Module

PyMca5.PyMcaCore.SpecFileDataSource.DataSource(name='', source_type='SpecFile')[source]
class PyMca5.PyMcaCore.SpecFileDataSource.SpecFileDataSource(nameInput)[source]

Bases: object

Error = 'SpecFileDataError'
getDataObject(key, selection=None)[source]

Parameters: * key: key to be read from source. It is a string

using the following formats:
“s.o”: loads all counter values (s=scan number, o=order)
  • if ScanType==SCAN: in a 2D array (mot*cnts)
  • if ScanType==MESH: in a 3D array (mot1*mot2*cnts)
  • if ScanType==MCA: single MCA in 1D array (0:channels)
“s.o.n”: loads a single MCA in a 1D array (0:channels)
  • if ScanType==NMCA: n is the MCA number from 1 to N
  • if ScanType==SCAN+MCA: n is the scan point number (from 1)
  • if ScanType==MESH+MCA: n is the scan point number (from 1)
“s.o.p.n”: loads a single MCA in a 1D array (0:channels)
  • if ScanType==SCAN+NMCA:

    p is the point number in the scan n is the MCA device number

  • if ScanType==MESH+MCA:

    p is first motor index n is second motor index

“s.o.MCA”: loads all MCA in an array
  • if ScanType==SCAN+MCA: 2D array (pts*mca)

  • if ScanType==NMCA: 2D array (mca_det*mca)

  • if ScanType==MESH+MCA: 3D array (pts_mot1*pts_mot2*mca)

  • if ScanType==SCAN+NMCA: 3D array (pts_mot1*mca_det*mca)

  • if ScanType==MESH+NMCA:

    creates N data page, one for each MCA device, with a 3D array (pts_mot1*pts_mot2*mca)

getKeyInfo(key)[source]

If key given returns information of a perticular key.

getSourceInfo()[source]

Returns information about the specfile object created by the constructor to give application possibility to know about it before loading. Returns a dictionary with the key “KeyList” (list of all available keys in this source). Each element in “KeyList” has the form ‘n1.n2’ where n1 is the scan number and n2 the order number in file starting at 1.

isUpdated(sourceName, key)[source]
refresh()[source]

SpecFileLayer Module

class PyMca5.PyMcaCore.SpecFileLayer.SpecFileLayer(refresh_interval=None, info={})[source]

Bases: object

Specializes Data class to access Spec files. Interface: Data class interface.

AppendPage(scan_info, scan_data)[source]
Error = 'SpecFileDataError'
GetPageInfo(index={})[source]
GetSourceInfo(key=None)[source]

Returns information about the Specfile object created by SetSource, to give application possibility to know about it before loading. Returns a dictionary with the keys “Size” (number of possible keys(to this source) and “KeyList” (list of all available keys in this source). Each element in “KeyList” is an string in the format “x.y” where x is the number of scan and y is the order. “x.y” works as the key to retrieve the information of this scan. There’s also the key “NumMca” in the returned dictionary, which value is a list of numbers of mcas, for each value of “KeyList”. If key given returns information of a perticular key instead.

LoadSource(key_list='ALL', append=0, invalidate=1)[source]

Creates a given number of pages, getting data from the actual source (set by SetSource). Parameters: * key_list: list of all keys to be read from source. It is a list of strings

using the following formats:
“ALL”: creates one data page for each scan.
valid for ScanType==SCAN or MESH or MCA
“s.o”: loads all counter values (s=scan number, o=order)
  • if ScanType==SCAN: in a 2D array (mot*cnts)
  • if ScanType==MESH: in a 3D array (mot1*mot2*cnts)
  • if ScanType==MCA: single MCA in 1D array (0:channels)
“s.o.n”: loads a single MCA in a 1D array (0:channels)
  • if ScanType==NMCA: n is the MCA number from 1 to N
  • if ScanType==SCAN+MCA: n is the scan point number (from 1)
  • if ScanType==MESH+MCA: n is the scan point number (from 1)
“s.o.p.n”: loads a single MCA in a 1D array (0:channels)
  • if ScanType==SCAN+NMCA:

    p is the point number in the scan n is the MCA device number

  • NOT TRUE: Just follow previous. if ScanType==MESH+MCA:

    p is first motor index n is second motor index

“s.o.MCA”: loads all MCA in an array
  • if ScanType==SCAN+MCA: 2D array (pts*mca)

  • if ScanType==NMCA: 2D array (mca_det*mca)

  • if ScanType==MESH+MCA: 3D array (pts_mot1*pts_mot2*mca)

  • if ScanType==SCAN+NMCA: 3D array (pts_mot1*mca_det*mca)

  • if ScanType==MESH+NMCA:

    creates N data page, one for each MCA device, with a 3D array (pts_mot1*pts_mot2*mca)

  • append: if non-zero, appends to the end of the page list,

    Otherwise, initializes the page list

  • invalidate: if non-zero performs an invalidade call after loading

Refresh()[source]
RefreshPage(source_obj, self, page)[source]
SetSource(source_name=None, source_obj=None)[source]

Sets a new source for data retrieving, an specfile. If the file exists, self.Source will be the Specfile object associated to this file. Parameters: source_name: name of the specfile

SpsDataSource Module

PyMca5.PyMcaCore.SpsDataSource.DataSource(name='', object=None, copy=True, source_type='SPS')[source]
class PyMca5.PyMcaCore.SpsDataSource.SpsDataSource(name)[source]

Bases: object

getDataObject(key_list, selection=None)[source]
getKeyInfo(key)[source]
getSourceInfo()[source]

Returns information about the Spec version in self.name to give application possibility to know about it before loading. Returns a dictionary with the key “KeyList” (list of all available keys in this source). Each element in “KeyList” is an shared memory array name.

isUpdated(sourceName, key)[source]
refresh()[source]
PyMca5.PyMcaCore.SpsDataSource.main()[source]

StackBase Module

class PyMca5.PyMcaCore.StackBase.StackBase[source]

Bases: object

addCurve(x, y, legend=None, info=None, replace=False, replot=True)[source]

Add the 1D curve given by x an y to the graph.

addImage(image, name, info=None, replace=False, replot=True)[source]

Add image data to the RGB correlator

calculateMcaDataObject(normalize=False)[source]
calculateROIImages(index1, index2, imiddle=None, energy=None)[source]
getActiveCurve()[source]

Function to access the currently active curve. It returns None in case of not having an active curve.

Default output has the form:
xvalues, yvalues, legend, dict where dict is a dictionnary containing curve info. For the time being, only the plot labels associated to the curve are warranted to be present under the keys xlabel, ylabel.
If just_legend is True:
The legend of the active curve (or None) is returned.
getGraphXLimits()[source]
getGraphYLimits()[source]
getPluginDirectoryList()[source]
getPlugins()[source]

Import or reloads all the available plugins. It returns the number of plugins loaded.

getSelectionMask()[source]
getStackData()[source]
getStackDataObject()[source]
getStackInfo()[source]
getStackOriginalImage()[source]
getStackROIImagesAndNames()[source]
handleNonFiniteData()[source]
isStackFinite()[source]

Returns True if stack does not contain inf or nans Returns False if stack is not finite

removeCurve(legend, replot=True)[source]

Remove the curve associated to the supplied legend from the graph. The graph will be updated if replot is true.

removeImage(name, replace=True)[source]

Remove image data from the RGB correlator

setPluginDirectoryList(dirlist)[source]
setSelectionMask(mask)[source]
setStack(stack, mcaindex=2, fileindex=None)[source]
showOriginalImage()[source]
showOriginalMca()[source]
showROIImageList(imageList, image_names=None)[source]
stackUpdated()[source]

Recalculates the different images associated to the stack

updateROIImages(ddict=None)[source]
PyMca5.PyMcaCore.StackBase.test()[source]

StackPluginBase Module

A Stack plugin is a module that will be automatically added to the PyMca stack windows in order to perform user defined operations on the data stack. It has to inherit the StackPluginBase.StackPluginBase class and implement the methods:

  • getMethods
  • getMethodToolTip (optional but convenient)
  • getMethodPixmap (optional)
  • applyMethod

and modify the static module variable MENU_TEXT and the static module function getStackPluginInstance according to the defined plugin.

These plugins will be compatible with any stack window that provides the functions:

#data related

  • getStackDataObject
  • getStackData
  • getStackInfo
  • setStack
  • getStackROIImagesAndNames
  • isStackFinite

#mask related

  • setStackSelectionMask
  • getStackSelectionMask

#displayed curves

  • getActiveCurve
  • getGraphXLimits
  • getGraphYLimits

#images

  • addImage
  • removeImage
  • replaceImage

#information method

  • stackUpdated
  • selectionMaskUpdated
class PyMca5.PyMcaCore.StackPluginBase.StackPluginBase(stackWindow, **kw)[source]

Bases: object

addImage(image, name)[source]
applyMethod(name)[source]

The plugin is asked to apply the method associated to name.

getActiveCurve()[source]

Function to access the currently active curve. It returns None in case of not having an active curve.

Output has the form:
xvalues, yvalues, legend, dict where dict is a dictionnary containing curve info. For the time being, only the plot labels associated to the curve are warranted to be present under the keys xlabel, ylabel.
getGraphXLimits()[source]

Get the graph X limits.

getGraphYLimits()[source]

Get the graph Y limits.

getMethodPixmap(name)[source]

Returns the pixmap associated to the particular method name or None.

getMethodToolTip(name)[source]

Returns the help associated to the particular method name or None.

getMethods()[source]

A list with the NAMES associated to the callable methods that are applicable to the specified stack.

getStackData()[source]
getStackDataObject()[source]
getStackInfo()[source]
getStackOriginalImage()[source]
getStackROIImagesAndNames()[source]
getStackSelectionMask()[source]
isStackFinite()[source]
removeImage(name)[source]
replaceImage(image, name)[source]
selectionMaskUpdated()[source]
setStack(*var, **kw)[source]
setStackSelectionMask(mask, instance_id=None)[source]
stackROIImageListUpdated()[source]
stackUpdated()[source]
PyMca5.PyMcaCore.StackPluginBase.getStackPluginInstance(stackWindow, **kw)[source]

XiaCorrect Module

PyMca5.PyMcaCore.XiaCorrect.checkCB(log_cb=None, done_cb=None, error_cb=None)[source]
PyMca5.PyMcaCore.XiaCorrect.correctFiles(xiafiles, deadtime=1, livetime=0, sums=None, avgflag=0, outdir=None, outname='corr', force=0, verbose=0, log_cb=None, done_cb=None, error_cb=None)[source]
PyMca5.PyMcaCore.XiaCorrect.defaultDoneCB(nbdone, total)[source]
PyMca5.PyMcaCore.XiaCorrect.defaultErrorCB(message)[source]
PyMca5.PyMcaCore.XiaCorrect.defaultLogCB(message, verbose_level=None, verbose_ask=None)[source]
PyMca5.PyMcaCore.XiaCorrect.mainCommandLine()[source]
PyMca5.PyMcaCore.XiaCorrect.mainGUI(app=None)[source]
PyMca5.PyMcaCore.XiaCorrect.parseArguments()[source]
PyMca5.PyMcaCore.XiaCorrect.parseFiles(filelist, verbose=0, keep_sum=0, log_cb=None, done_cb=None, error_cb=None)[source]
PyMca5.PyMcaCore.XiaCorrect.printHelp()[source]

XiaEdf Module

class PyMca5.PyMcaCore.XiaEdf.XiaEdfCountFile(filename)[source]
correct(deadtime=1, livetime=0)[source]
getData(detector=-1)[source]
getDetList()[source]
getStat(detector=-1)[source]
reset()[source]
save(filename, force=0)[source]
sum(sums=[], deadtime=0, livetime=0, average=0)[source]
exception PyMca5.PyMcaCore.XiaEdf.XiaEdfError(message)[source]

Bases: exceptions.Exception

class PyMca5.PyMcaCore.XiaEdf.XiaEdfScanFile(statfile, detfiles)[source]
correct(detector, deadtime=1, livetime=0)[source]
getData(detector)[source]
getDetList()[source]
getStat(detector=-1)[source]
save(filename, force=0)[source]
sum(detectors=[], deadtime=0, livetime=0, average=0)[source]
class PyMca5.PyMcaCore.XiaEdf.XiaFilename(filename=None)[source]
appendPrefix(name)[source]
findStatFile()[source]
get()[source]
getDetector()[source]
getType()[source]
isCount()[source]
isGroupedWith(other)[source]
isScan()[source]
isStat()[source]
isSum()[source]
isValid()[source]
set(filename)[source]
setDirectory(dirname)[source]
setType(type, det=None)[source]
PyMca5.PyMcaCore.XiaEdf.checkEdfForRead(filename)[source]
PyMca5.PyMcaCore.XiaEdf.checkEdfForWrite(filename, force=0)[source]
PyMca5.PyMcaCore.XiaEdf.openEdf(filename, read=0, write=0, force=0)[source]
PyMca5.PyMcaCore.XiaEdf.testAcq(infile, outfile=None)[source]
PyMca5.PyMcaCore.XiaEdf.testScan()[source]