Routines to plot 3D data

class pyspec.ccd.plotter.PlotGrid(imProc)

Plot Grid Class

This class plots: intensity, occupation of the grid parts (bins), histogram of the occupation of a given 2D or 1D grid

getAxesLabels()

Get the plotting labels for the axes

axesLabels : labels for the axes [xLabel, yLabel, zLabel]

getHistBin(histBin=50)

Get the no. of bins for the histograms

hisBin : no. of bins for the histograms of the occupation numbers

getLogFlags()

Get whether data are plotted on linear (0) or logarithmic (1) scale

flag1D : flag to select scale of 1D plots flag2D : flag to select scale of 2D plots

binary code, flag & 1: intensity, flag & 2: missing grid parts

getPlot1DFit()

Get plotting the 1D fits

getPlotFlags()

Get the ploting flags for 1D and 2D plots

flag1D : flag to select 1D plots flag2D : flag to select 2D plots

binary code, flag & 1: intensity, flag & 2: occupation numbers of the grid parts (bins), flag & 4: histogram of occupation of the grid parts (bins)

getPlotLayout()

Get the options for the plotting window

figSize : figure size (width, height) in inches, e.g. (11, 8.5) plotHor : no. of horizontal images per window , e.g. 4 plotVer : no. of vertical images per window , e.g. 3 plotOrd : order of plotting, horizontal-vertical (‘hv’) of vertical-horizontal (‘vh’)

plot1DData()

Plots 1D Lines: intensity, occupation, histogram

plot1DMask()

Plots 1D Lines: maskOccu, maskBack, maskFit

plot2DData()

Plots 2D Areas: intensity, occupation, histogram

plot2DMask()

Plots 2D Areas: maskOccu, maskBack, maskFit

plotAll()

Plots 1D/2D sums and cuts

plotGrid1D(calcMode='sum', intenFits=None)

Select and plots the 1D Lines of the data grid

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’, ‘cutAv’ intenFits : intensity of the 1D fits, do not consider if None

retrurns fig1 : plt.figure object of the plotting window allax1 : list of plt.axes objects which carry the figures allRes : all results of the fits, [[a1, b1, cen1, width1, area1],...], [0, 0, 0, 0, 0] if unsuccessful fit

plotGrid2D(calcMode='sum')

Select and plots the 2D Areas of the data grid

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’, ‘cutAv’

retrurns fig2 : plt.figure object of the plotting window allax2 : list of plt.axes objects which carry the figures

plotMask1D(calcMode='sum')

Select and plots the 1D Lines of the mask grids

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’

retrurns fig1 : plt.figure object of the plotting window allax1 : list of plt.axes objects which carry the figures

plotMask2D(calcMode='sum')

Select and plots the 2D Areas of the mask grid

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’

retrurns fig2 : plt.figure object of the plotting window allax2 : list of plt.axes objects which carry the figures

setAxesLabels(axesLabels)

Set the plotting labels for the axes

axesLabels : labels for the axes [xLabel, yLabel, zLabel]

setHistBin(histBin=50)

Sets the number of bins for the histograms

setLogFlags(flag1D=0, flag2D=0)

Sets whether data are plotted on linear (False) or logarithmic (True) scale binary code, flag & 1: intensity, flag & 2: missing grid parts

setPlot1DAxes(valSetAx0, labelsAx0)

Sets the axes for the 1D plots

setPlot1DData(intentLine, occuLine, plotTitle='')

Sets the intenstiy and occupation of each grid part (bin) for the 1D plots

setPlot1DFit(plot1DFit)

Set plotting the 1D fits

setPlot1DMask(maOccuLine, maBackLine, maFitLine, plotTitle='')

Sets the background, occupation and combination for the 1D plots

setPlot2DAxes(minSetAx1, maxSetAx1, minSetAx0, maxSetAx0, labelsAx1, labelsAx0)

Sets the axes for the 2D plots

setPlot2DData(intentArea, occuArea, plotTitle='')

Sets the intenstiy and occupation of each grid part (bin) for the 2D plots

setPlot2DMask(maOccuArea, maBackArea, maFitArea, plotTitle='')

