guisaxs Package

GuiSAXS Module

project : pySAXS description : wxPython Class to plot some data files to gnuplot authors : Antoine Thill, Olivier Spalla, Olivier Tache, Debasis Sen Last changes :

10-11-2009 OT : Replaced LsScattering by GuiSAXS.py 15-06-2009 OT : little changes for new models, replace with by with_ for gnuplot commands

change gnuplot plotting commands
05-06-2007 OT : big changes everywhere !
add data management, no more reference to usaxs data directly

16-03-2007 OT : send loglog commands directly to gnuplot 13-03-2007 OT : add a SAXS and USAXS menu

add a HELP (about and licence dialog box) menu
class pySAXS.guisaxs.GuiSAXS.GuiSAXS(parent, title)[source]

Bases: wx._windows.Frame

DataSaveAsTXT(filename)[source]

save the checked datas

ImportData(datafilename, lineskip=0, delimiter='t', usecols=None, type=None, name=None)[source]

extract data from file

ListOfDatasChecked()[source]

check if there are data checked return list of dataset checked

OnAbout(event)[source]
OnAddReferenceValue(event)[source]

user want to add a reference value

OnChange(evant)[source]
OnChangeColors(event)[source]
OnCheckData(event)[source]
OnClickData(event)[source]

what’s happen when the user select a dataset

OnClipqRange(child)[source]
OnClipqRangeShow(event)[source]
OnCloseWindow(event)[source]
OnConcatenate()[source]

user click on apply

OnConcatenateCancel(datasetname)[source]
OnConcatenateShow(event)[source]

user want to concatenate different dataset

OnDClickData(event)[source]

user doucle click on data : open what ?

OnDataAppend(event)[source]
OnDataLoad(event)[source]

Load datas

OnDataOpenDataset(event)[source]

open the data set

OnDataReset(event)[source]
OnDataSave(event)[source]

save the checked datas

OnDataSaveDataset(event)[source]

save all the data set

OnDerivate(event)[source]

user want to derivate dataset

OnDocClick(event)[source]

start the default application for the doc file

OnEvalCalcul(formula, variableDict, newdatasetname, listofdata)[source]

feedback from evaluator dialog box #formula=”i1+i0+i2” #variableDict={‘i0’:’data1’,’i1’:’data2’,...} #listofdata=[‘data1’,data2’...]

OnEvalCalculate(formula, variableDict, newdatasetname, listofdata)[source]

feedback from evaluator dialog box #formula=”i1+i0+i2” #variableDict={‘i0’:’data1’,’i1’:’data2’,...} #listofdata=[‘data1’,data2’...]

OnEvalShow(event)[source]
OnFileSaveModel(event)[source]
OnGenerateNoise(event)[source]

user want generate a noise from the data

OnGridOff(event)[source]
OnGridOn(event)[source]
OnInterpolate(newdataset, olddataset, new_qrange)[source]

do the interpolation with the new qrange

OnInterpolateShow(event)[source]

user click on Interpolate

OnInvariant(event)[source]

user click on invariant

OnLicence(event)[source]
OnLogPlotType(event)[source]
OnModelFit(child)[source]

when user click on fit on the model child dialog box

OnModelFitBounds(child)[source]

when user click on fit on the model child dialog box

OnModelInfo(event)[source]
OnModelPlot(event)[source]

if self.ISMODEL==True: self.gp(‘set title ‘ ‘+str(self.M.IntensityFunc).split(‘ ‘)[1]+’ ‘ ‘) GD=Gnuplot.Data(self.M.q,self.M.GetIntensity()*(self.M.q**self.plotexp),with=’l lt 2’) self.gp.replot(GD)

OnModelQRange(event)[source]
OnModelReset(event)[source]
OnModelSelect(event)[source]

user click on model

OnModelUpdate(child)[source]

when the user update from the Model

OnPopUpDuplicate(event)[source]

duplicate a data set

OnPopUpModifyModel(event)[source]
OnPopUpRefresh(event)[source]

refresh data from file (is exist)

OnPopUpRemove(event)[source]

remove a data set

OnPopUpRename(event)[source]

rename a data set

OnPorodPlotType(event)[source]
OnReinitGnulot(event)[source]

reinit gnuplot instance

OnResetSelectqRange(event)[source]
OnResolution(event)[source]
OnSAXSSubstraction(event)[source]

