basic¶
-
class
pdsspect.basic.BasicHistogramModel(*args, **kwargs)[source]¶ Bases:
pdsspect.histogram.HistogramModelModel for the hhistograms in the Basic Widgets
-
connected_models¶ list– OtherBasicHistogramModelfor other histograms
-
bins¶ intThe 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– Whenmodelis notBasicHistogramModel-
-
cut_high¶ floatThe 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¶ floatThe 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¶ tupleThe lower and higher cut levels. If the lower and higher cut levels are not set, use the image_view cut levelsSetting 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¶ ndarrayThe current image data
-
disconnect_model(model)[source]¶ Disconnect another model from this model
-
model BasicHistogramModel– Disconnect the model from current model
Raises: ValueError– Whenmodelis notBasicHistogramModel-
-
image_view¶ ImageViewCanvasThe 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
warnmethod 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.HistogramControllerController for histogram views
Parameters: - model (
BasicHistogramModel) – histogram model - view (
object) – View withBasicHistogramModelas its model
-
model¶ BasicHistogramModel– histogram model
-
view¶ object– View withBasicHistogramModelas 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.HistogramWidgetHistogramWidgetin a different layout
-
class
pdsspect.basic.BasicController(image_set, view)[source]¶ Bases:
objectController for
BasicwindowParameters: - 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.QWidgetWidget 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
Basicto 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.PDSSpectImageSetViewBaseWindow 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_menuParameters: new_index ( int) – The new index to determine the current image
- image_set (