pdsspect

class pdsspect.pdsspect.PDSSpect(image_set)[source]

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

Main Window of pdsspect

Parameters:image_set (PDSSpectImageSet) – pdsspect model
image_set

PDSSpectImageSet – The model for each view

pdsspect_view

PDSSpectViewWidget – The main viewer for panning

pan_view

PanView – The view in which the user makes ROI selections

selection_btn

QtWidgets.QPushButton – Button to open the selections window

selection_window

Selection – The selection window to adjust ROI, import ROIs, and export ROIs

basic_btn

QtWidgets.QPushButton – Button to open the basic window

basic_window

BasicWidget – Window to adjust cut levels and change images

transforms_btn

QtWidgets.QPushButton – Open Transforms window

transforms_window

Transforms – Window to flip x axis, flip y axis, or switch x and y axis

roi_histogram_btn

QPushButton – Open ROI Histogram window

roi_histogram_window

ROIHistogramWidget – The ROI Histogram Window

roi_line_plot_btn

QPushButton – Open ROI Line Plot window

roi_line_plot_window

ROILinePlotWidget – The ROI Line Plot Window

add_window_btn

QPushButton – Add another window

quit_btn

QtWidgets.QPushButton – Quit

button_layout1

QtWidgets.QHBoxLayout – Layout for the buttons. If you want to re-adjust where the buttons go, override this attribute

button_layout2

QtWidgets.QHBoxLayout – Layout for the buttons. If you want to re-adjust where the buttons go, override this attribute

main_layout

QtWidgets.QVBoxLayout – Place the image viewer over the buttons. Overide this attribute if changing overall layout

add_window()[source]

Add another window to make more ROIs

image_sets

list – All the image sets, including the current one

open_basic()[source]

Open the Basic Window

open_roi_histogram()[source]

Open the ROI Histogram Window

open_roi_line_plot()[source]

Open the ROI Line Plot Window

open_selection()[source]

Open the Selection Window

open_set_wavelengths()[source]

Open Set Wavelengths window

open_transforms()[source]

Open the Transforms Window

quit(*args)[source]

Quit pdsspect

pdsspect.pdsspect.pdsspect(inlist=None)[source]

Run pdsspect from python shell or command line with arguments

Parameters:inlist (list) – A list of file names/paths to display in the pdsspect

Examples

From the command line:

To view all images from current directory

pdsspect

To view all images in a different directory

pdsspect path/to/different/directory/

This is the same as:

pdsspect path/to/different/directory/*

To view a specific image or types of images

pdsspect 1p*img

To view images from multiple directories:

pdsspect * path/to/other/directory/

From the (i)python command line:

>>> from pdsspect.pdsspect import pdsspect
>>> pdsspect()
Displays all of the images from current directory
>>> pdsspect('path/to/different/directory')
Displays all of the images in the different directory
>>> pdsspect ('1p*img')
Displays all of the images that follow the glob pattern
>>> pdsspect('a1.img, b*.img, example/path/x*img')
You can display multiple images, globs, and paths in one window by
separating each item by a command
>>> pdsspect(['a1.img, b3.img, c1.img, d*img'])
You can also pass in a list of files/globs
pdsspect returns a dictionary of the ROIs:
>>> rois = pdsspect(['a1.img, b3.img, c1.img, d*img'])
>>> rois['red'][:2, :2]
array(
    [
        [False, False],
        [False, False]
    ],
    dtype=bool
)