User click on SAXS substraction

OnSAXSSubstractionApply(event, selectedData, parameters)[source]
OnScaleQ(event)[source]

user want to scale q with a formula

OnScalingSAXSApply(applyQ, applyI, dataname, backgdname)[source]

child dialog box ask to apply parameters

OnScalingSAXSDlgLoad(event)[source]

The user click on “load parameters”

OnScalingSAXSDlgShow(event)[source]

The user click on “Scale Saxs Datas”

OnSelectAll(event)[source]

when the user want to select all

OnSelectqRange(qmin, qmax, imin, imax)[source]
OnSelectqRangeShow(event)[source]

change scale

OnSendCommandToPlot(event)[source]
OnShowPopup(event)[source]

show popup menu

OnSize(evt)[source]
OnSmooth(event)[source]

user want to smooth dataset

OnStatInformations(event)[source]

user want statistical information

OnSuperModelSelect(event)[source]

user call SUPER Model

OnToolsContraste(event)[source]
OnToolsContrasteNeutron(event)[source]
OnToolsContrasteXRL(event)[source]
OnUSAXSDeconvolution(event)[source]

The user click on “USAXS - Deconvolution”

OnUSAXSTransmission(event, selectedData, parameters)[source]

do the tramsission correction after dialog box LSTransmissionDlg

OnUSAXSTransmissionDlgShow(event)[source]

The user click on “USAXS - Data correction”

OnUSAXSsimu(event)[source]
OnUSAXSsimuDlgShow(event)[source]
OnUSAXSsimuPlot(event)[source]
OnUSAXSsimuReset(event)[source]
OnUnSelectAll(event)[source]

when the user want to select all

OpenModel(M, index=-1, name='', pos=wx.Point(50, 50))[source]

open the model dialog box

RePlot(event=None)[source]
ReadFile(datafilename, file_type=None)[source]

read file depending of type of file

checkPlotData(name)[source]

check if we plot data

cleanString(s)[source]

Removes all accents from the string

createWxPlot()[source]
data_dict = None
findPeaks(events)[source]

find peaks

getListOfDocs()[source]
get_color(n)[source]

return a color name from the list of colors if n> length of list of colors, return at the beginning

giveMeANewName()[source]

return a new name for a data set

printTXT(txt='', par='')[source]

print on comment ctrl

qmod = None

self.gp=Gnuplot.Gnuplot() self.gp.reset()

redrawTheList()[source]

redraw the listbox

removeNonOrdinalChar(s)[source]
replotWxPlot()[source]

plot the wx frame

sortDictByKey(d)[source]

return list of couple sorted by key

LSAbsorptionDlg Module

class pySAXS.guisaxs.LSAbsorptionDlg.AbsorptionForm(parent, set_dir=None)[source]

Bases: wx._windows.Frame

CheckBoxUpdate(event)[source]
DensityUpdate(event)[source]
OnAddClick(event)[source]
OnClick(event)[source]
OnExitClick(event)[source]
OnRemoveAllClick(event)[source]
OnRemoveClick(event)[source]
OnResetClick(event)[source]
ThicknessUpdate(event)[source]
UpdateFormula()[source]
sliderUpdate(event)[source]

LSAbsorptionXRL Module

class pySAXS.guisaxs.LSAbsorptionXRL.AbsorptionForm(parent, set_dir=None, printout=None)[source]

Bases: wx._windows.Frame

LambdaLabel = None
self.NRJslider=wx.Slider(self,104,8030,1000,50000,
wx.Point(20,20),wx.Size(200,15),wx.SL_HORIZONTAL|wx.SL_AUTOTICKS)

self.NRJslider.SetTickFreq(5000,1)

self.Bind(wx.EVT_SLIDER, self.sliderUpdate) self.NRJText = wx.StaticText(self, 105, “8.03 keV”, wx.Point(250, 15))

OnAddClick(event)[source]
OnClick(event)[source]
OnClickSource(event)[source]
OnExitClick(event)[source]
OnRemoveAllClick(event)[source]
OnRemoveClick(event)[source]
OnResetClick(event)[source]
UpdateFormula(verbose=False)[source]
printTXT(txt='', par='')[source]

for printing messages

LSBackgroundDlg Module