Sets the background, occupation and combination for the 2D plots

setPlotFlags(flag2D=7, flag1D=7)

Sets the ploting flags for 2D and 1D plots binary code, flag & 1: intensity, flag & 2: missing grid parts, flag & 4: histogram of occupation of the grid parts

setPlotLayout(figSize=(11, 8.5), plotHor=4, plotVer=3, plotOrd='hv')

Set the options for the plotting window

figSize : figure size (width, height) in inches, e.g. (11, 8.5) plotHor : no. of horizontal images per window , e.g. 4 plotVer : no. of vertical images per window , e.g. 3 plotOrd : order of plotting, horizontal-vertical (‘hv’) of vertical-horizontal (‘vh’)

class pyspec.ccd.plotter.PlotGrid2(imProc)

Plot Grid Class

This class plots: intensity, occupation of the grid parts (bins), histogram of the occupation of a given 2D or 1D grid

getAxesLabels()

Get the plotting labels for the axes

axesLabels : labels for the axes [xLabel, yLabel, zLabel]

getHistBin(histBin=50)

Get the no. of bins for the histograms

hisBin : no. of bins for the histograms of the occupation numbers, default 50

getImProcessor(imProc)

Get instance of ImageProcessor to handle all data

imProc : instance of the ImageProcessor class

getLogFlags()

Get whether data are plotted on linear (0) or logarithmic (1) scale

flag1D : flag to select scale of 1D plots, default 0 flag2D : flag to select scale of 2D plots, default 0

binary code, flag & 1: intensity, flag & 2: missing grid parts

getPlot1DFit()

Get plotting the 1D fits

plot1DFit : plot 1D fits if True, default False

getPlotErr()

Get whether 1D data is shown with or without y-errorbars

plotErr : plot 1D y-errorbars if True, default False

getPlotFlags()

Get the ploting flags for 1D and 2D plots

flag1D : flag to select 1D plots, default 7 flag2D : flag to select 2D plots, default 7

binary code, flag & 1: intensity, flag & 2: occupation numbers of the grid parts (bins), flag & 4: histogram of occupation of the grid parts (bins)

getPlotWindow()

Get instance of PlotWindow class for plotting

plotWin : instance of the PlotWindow class, make new if None

plotAll()

Plots 1D/2D sums and cuts

plotGrid1D(calcMode='sum')

Select and plots the 1D Lines of the data grid

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’, ‘cutAv’

retrurns fig1 : plt.figure object of the plotting window allax1 : list of plt.axes objects which carry the figures

plotGrid2D(calcMode='sum')

Select and plots the 2D Areas of the data grid

plot data and occupation as (yz), (xz), (xy) = (ax0, ax1) areas and histograms calcMode : select which calculated values are plotted, ‘sum’, ‘cut’, ‘cutAv’

returns fig2 : plt.figure object of the plotting window allax2 : list of plt.axes objects which carry the figures

plotMask1D(calcMode='sum')

Select and plots the 1D Lines of the mask grids

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’

retrurns fig1 : plt.figure object of the plotting window allax1 : list of plt.axes objects which carry the figures

plotMask2D(calcMode='sum')

Select and plots the 2D Areas of the mask grid

calcMode : select which calculated values are plotted, ‘sum’, ‘cut’

retrurns fig2 : plt.figure object of the plotting window allax2 : list of plt.axes objects which carry the figures

setAxLabelsByFrameMode()

Set the labels of the axes regarding the frame mode

setAxesLabels(axesLabels)

Set the plotting labels for the axes

axesLabels : labels for the axes [xLabel, yLabel, zLabel]

setHistBin(histBin=50)

Set the no. of bins for the histograms

hisBin : no. of bins for the histograms of the occupation numbers, default 50

setImProcessor(imProc)

Set instance of ImageProcessor to handle all data

imProc : instance of the ImageProcessor class

setLogFlags(flag1D=0, flag2D=0)

Set whether data are plotted on linear (0) or logarithmic (1) scale

flag1D : flag to select scale of 1D plots, default 0 flag2D : flag to select scale of 2D plots, default 0

