pdsspect_view

Window to pan the main image and open other dialog windows

class pdsspect.pdsspect_view.PDSSpectViewController(model, view)[source]

Bases: object

Controller for the PDSSpectView

Parameters:
  • image_set (PDSSpectImageSet) – pdsspect model
  • view (PDSpectView) – View to control
change_pan_center(x, y)[source]

Change the center of the pan

Parameters:
  • x (float) – The x coordinate of the center of the pan
  • y (float) – The y coordinate of the center of the pan
change_pan_size(zoom)[source]

Change the size of the pan by changing the zoom factor

Parameters:zoom (float) – The new zoom factor
class pdsspect.pdsspect_view.PDSSpectView(image_set)[source]

Bases: PyQt5.QtWidgets.QWidget, pdsspect.pdsspect_image_set.PDSSpectImageSetViewBase

View to pan the main image

Parameters:image_set (PDSSpectImageSet) – pdsspect model
image_set

PDSSpectImageSet – pdsspect model

controller

PDSSpectViewController

main_layout

QtWidgets.QVBoxLayout

zoom_layout

QtWidgets.QHBoxLayout – Layout for zoom_label and zoom_text

zoom_label

QtWidgets.QLabel – Label the zoom_text text box

zoom_text

QtWidgets.QLineEdit – Text box to enter the zoom factor. Zoom will change on return key

view_canvas

PDSImageViewCanvas – canvas to place the image on

pan

ginga.canvas.types.basic.Box – Pan that represents the pan. Data inside the pan is displayed in PanView

pan_view

PanView – View to display data in the pan

adjust_pan_size()[source]

Change the pan size as deterined by image_set

arrow_key_move_center(view_canvas, keyname)[source]

Adjust center with arrow press by a single pixel

Parameters:
  • view_canvas (view_canvas) – The view canvas
  • keyname (str) – Name of the key
change_center(view_canvas, button, data_x, data_y)[source]

Adjust center to mouse position. Arguments supplied by callback

Parameters:
  • view_canvas (view_canvas) – The view canvas
  • button (qtpy.QtCore.QMouseButton) – The mouse button pressed
  • data_x (float) – x coordinate of mouse
  • data_y (float) – y coordinate of the mouse
change_zoom()[source]

Change zoom to what is in the text box

move_pan()[source]

Move the pan as determined by the image_set

redraw()[source]

Redraw the view_canvas

set_image()[source]

Set image on view_canvas

set_transforms()[source]

Apply transforms flip_x, flip_y, and switch_xy

zoom_with_scroll(view_canvas, zoom_event)[source]

Change the zoom by 1 with the mouse wheel

Parameters:
  • view_canvas (view_canvas) – The view canvas
  • zoom_event (ginga.Bindings.ScrollEvent) – The zoom event
class pdsspect.pdsspect_view.PDSSpectViewWidget(image_set)[source]

Bases: PyQt5.QtWidgets.QWidget

Widget to hold the the differen PDSSpectView

Parameters:image_set (PDSSpectImageSet) – pdsspect model
image_set

PDSSpectImageSet – pdsspect model

create_spect_view(image_set)[source]

Create a PDSSpectView and add to the widget

Parameters:image_set (PDSSpectImageSet) – pdsspect model
Returns:spect_viewPDSSpectView added to the widget
Return type:PDSSpectView