class pySAXS.guisaxs.LSBackgroundDlg.LSBackgroundDlg(parent, listofdata)[source]

Bases: wx._windows.Dialog

OnApplyClick(event)[source]
OnExitClick(event)[source]

LSClipqRangeDlg Module

class pySAXS.guisaxs.LSClipqRangeDlg.LSClipqRangeDlg(parent, dataset_name)[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]

user click on Cancel exit without clipping

TextUpdate(event)[source]

LSConcatenateDlg Module

class pySAXS.guisaxs.LSConcatenateDlg.LSConcatenateDlg(parent, listofdata, newdatasetname)[source]

Bases: wx._windows.Frame

OnApplyClick(event)[source]

User click on Apply button

OnCancelClick(event)[source]

User click on Apply button

OnExitClick(event)[source]
clipdata(datasetname)[source]
createData()[source]

LSDeconvolutionDlg Module

class pySAXS.guisaxs.LSDeconvolutionDlg.LSDeconvolutionDlg(parent)[source]

Bases: wx._windows.Dialog

OnExitClick(event)[source]
typeList = None

# top sizer self.pan=wx.Panel(self, wx.ID_ANY) panel = self.pan vbox_top = wx.BoxSizer(wx.VERTICAL) #Parameters sizer sizer=wx.FlexGridSizer(rows=4,cols=2,hgap=20,vgap=5) #text , numerical value, slider

LSEvalDlg Module

class pySAXS.guisaxs.LSEvalDlg.LSEvalDlg(parent, listofdata, newdatasetname)[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]

user click on Cancel exit without clipping

TextUpdate(event)[source]

LSFitGaussianDlg Module

class pySAXS.guisaxs.LSFitGaussianDlg.LSFitGaussianDlg(parent, M)[source]

Bases: wx._windows.Dialog

OnExitClick(event)[source]

LSGenericParameterDlg Module

class pySAXS.guisaxs.LSGenericParameterDlg.LSGenericParameterDlg(parent, title='', selectedData=None, parameters=None, callbackFunction=None, comment='')[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]
textUpdate(event)[source]

parameter value is udpated

LSInterpolateDlg Module

class pySAXS.guisaxs.LSInterpolateDlg.LSInterpolateDlg(parent, newdatasetname, olddatasetname)[source]

Bases: wx._windows.Frame

OnApply(event)[source]

calculate the new qrange

OnExitClick(event)[source]

user click on Cancel exit without clipping

giveMeAQRange(index)[source]

return a q range from the information on the form

giveMeListOfChecked()[source]
sortedDictValues(adict)[source]

sort a dictionnary

LSInvariantDlg Module

wx python dialog box for calculation of invariant

class pySAXS.guisaxs.LSInvariantDlg.LSInvariantDlg(parent, dataset_name, DPQ, DGQ)[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]

user click on Close

TextUpdate(event)[source]

when the user click on Compute

LSInvariantDlgOLD Module

wx python dialog box for calculation of invariant

class pySAXS.guisaxs.LSInvariantDlgOLD.LSInvariantDlg(parent, dataset_name, DPQ, DGQ)[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]

user click on Close

TextUpdate(event)[source]

when the user click on Compute

LSModelDlg Module

class pySAXS.guisaxs.LSModelDlg.LSModelDlg(parent, dataset_name, type='model', pos=wx.Point(50, 50))[source]

Bases: wx._windows.Frame

DlgUpdate(event)[source]
ModelUpdate()[source]

when a parameter is updated

OnClickFitButton(event)[source]
OnClickFitButtonBounds(event)[source]
OnClickList(event)[source]
OnExitClick(event)[source]
UpdateAfterFit(result)[source]

update all after a fit

sliderQmaxMove(event)[source]
sliderQminMove(event)[source]
textMinMaxUpdate(event)[source]
textUpdate(event)[source]

parameter value is updated

LSResolutionDlg Module

class pySAXS.guisaxs.LSResolutionDlg.LSResolutionDlg(parent)[source]

Bases: wx._windows.Dialog

OnExitClick(event)[source]

LSSelectxyRangeDlg Module

project : pySAXS description : wxPython Class to plot some data files to gnuplot authors : Antoine Thill, Olivier Spalla, Olivier Tache’, Debasis Sen Last changes :