binary code, flag & 1: intensity, flag & 2: missing grid parts

setPlot1DFit(plot1DFit=False)

Set plotting the 1D fits

plot1DFit : plot 1D fits if True, default False

setPlotErr(plotErr=False)

Set whether 1D data is shown with or without y-errorbars

plotErr : plot 1D y-errorbars if True, default False

setPlotFlags(flag1D=7, flag2D=7)

Set the ploting flags for 1D and 2D plots

flag1D : flag to select 2D plots, default 7 flag2D : flag to select 1D plots, default 7

binary code, flag & 1: intensity, flag & 2: occupation numbers of the grid parts (bins), flag & 4: histogram of occupation of the grid parts (bins)

setPlotWindow(plotWin=None)

Set instance of PlotWindow class for plotting

plotWin : instance of the PlotWindow class, make new if None

class pyspec.ccd.plotter.PlotImages(fileProc, imProc)

Plot CCD-images

getHistBin()

Get the no. of bins for the histograms

hisBin : no. of bins for the histograms of the occupation numbers

getLogFlag()

Get whether data are plotted on linear (0) or logarithmic (1) scale

flag : flag to select between linear and logarithmic plotting

binary code, flag & 1: intensity, flag & 2: histogram

getPlotContent()

Get the image content for the plotting

plotSelect : list with the raw images which will be plotted, all if None plotType : plot raw images (‘raw’), dark image substracted (‘dark’),

normalized (‘norm’), background substracted (‘back’) ‘norm’ if None
getPlotFlag()

Get the ploting flag

flag : flag to select plots

binary code, flag & 1: intensity, flag & 2: histogram

getPlotLayout()

Get the options for the plotting window

figSize : figure size (width, height) in inches, e.g. (11, 8.5) plotHor : no. of horizontal images per window , e.g. 4 plotVer : no. of vertical images per window , e.g. 3 plotOrd : order of plotting, horizontal-vertical (‘hv’) of vertical-horizontal (‘vh’)

plotImages(plotSelect=None, plotType=None)

Select the plotting of the images

plotSelect : selction of the images for plotting, use object default if None plotType : plot raw images (‘raw’), dark image substracted (‘dark’),

normalized (‘norm’), background substracted (‘back’) object default or ‘norm’ if None

retrurns allfig : list of plt.figure objects of the plotting windows allax : list of plt.axes objects which carry the figures

setHistBin(histBin=50)

Set the no. of bins for the histograms

hisBin : no. of bins for the histograms of the occupation numbers

setLogFlag(flag=0)

Set whether data are plotted on linear (0) or logarithmic (1) scale

flag : flag to select between linear and logarithmic plotting

binary code, flag & 1: intensity, flag & 2: histogram

setPlotContent(plotSelect=None, plotType=None)

Set the image content for the plotting

plotSelect : list with the raw images which will be plotted, all if None plotType : plot raw images (‘raw’), dark image substracted (‘dark’),

normalized (‘norm’), background substracted (‘back’) ‘norm’ if None
setPlotFlag(flag=1)

Set the ploting flag

flag : flag to select plots

binary code, flag & 1: intensity, flag & 2: histogram

setPlotLayout(figSize=(11, 8.5), plotHor=4, plotVer=3, plotOrd='hv')

Set the options for the plotting window

figSize : figure size (width, height) in inches, e.g. (11, 8.5) plotHor : no. of horizontal images per window , e.g. 4 plotVer : no. of vertical images per window , e.g. 3 plotOrd : order of plotting, horizontal-vertical (‘hv’) of vertical-horizontal (‘vh’)

class pyspec.ccd.plotter.PlotWindow

Plot window for 1D and 2D data

options e.g. : size, axes order, labels, titles

getPlotData()

Get plotting data

plotData : list of data to plot for
1D entry [xData, yData, yError], 2D entry (n0, n1) np.array
getPlotDetails()

Get details of the singel plots

