123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
- .. module:: plotWidget
- .. _plotWidget:
- Module plotWidget
- =================
- This Module implements the Plot Windows used in KCG
- .. py:class:: Enum()
- Simple Enum Class (as this is not supported by clean python)
- .. py:method:: __init__(self, *args)
- .. py:class:: CustomGradientEditorItem(pg.GradientEditorItem)
- A Gradient Editor Item to insert a perception linear gradient
- .. py:method:: __init__(self, **kwargs)
- .. py:method:: addGrad(self, name, grad_dic)
- Add a gradient to the list of gradients in the gui
- :param name: the name of the gradient
- :param grad_dic: the dictionary containing the gradient data
- .. py:method:: restoreState(self, state)
- Reimplemented of pyqtgraph.GradientEditorItem.restoreState to work with our custom perception linear gradient.
- :param state: the state to restore to
- .. py:method:: loadPreset(self, name)
- Reimplemented of pyqtgraph.GradientEditorItem.loadPreset to work with our custom perception linear gradient.
- :param name: the name of the preset to load
- .. py:method:: tickMoved(self, tick, pos)
- Reimplemented of pyqtgraph.GradientEditorItem.tickMoved to work with our custom perception linear gradient,
- which has a lot of steps which would create a lot of ticks in the gradient legend. This removes all but 2
- ticks and aligns all the internal ticks accordingly.
- :param tick: the tick to move
- :param pos: the position to move to
- .. py:class:: SpectrogramColorLegendItem(pg.GraphicsWidget)
- The Item used as Legend for Heatmap and FFT Plot
- .. py:method:: __init__(self, img=None)
- Initialise the Legend
- :param img: (ImageItem) the image item this is the legend for
- .. py:method:: gradient_changed(self)
- Proxy function for the gradient_cnahged event of the GradientEditorItem
- .. py:method:: set_image(self, img)
- Set the Image this is the legend for (only needed if not already done upon initialisation)
- :param img: (ImageItem) The image item to use
- .. py:method:: update_axis(self)
- Update the axis of this legend
- .. py:method:: reset_gradient(self)
- Reset the gradient to the preset "spectrum"
- .. py:method:: image_changed(self, reset_gradient=True)
- Call this to adjust the legend when the image has changed
- :param reset_gradient: (bool) whether to reset the gradient or not
- .. py:method:: getLookupTable(self, nPts, alpha=None)
- Get the look up table of the imageitem
- :param nPts: (int) number of points the lookup table is defined on
- :param alpha: ??
- .. py:method:: resizeEvent(self, event)
- Handle resizing of the window
- .. py:class:: SubPlotWidget(pg.GraphicsLayoutWidget)
- The Widget actually containing the plots and images
- .. py:method:: __init__(self, dType=FILE)
- .. py:method:: _enableCustomAutoRange(self, data)
- Enable custom auto range in this plot
- :param data: the data to autorange
- .. py:method:: _disableCustomAutoRange(self)
- Disable the custom autorange and reset it to default
- .. py:method:: plot(self, data, xvalueborders=None, yvalueborders=None, autorange=True)
- Plot Data. The plot type depends on the type property
- :param data: (dataset.DataSet) data to plot
- :param xvalueborders: (touple) the borders for the xvalues
- :param yvalueborders: (touple) the borders for the yvalues
- :param autorange: (bool) whether to perform a autorange or not
- .. py:method:: labelAxes(self)
- Add Labels to the axis depending on the self.plotType property.
- .. py:method:: changeType(self, type)
- Change the plot Type
- :param type: (int) the new type
- .. py:class:: PlotWidget(kcgw.KCGWidgets)
- The container Class holding various buttons and controls and the actual plots as SubPlotWidgets instance
- .. py:method:: __init__(self, board_id, parent=None, name=None, unique_id=None, type=None, datatype=None, prefix=None, fName=None, data=None)
- Initialise the Plot Widgt
- :param parent: (QWidget) the parent widget
- :param name: (str) name of this widget
- :param unique_id: (int) unique id of this widget
- :param type: (int) type of this widget
- :param datatype: (int) datatype (LIVE or FILE)
- :param prefix: (str) prefix for text in the listview in LeftBar
- :param fName: (str) the filename (this is only used if datatype is FILE)
- :param data: (dataset.DataSet) the data to be plotted
- .. py:method:: initUI(self)
- Initialise the UI
- .. py:method:: change_adc(self)
- Change the adc for which data is plotted
- .. py:method:: change_adc_compare(self, who)
- Change the adcs displayed in a compare plot
- .. py:method:: disable_buttons(self, b_bool)
- Disable the buttons on this widget
- This is not used at the moment
- :param b_bool: (bool) disable(False) or enable(True)
- .. py:method:: changePlotType(self, type)
- Change the plot type to the given type.
- :param type: the new type
- .. py:method:: plot(self, type=None)
- Wrapper function to call the correct plot function depending on type
- :param type: (int) the plot type
- .. py:method:: plot_live(self, type=None, data=None)
- Function to call when livedata is to be plotted
- :param type: (int) plot type
- :param data: (dataset.DataSet) data to plot
- .. py:method:: do_plot(self, type, autorange=True)
- Actually perform a plot (this calls SubPlotWidget.plot)
- :param type: (int) plot type
- :param autorange: (bool) whether to perform a autorange upon plot
- .. py:method:: change_identifier_text(self)
- Change the text that identifies the plot in the left bar
- .. py:method:: closeEvent(self, event)
- Event Handler to handle the event of closing this window
- :param event: QEvent
|