16-03-2007 OT : add autoscale buttons, send replot command directly to gnuplot
class pySAXS.guisaxs.LSSelectxyRangeDlg.LSSelectqRangeDlg(parent, qmin, qmax, imin, imax)[source]

Bases: wx._windows.Frame

TextUpdate(event)[source]
on_QuitButton_Click(event)[source]
on_iAutoButton_Click(event)[source]
on_qAutoButton_Click(event)[source]

LSTransmissionDlg Module

class pySAXS.guisaxs.LSTransmissionDlg.LSTransmissionDlg(parent, label)[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]
SliderUpdate(event)[source]
textUpdate(event)[source]

parameter value is udpated

LSUSAXSsimuDlg Module

class pySAXS.guisaxs.LSUSAXSsimuDlg.LSUSAXSsimuDlg(parent)[source]

Bases: wx._windows.Frame

OnExitClick(event)[source]
textUpdate(event)[source]

LSZeroAdjustDlg Module

class pySAXS.guisaxs.LSZeroAdjustDlg.LSZeroAdjustDlg(parent, M)[source]

Bases: wx._windows.Dialog

OnExitClick(event)[source]

LSdataDlg Module

class pySAXS.guisaxs.LSdataDlg.LSDataDlg(parent, datab, rcb)[source]

Bases: wx._windows.Dialog

LSneutronDlg Module

class pySAXS.guisaxs.LSneutronDlg.LSNeutronCon(parent)[source]

Bases: wx._windows.Frame

OnAction(event)[source]
OnAddAtom(event)[source]
OnAddNum(event)[source]
OnResetClick(event)[source]

LSscattering Module

SAXSAbsoluteDlg Module

class pySAXS.guisaxs.SAXSAbsoluteDlg.SAXSAbsoluteDlg(parent, params, datasetname=None)[source]

Bases: wx._windows.Frame

Compute(event)[source]

user modify text

Control2Params()[source]
OnApplyClick(event)[source]

User click on Apply button

OnExitClick(event)[source]
OnLoadClick(event)[source]

User click on save button

OnSaveClick(event)[source]

User click on save button

Params2Control()[source]

dataset Module

class pySAXS.guisaxs.dataset.dataset(name=None, q=None, i=None, filename=None, checked=True, model=None, rawdata_ref=None, type=None, parameters=None, error=None, comment=None, parent=None, child=None, parentformula=None, variableDict=None, color=None)[source]
pySAXS.guisaxs.dataset.getDataDictFromXMLFile(filename)[source]
pySAXS.guisaxs.dataset.getDataDictRaw(filename)[source]

get dataset from old format

pySAXS.guisaxs.dataset.getDatasetFromXML(element)[source]

set the dataset with the parsed xml as Element

<root>
<name> mqlkqsmldk</name> <checked>true</checked> <q datatype=’numpy.array’>0,0.1,0.2,0.3</q> if it is an array datatype must contain ‘array’ ...

</root>

pySAXS.guisaxs.dataset.getDatasetFromXMLFile(filename)[source]
pySAXS.guisaxs.dataset.saveDataDictOnXMLFile(filename, data_dict)[source]
pySAXS.guisaxs.dataset.saveDataDictRaw(filename, data_dict)[source]

save dataset in old format

pySAXS.guisaxs.dataset.saveDatasetOnXMLFile(filename, dataset)[source]

matplotlibwx Module

class pySAXS.guisaxs.matplotlibwx.PlotFrame(parent, id, title, size=(4, 4), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, autoscaleUnzoom=True, axetype=None, **kwds)[source]

Bases: wx._windows.Frame

A matplotlib canvas embedded in a wxPython top-level window.

@cvar ABOUT_TITLE: Title of the “About” dialog. @cvar ABOUT_MESSAGE: Contents of the “About” dialog.

ABOUT_MESSAGE = "wxmpl.PlotFrame \nWritten by Ken McIvor <mcivor@iit.edu>\nCopyright 2005-2009 Illinois Institute of Technology\nmodified for PySAXS by Olivier Tach'e\n CEA / LIONS 2009"
ABOUT_TITLE = 'About wxmpl.PlotFrame'
OnAutoscale(event)[source]

if self.autoscaleitem.IsChecked(): self.statusbar.Show()