plotType : list of ‘oneD’, ‘twoD’ and ‘hist’, set from plotData if None plotLog : list of boolean, plot on log scale if True plotErr : list of boolean, plot with error bars if True plotOrigins : list of sting: None, ‘upper’ or ‘lower’ (only 2D) plotExtents : list of extents (only 2D), [ax1Min, ax1Max, ax0Min, ax0Max] histBins : list of number of bins for histograms, default 50

getPlotLayouts()

Get layout of the singel plots

plotTitles : list of plot titles, e.g. [‘Data’, ‘Occupation’] axesLabels : list of axes labels, e.g. [[xLabel, yLabel], [ax1Label, ax0Label]] plotKinds : list of plot kindes (only 1D), e.g. [‘-bo’, ‘-r’] dataLabels : list of data labels (only 1D), e.g. [‘Data’, ‘fit’] plotLegends : list of boolean, show legend if True (only 1D)

getPlotMarker(markerSizes=None, markerEdgeWidths=None, errLineWidths=None, capSizes=None)

Set layout properties of plot markers

markerSizes : list of marker sizes in pt , default 5 markerEdgeWidths : list of marker edges widths in pt , default 2 errLineWidths : list of error bar line widths in pt, default 2 capSizes : list of error bar cap sizes in pt , default 5

getWinLayout()

Get the options for the plotting window

fig : plt.figure for plotting, make new if None allax : list of plt.axes for plotting, make new if None figSize : figure size (width, height) in inches, e.g. (11, 8.5) plotHor : no. of horizontal images per window , e.g. 4 plotVer : no. of vertical images per window , e.g. 3 plotOrd : order of plotting, horizontal-vertical (‘hv’) of vertical-horizontal (‘vh’) winTitle : title of the window

plotAll()

Plot all data wiht regarding layout and details

setPlotData(plotData)

Set plotting data

plotData : list of data to plot for
1D entry [xData, yData], 2D entry (n0, n1) np.array

stores: plotNum : No. of entries to plot

setPlotDetails(plotType=None, plotLog=None, plotErr=None, plotOrigins=None, plotExtents=None, histBins=None)

Set details of the singel plots

plotType : list of ‘oneD’, ‘twoD’ and ‘hist’, set from plotData if None plotLog : list of boolean, plot on log scale if True plotErr : list of boolean, plot with error bars if True plotOrigins : list of sting: None, ‘upper’ or ‘lower’ (only 2D) plotExtents : list of extents (only 2D), [ax1Min, ax1Max, ax0Min, ax0Max] histBins : list of number of bins for histograms, default 50

setPlotLayouts(plotTitles=None, axesLabels=None, plotKinds=None, dataLabels=None, plotLegends=None)

Set layout of the singel plots

plotTitles : list of plot titles, e.g. [‘Data’, ‘Occupation’] axesLabels : list of axes labels, e.g. [[xLabel, yLabel], [ax1Label, ax0Label]] plotKinds : list of plot kindes (only 1D), e.g. [‘-bo’, ‘-r’] dataLabels : list of data labels (only 1D), e.g. [‘Data’, ‘fit’] plotLegends : list of boolean, show legend if True (only 1D)

setPlotMarker(markerSizes=None, markerEdgeWidths=None, errLineWidths=None, capSizes=None)

Set layout properties of plot markers

markerSizes : list of marker sizes in pt , default 5 markerEdgeWidths : list of marker edges widths in pt , default 2 errLineWidths : list of error bar line widths in pt, default 2 capSizes : list of error bar cap sizes in pt , default 5

setWinLayout(fig=None, allax=None, figSize=(11, 8.5), plotHor=3, plotVer=3, plotOrd='vh', winTitle='')

Set the options for the plotting window

fig : plt.figure for plotting, make new if None allax : list of plt.axes for plotting, make new if None figSize : figure size (width, height) in inches, e.g. (11, 8.5) plotHor : no. of horizontal images per window , e.g. 4 plotVer : no. of vertical images per window , e.g. 3 plotOrd : order of plotting, horizontal-vertical (‘hv’) of vertical-horizontal (‘vh’) winTitle : title of the window

Previous topic

ctrans - C Routines for fast CCD Analysis

Next topic

Calculating the standard error on the fly

This Page