set_wavelength

class pdsspect.set_wavelength.SetWavelengthModel(image_set)[source]

Bases: object

Model for SetWavelengthWidget

Parameters:image_set (PDSSpectImageSet) – pdsspect model
image_set

PDSSpectImageSet – pdsspect model

accepted_units

list – List of accepted units – nm, um, and AA

current_image

ImageStamp – Current image in menu

current_image_index

int – Index of current image in menu

display_current_wavelength()[source]

Display current wavelength in registered views

unit

strimage_set unit

Setting the :attr`unit` will set the image_set unit

unit_index

int Index of – attr`unit` in accepted_units

class pdsspect.set_wavelength.SetWavelengthController(model, view)[source]

Bases: object

Controller for SetWavelengthWidget

Parameters:
model

SetWavelengthModel – Model for SetWavelengthWidget

view

SetWavelengthWidget – The view to control

change_unit(index)[source]

Set the model’s SetWavelengthModel.unit

Parameters:index (int) – Index of SetWavelengthModel.accepted_units to change the SetWavelengthModel.unit to
set_current_image_index(index)[source]

Set the model’s SetWavelengthModel.current_image_index

Parameters:index (int) – Index to change SetWavelengthModel.current_image_index to
set_image_wavelength(wavelength)[source]

Set the model’s SetWavelengthModel.current_image wavelength

Parameters:wavelength (float) – The model’s SetWavelengthModel.current_image new wavelength
class pdsspect.set_wavelength.SetWavelengthWidget(model)[source]

Bases: PyQt5.QtWidgets.QMainWindow

Widget to set images wavelength

Using a QtWidgets.QMainWindow for the status bar at the bottom.

Parameters:model (SetWavelengthModel) – Model for SetWavelengthWidget
model

SetWavelengthModel – Model for SetWavelengthWidget

controller

SetWavelengthController – The widgets controller

image_menu

QtWidgets.QComboBox – Menu to choose the image to set the wavelength

wavelength_text

QtWidgets.QLineEdit – Text box to enter and display wavelength

units_menu

QtWidgets.QComboBox – Menu to choose unit of wavelength

main_layout

QtWidgets.QHBoxLayout – Main layout of widget

change_unit(index)[source]

Change SetWavelengthModel.unit to unit in units_menu

Parameters:index (int) – Index of SetWavelengthModel.accepted_units to change the SetWavelengthModel.unit to
display_current_wavelength()[source]

Display the SetWavelengthModel.current_image wavelength in wavelength_text

select_image(index)[source]

Select current image

Parameters:index (int) – Index to change SetWavelengthModel.current_image_index to
set_wavelength()[source]

Set the SetWavelengthModel.current_image wavelength to value in wavelength_text

show_status_bar_wavelength_set()[source]

Alert user wavelength is set