OnGridOff(event)[source]
OnGridOn(event)[source]
OnLegendOff(event)[source]
OnLegendOn(event)[source]
OnLegendXYtitle(event)[source]
OnLineFormat(event)[source]
OnLineFormatErrorBar(event)[source]
OnLogPlotType(event)[source]
OnMarkerChange(event)[source]
OnMenuFileClose(evt)[source]

Handles File->Close menu events.

OnMenuFilePageSetup(evt)[source]

Handles File->Page Setup menu events

OnMenuFilePrint(evt)[source]

Handles File->Print menu events

OnMenuFilePrintPreview(evt)[source]

Handles File->Print Preview menu events

OnMenuFileSave(evt)[source]

Handles File->Save menu events.

OnMenuHelpAbout(evt)[source]

Handles Help->About menu events.

OnPlotXYType(event)[source]
OnXYRange(event)[source]
addData(x, y, label=None, id=None, error=None, color=None)[source]

datas to the plot x and y are datas label : the name of datas id : no of datas in a list -> give the colors

clearData()[source]
create_menus()[source]
draw()[source]

Draw the associated C{Figure} onto the screen.

get_color(n)[source]

return a color name from the list of colors if n> length of list of colors, return at the beginning

get_figure()[source]

Returns the figure associated with this canvas.

get_marker()[source]

Return an infinite, cycling iterator over the available marker symbols. or a fixed marker symbol

replot()[source]
set_autoscale_unzoom(state)[source]

Enable or disable automatic view rescaling when the user zooms out to the initial figure.

set_crosshairs(state)[source]

Enable or disable drawing crosshairs through the mouse cursor when it is inside a matplotlib axes.

set_cursor(state)[source]

Enable or disable the changing mouse cursor. When enabled, the cursor changes from the normal arrow to a square cross when the mouse enters a matplotlib axes on this canvas.

set_location(state)[source]

Enable or disable the display of the matplotlib axes coordinates of the mouse in the lower left corner of the canvas.

set_selection(state)[source]

Enable or disable area selections, where user selects a rectangular area of the canvas by left-clicking and dragging the mouse.

set_zoom(state)[source]

Enable or disable zooming in when the user makes an area selection and zooming out again when the user right-clicks.

class pySAXS.guisaxs.matplotlibwx.data(x, y, label=None, id=None, error=None, color=None)[source]

myplot Module

class pySAXS.guisaxs.myplot.myplot[source]

Bases: pySAXS.guisaxs.matplotlibwx.PlotFrame

addData(x, y, label='')[source]
plot()[source]
setLabel(x='', y='')[source]

pySaxsColors Module

pySAXS.guisaxs.pySaxsColors.getColorRGB(name)[source]
pySAXS.guisaxs.pySaxsColors.listOfColors()[source]

return the RGB list of colors with luminance <=0.4

pySAXS.guisaxs.pySaxsColors.listOfColorsDict()[source]
pySAXS.guisaxs.pySaxsColors.listOfColorsNames()[source]

return the list of colors NAMES with luminance <=0.4

pySAXS.guisaxs.pySaxsColors.name2luminance(name)[source]
pySAXS.guisaxs.pySaxsColors.rgb2luminance(r, g, b)[source]

textView Module

project : pySAXS description : function to print a message from a txt file to a dialog box authors : Olivier Tache Last changes :

24-07-2012 OT 13-03-2007 OT
pySAXS.guisaxs.textView.ViewMessage(file, title='test')[source]

wxmpl Module

Embedding matplotlib in wxPython applications is straightforward, but the default plotting widget lacks the capabilities necessary for interactive use. WxMpl (wxPython+matplotlib) is a library of components that provide these missing features in the form of a better matplolib FigureCanvas.

class pySAXS.guisaxs.wxmpl.PlotPanel(parent, id, size=(6.0, 3.7), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, autoscaleUnzoom=True)[source]

Bases: matplotlib.backends.backend_wxagg.FigureCanvasWxAgg

A matplotlib canvas suitable for embedding in wxPython applications.

OnActivate(evt)[source]

Handles the wxPython window activation event.

OnDestroy(evt)[source]

Handles the wxPython window destruction event.

OnEraseBackground(evt)[source]

Overrides the wxPython backround repainting event to reduce flicker.

draw(**kwds)[source]

Draw the associated C{Figure} onto the screen.

get_figure()[source]

