roi_plot¶
Parent classes for any widget that plots data
-
class
pdsspect.roi_plot.
ROIPlotModel
(image_set)[source]¶ Bases:
object
Model for ROI Plot and accompanying widget
Parameters: image_set ( PDSSpectImageSet
) – pdsspect model-
selected_colors
¶ list
– Colors to display in the histogram
-
latex_units
¶ list
of 3str
– The latex strings ofpdsspect_image_set.PDSSpectImageSet.accepted_units
-
add_selected_color
(color)[source]¶ Select a color and inform views to display new color
Parameters: color ( str
) – The color to add
-
image_set
¶ PDSSpectImageSet
– Image set that corresponds with the current view
-
image_sets
¶ list
– All the image sets, including the current one
-
remove_selected_color
(color)[source]¶ Remove a selected color and inform views to not display the color
Parameters: color ( str
) – The color to remove
-
unit
¶ str
– Latex version ofpdsspect_image_set.PDSSpectImageSet.unit
-
-
class
pdsspect.roi_plot.
ROIPlotController
(model, view)[source]¶ Bases:
object
Controller for ROI plot and accompanying widget
Parameters: - model (
ROIPlotModel
) – The model - view (
QtWidgets.QWidget
) – The view
-
model
¶ ROIPlotModel
– The model
-
view
¶ QtWidgets.QWidget
– The view
- model (
-
class
pdsspect.roi_plot.
ROIPlotWidget
(model)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
,pdsspect.pdsspect_image_set.PDSSpectImageSetViewBase
Widget to hold the histogram and checkboxs
Checkboxes are created in
create_color_checkbox()
which is why they do not appear in the__init__()
method.Parameters: model ( ROIPlotModel
) – The model-
model
¶ ROIPlotModel
– The model
-
controller
¶ ROIPlotController
– The controller
-
checkbox_layout
¶ QtWidgets.QVBoxLayout
– Place the checkboxes vertically
-
main_layout
¶ QtWidgets.QGridLayout
– Place in grid layout so histogram stretches while boxes are stationary
-
save_btn
¶ QtWidgets.QPushButton
– Save the plot as an image
-
red_checkbox
¶ ColorCheckBox
– Red checkbox that displays red ROI data when checked
-
brown_checkbox
¶ ColorCheckBox
– Brown checkbox that displays brown ROI data when checked
-
lightblue_checkbox
¶ ColorCheckBox
– Lightblue checkbox that displays lightblue ROI data when checked
-
lightcyan_checkbox
¶ ColorCheckBox
– Lightcyan checkbox that displays lightcyan ROI data when checked
-
darkgreen_checkbox
¶ ColorCheckBox
– Darkgreen checkbox that displays darkgreen ROI data when checked
-
yellow_checkbox
¶ ColorCheckBox
– Yellow checkbox that displays yellow ROI data when checked
-
pink_checkbox
¶ ColorCheckBox
– Pink checkbox that displays pink ROI data when checked
-
teal_checkbox
¶ ColorCheckBox
– Teal checkbox that displays teal ROI data when checked
-
goldenrod_checkbox
¶ ColorCheckBox
– Goldenrod checkbox that displays goldenrod ROI data when checked
-
sienna_checkbox
¶ ColorCheckBox
– Sienna checkbox that displays sienna ROI data when checked
-
darkblue_checkbox
¶ ColorCheckBox
– Darkblue checkbox that displays darkblue ROI data when checked
-
crimson_checkbox
¶ ColorCheckBox
– Crimson checkbox that displays crimson ROI data when checked
-
maroon_checkbox
¶ ColorCheckBox
– Maroon checkbox that displays maroon ROI data when checked
-
purple_checkbox
¶ ColorCheckBox
– Purple checkbox that displays purple ROI data when checked
-
add_view
(index=None)[source]¶ Add a view box to the widget
Parameters: index ( int
[Default None]) – The index to add the view to
-
check_color
(checkbox_color)[source]¶ Called when the state a checkbox is changed
Parameters: checkbox_color ( str
) – The color label of the check box
-
check_view_checkbox
(view_checkbox)[source]¶ Check the view box at the given index
Parameters: view_checkbox ( ViewCheckBox
) – The view check box whose state changed
-
-
class
pdsspect.roi_plot.
ROIPlot
(model)[source]¶ Bases:
matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg
,pdsspect.pdsspect_image_set.PDSSpectImageSetViewBase
Plot of the data in each ROI color
Parameters: - model (
ROIPlotModel
) – The model - image_set (
PDSSpectImageSet
) – pdsspect model
-
model
¶ ROIPlotModel
– The model
-
image_set
¶ PDSSpectImageSet
– pdsspect model
- model (
-
class
pdsspect.roi_plot.
ColorCheckBox
(color)[source]¶ Bases:
PyQt5.QtWidgets.QCheckBox
Custom checkbox that emits its color (
str
) when toggledParameters: color ( str
) – The color to name the checkbox-
stateChanged
¶ QtCore.Signal
– Signal that emits a string when check box changes its stateRead more about Signals here
-
-
class
pdsspect.roi_plot.
ViewCheckBox
(index)[source]¶ Bases:
PyQt5.QtWidgets.QCheckBox
Custom checkbox that emits its index (
int
) when toggledParameters: index ( int
) – The index of the view-
stateChanged
¶ QtCore.Signal
– Signal that emits the box itself when check box changes its stateRead more about Signals here
-