basic¶
-
class
pdsspect.basic.
BasicHistogramModel
(*args, **kwargs)[source]¶ Bases:
pdsspect.histogram.HistogramModel
Model for the hhistograms in the Basic Widgets
-
connected_models
¶ list
– OtherBasicHistogramModel
for other histograms
-
bins
¶ int
The number of bins the histogram usesSetting the bins will notify the views that the bins have changed
-
connect_model
(model)[source]¶ Connect another model to this model
-
model
¶ BasicHistogramModel
– Connect the model to current model
Raises: ValueError
– Whenmodel
is notBasicHistogramModel
-
-
cut_high
¶ float
The higher cut levelSetting the high cut value will adjust the cut values in the image view and notify the views that the high cut value changed.
-
cut_low
¶ float
The lower cut levelSetting the low cut value will adjust the cut values in the image view and notify the views that the low cut value changed
-
cuts
¶ tuple
The lower and higher cut levels.Setting the cuts will adjust the cut levels in the image viewer and notify the views that the cuts have changed. The low cut must be less than the high cut, otherwise they will be switched to satisfy that condition.
-
data
¶ ndarray
The current image data
-
disconnect_model
(model)[source]¶ Disconnect another model from this model
-
model
BasicHistogramModel
– Disconnect the model from current model
Raises: ValueError
– Whenmodel
is notBasicHistogramModel
-
-
image_view
¶ ImageViewCanvas
The image view canvasSetting the image view will reset the data
-
register
(view)¶ Register a view with the model
Parameters: view ( QtWidgets.QWidget
) – A view that utilizes this model
-
restore
()¶ Restore the cut levels
-
set_data
()¶ Set the data the histogram is to display
-
unregister
(view)¶ Unregister a view with the model
Parameters: view ( QtWidgets.QWidget
) – A view that utilizes this model
-
warn
(title, message)¶ Display a warning box
Each view must define a
warn
method that returns a boolean value: True when a warning box is displayed and False when a warning box not displayed. Only one display box will be displayed. This is because multiple views should not have different handling for the same errors.
-
-
class
pdsspect.basic.
BasicHistogramController
(model, view)[source]¶ Bases:
pdsspect.histogram.HistogramController
Controller for histogram views
Parameters: - model (
BasicHistogramModel
) – histogram model - view (
object
) – View withBasicHistogramModel
as its model
-
model
¶ BasicHistogramModel
– histogram model
-
view
¶ object
– View withBasicHistogramModel
as its model
-
set_cut_high
(cut_high)[source]¶ Set the high cut level to a new value
Parameters: cut_high ( float
) – New high cut value
- model (
-
class
pdsspect.basic.
BasicHistogramWidget
(*args, **kwargs)[source]¶ Bases:
pdsspect.histogram.HistogramWidget
HistogramWidget
in a different layout
-
class
pdsspect.basic.
BasicController
(image_set, view)[source]¶ Bases:
object
Controller for
Basic
windowParameters: - image_set (
PDSSpectImageSet
) – pdsspect model - view (
Basic
) – View to control
-
image_set
¶ PDSSpectImageSet
– pdsspect model
- image_set (
-
class
pdsspect.basic.
BasicWidget
(image_set, view_canvas)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget to hold each basic window
Parameters: - image_set (
PDSSpectImageSet
) – pdsspect model - view_canvas (
PDSImageViewCanvas
) – view canvas
-
image_set
¶ PDSSpectImageSet
– pdsspect model
-
add_basic
(image_set, view_canvas)[source]¶ Add a
Basic
to the widgetParameters: - image_set (
PDSSpectImageSet
) – pdsspect model - view_canvas (
PDSImageViewCanvas
) – view canvas
- image_set (
- image_set (
-
class
pdsspect.basic.
Basic
(image_set, view_canvas, basic_widget)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
,pdsspect.pdsspect_image_set.PDSSpectImageSetViewBase
Window to apply cut levels and choose the current image
Parameters: - image_set (
PDSSpectImageSet
) – pdsspect model - view_canvas (
PDSImageViewCanvas
) – Canvas to view the image
-
image_set
¶ PDSSpectImageSet
– pdsspect model
-
view_canvas
¶ PDSImageViewCanvas
– Canvas to view the image
-
controller
¶ BasicController
– Controller for view
QtWidgets.QComboBox
– Drop down menu to pick the current image
-
histogram
¶ HistogramModel
– Model for thehistogram_widget
-
histogram_widget
¶ BasicHistogramWidget
– The histogram widget to adjust the cut levels
-
layout
¶ QtWidgets.QVBoxLayout
– The main layout
-
change_image
(new_index)[source]¶ Change the image when new image selected in
image_menu
Parameters: new_index ( int
) – The new index to determine the current image
- image_set (