Returns the figure associated with this canvas.

notify_point(axes, x, y)[source]

Called by the associated C{PlotPanelDirector} to emit a C{PointEvent}.

notify_selection(axes, x1, y1, x2, y2)[source]

Called by the associated C{PlotPanelDirector} to emit a C{SelectionEvent}.

set_autoscale_unzoom(state)[source]

Enable or disable automatic view rescaling when the user zooms out to the initial figure.

set_crosshairs(state)[source]

Enable or disable drawing crosshairs through the mouse cursor when it is inside a matplotlib axes.

set_cursor(state)[source]

Enable or disable the changing mouse cursor. When enabled, the cursor changes from the normal arrow to a square cross when the mouse enters a matplotlib axes on this canvas.

set_location(state)[source]

Enable or disable the display of the matplotlib axes coordinates of the mouse in the lower left corner of the canvas.

set_selection(state)[source]

Enable or disable area selections, where user selects a rectangular area of the canvas by left-clicking and dragging the mouse.

set_zoom(state)[source]

Enable or disable zooming in when the user makes an area selection and zooming out again when the user right-clicks.

zoomed(axes)[source]

Returns a boolean indicating whether or not the C{axes} is zoomed in.

class pySAXS.guisaxs.wxmpl.PlotFrame(parent, id, title, size=(6.0, 3.7), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, autoscaleUnzoom=True, **kwds)[source]

Bases: wx._windows.Frame

A matplotlib canvas embedded in a wxPython top-level window.

@cvar ABOUT_TITLE: Title of the “About” dialog. @cvar ABOUT_MESSAGE: Contents of the “About” dialog.

ABOUT_MESSAGE = 'wxmpl.PlotFrame 2.0dev\nWritten by Ken McIvor <mcivor@iit.edu>\nCopyright 2005-2009 Illinois Institute of Technology'
ABOUT_TITLE = 'About wxmpl.PlotFrame'
OnMenuFileClose(evt)[source]

Handles File->Close menu events.

OnMenuFilePageSetup(evt)[source]

Handles File->Page Setup menu events

OnMenuFilePrint(evt)[source]

Handles File->Print menu events

OnMenuFilePrintPreview(evt)[source]

Handles File->Print Preview menu events

OnMenuFileSave(evt)[source]

Handles File->Save menu events.

OnMenuHelpAbout(evt)[source]

Handles Help->About menu events.

create_menus()[source]
draw()[source]

Draw the associated C{Figure} onto the screen.

get_figure()[source]

Returns the figure associated with this canvas.

set_autoscale_unzoom(state)[source]

Enable or disable automatic view rescaling when the user zooms out to the initial figure.

set_crosshairs(state)[source]

Enable or disable drawing crosshairs through the mouse cursor when it is inside a matplotlib axes.

set_cursor(state)[source]

Enable or disable the changing mouse cursor. When enabled, the cursor changes from the normal arrow to a square cross when the mouse enters a matplotlib axes on this canvas.

set_location(state)[source]

Enable or disable the display of the matplotlib axes coordinates of the mouse in the lower left corner of the canvas.

set_selection(state)[source]

Enable or disable area selections, where user selects a rectangular area of the canvas by left-clicking and dragging the mouse.

set_zoom(state)[source]

Enable or disable zooming in when the user makes an area selection and zooming out again when the user right-clicks.

class pySAXS.guisaxs.wxmpl.PlotApp(title='WxMpl', size=(6.0, 3.7), dpi=96, cursor=True, location=True, crosshairs=True, selection=True, zoom=True, **kwds)[source]

Bases: wx._core.App

A wxApp that provides a matplotlib canvas embedded in a wxPython top-level window, encapsulating wxPython’s nuts and bolts.

@cvar ABOUT_TITLE: Title of the “About” dialog. @cvar ABOUT_MESSAGE: Contents of the “About” dialog.

ABOUT_MESSAGE = None
ABOUT_TITLE = None
OnInit()[source]
draw()[source]

Draw the associated C{Figure} onto the screen.

get_figure()[source]

Returns the figure associated with this canvas.

set_crosshairs(state)[source]

Enable or disable drawing crosshairs through the mouse cursor when it is inside a matplotlib axes.

set_cursor(state)[source]

Enable or disable the changing mouse cursor. When enabled, the cursor changes from the normal arrow to a square cross when the mouse enters a matplotlib axes on this canvas.

