pdsspect¶
-
class
pdsspect.pdsspect.PDSSpect(image_set)[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow,pdsspect.pdsspect_image_set.PDSSpectImageSetViewBaseMain 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
-
selection_btn¶ QtWidgets.QPushButton– Button to open the selections window
-
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
QtWidgets.QHBoxLayout– Layout for the buttons. If you want to re-adjust where the buttons go, override this attribute
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
-
image_sets¶ list– All the image sets, including the current one
-
-
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 pdsspectExamples
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 )