set_location(state)[source]

Enable or disable the display of the matplotlib axes coordinates of the mouse in the lower left corner of the canvas.

set_selection(state)[source]

Enable or disable area selections, where user selects a rectangular area of the canvas by left-clicking and dragging the mouse.

set_zoom(state)[source]

Enable or disable zooming in when the user makes an area selection and zooming out again when the user right-clicks.

class pySAXS.guisaxs.wxmpl.StripCharter(axes)[source]

Plots and updates lines on a matplotlib C{Axes}.

setChannels(channels)[source]

Specify the data-providers of the lines to be plotted and updated.

update()[source]

Redraw the associated axes with updated lines if any of the channels’ data has changed.

class pySAXS.guisaxs.wxmpl.Channel(name, color=None, style=None, marker=None)[source]

Provides data for a C{StripCharter} to plot. Subclasses of C{Channel} override the template methods C{getX()} and C{getY()} to provide plot data and call C{setChanged(True)} when that data has changed.

getColor()[source]

Returns the line color string to use when the line is plotted, or C{None} to use an automatically generated color.

getLabel()[source]

Returns the matplotlib label for this channel of data.

getMarker()[source]

Returns the line marker string to use when the line is plotted, or C{None} to use the default line marker.

getStyle()[source]

Returns the line style string to use when the line is plotted, or C{None} to use the default line style.

getX()[source]

Template method that returns the vector of X axis data or C{None} if there is no data available.

getY()[source]

Template method that returns the vector of Y axis data or C{None} if there is no data available.

hasChanged()[source]

Returns a boolean indicating if the line data has changed.

setChanged(changed)[source]

Sets the change indicator to the boolean value C{changed}.

@note: C{StripCharter} instances call this method after detecting a change, so a C{Channel} cannot be shared among multiple charts.

class pySAXS.guisaxs.wxmpl.FigurePrinter(view, printData=None)[source]

Provides a simplified interface to the wxPython printing framework that’s designed for printing matplotlib figures.

getPrintData()[source]

Return the current printer settings in their C{wx.PrintData} object.

pageSetup()[source]
previewFigure(figure, title=None)[source]

Open a “Print Preview” window for the matplotlib chart C{figure}. The keyword argument C{title} provides the printing framework with a title for the print job.

printFigure(figure, title=None)[source]

Open a “Print” dialog to print the matplotlib chart C{figure}. The keyword argument C{title} provides the printing framework with a title for the print job.

setPrintData(printData)[source]

Use the printer settings in C{printData}.

class pySAXS.guisaxs.wxmpl.PointEvent(id, axes, x, y)[source]

Bases: wx._core.PyCommandEvent

wxPython event emitted when a left-click-release occurs in a matplotlib axes of a window without an area selection.

@cvar axes: matplotlib C{Axes} which was left-clicked @cvar x: matplotlib X coordinate @cvar y: matplotlib Y coordinate @cvar xdata: axes X coordinate @cvar ydata: axes Y coordinate

Clone()[source]
pySAXS.guisaxs.wxmpl.EVT_POINT(win, id, func)[source]

Register to receive wxPython C{PointEvent}s from a C{PlotPanel} or C{PlotFrame}.

class pySAXS.guisaxs.wxmpl.SelectionEvent(id, axes, x1, y1, x2, y2)[source]

Bases: wx._core.PyCommandEvent

wxPython event emitted when an area selection occurs in a matplotlib axes of a window for which zooming has been disabled. The selection is described by a rectangle from C{(x1, y1)} to C{(x2, y2)}, of which only one point is required to be inside the axes.

@cvar axes: matplotlib C{Axes} which was left-clicked @cvar x1: matplotlib x1 coordinate @cvar y1: matplotlib y1 coordinate @cvar x2: matplotlib x2 coordinate @cvar y2: matplotlib y2 coordinate @cvar x1data: axes x1 coordinate @cvar y1data: axes y1 coordinate @cvar x2data: axes x2 coordinate @cvar y2data: axes y2 coordinate

Clone()[source]
pySAXS.guisaxs.wxmpl.EVT_SELECTION(win, id, func)[source]

Register to receive wxPython C{SelectionEvent}s from a C{PlotPanel} or C{PlotFrame}.