Skip to content

Commit

Permalink
Fix intersphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
percurnicus committed Jun 28, 2017
1 parent 38290ed commit 8070dac
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 58 deletions.
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
'numpy': ('http://numpy.readthedocs.io/en/latest/', None),
'pyside': ('https://srinikom.github.io/pyside-docs/', None),
'pyqt5': ('http://pyqt.sourceforge.net/Docs/PyQt5/', None),
'ginga': ('http://ginga.readthedocs.io/en/latest/', None),
}

import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
Expand Down
4 changes: 2 additions & 2 deletions pdsspect/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ class Basic(QtWidgets.QDialog, PDSSpectImageSetViewBase):
Canvas to view the image
controller : :class:`BasicController`
Controller for view
image_menu : :class:`QtWidgets.QComboBox`
image_menu : :class:`QtWidgets.QComboBox <PySide.QtGui.QComboBox>`
Drop down menu to pick the current image
histogram : :class:`~.histogram.HistogramModel`
Model for the :attr:`histogram_widget`
histogram_widget : :class:`BasicHistogramWidget`
The histogram widget to adjust the cut levels
layout : :class:`QtWidgets.QVBoxLayout`
layout : :class:`QtWidgets.QVBoxLayout <PySide.QtGui.QVBoxLayout>`
The main layout
"""

Expand Down
4 changes: 2 additions & 2 deletions pdsspect/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def register(self, view):
Parameters
----------
view : :class:`QtWidgets.QWidget`
view : :class:`QtWidgets.QWidget <PySide.QtGui.QWidget>`
A view that utilizes this model
"""
self._views.add(view)
Expand All @@ -170,7 +170,7 @@ def unregister(self, view):
Parameters
----------
view : :class:`QtWidgets.QWidget`
view : :class:`QtWidgets.QWidget <PySide.QtGui.QWidget>`
A view that utilizes this model
"""
self._views.remove(view)
Expand Down
6 changes: 3 additions & 3 deletions pdsspect/pan_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def add_ROI(self, coordinates):
Parameters
----------
coordinates : :class:`np.ndarray` or :obj:`tuple`
coordinates : :class:`numpy.ndarray` or :obj:`tuple`
Either a ``(m x 2)`` array or a tuple of two arrays
If an array, the first column are the x coordinates and the second
Expand All @@ -53,7 +53,7 @@ def erase_ROI(self, coordinates):
Parameters
----------
coordinates : :class:`np.ndarray` or :obj:`tuple`
coordinates : :class:`numpy.ndarray` or :obj:`tuple`
Either a ``(m x 2)`` array or a tuple of two arrays
If an array, the first column are the x coordinates and the second
Expand Down Expand Up @@ -82,7 +82,7 @@ class PanView(QtWidgets.QWidget, PDSSpectImageSetViewBase):
The view's controller
parent : None
The view's parent
main_layout : :class:`QtWidgets.QVBoxLayout`
main_layout : :class:`QtWidgets.QVBoxLayout <PySide.QtGui.QVBoxLayout>`
The main layout of the view
view_canvas : :class:`~pdsspect.pds_image_view_canvas.PDSImageViewCanvas`
Canvas to view the image
Expand Down
2 changes: 1 addition & 1 deletion pdsspect/pds_image_view_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_subview(self, subview):
Raises
------
TypeError
When subview is an and :class:`ImageViewCanvas` object
When subview is not an :class:`ImageViewCanvas` object
"""

if not isinstance(subview, ImageViewCanvas):
Expand Down
12 changes: 6 additions & 6 deletions pdsspect/pdsspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ class PDSSpect(QtWidgets.QMainWindow, PDSSpectImageSetViewBase):
The main viewer for panning
pan_view : :class:`~.pdsspect.pan_view.PanView`
The view in which the user makes ROI selections
selection_btn : :class:`~QtWidgets.QPushButton`
selection_btn : :class:`~QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Button to open the selections window
selection_window : :class:`Selection`
The selection window to adjust ROI, import ROIs, and export ROIs
basic_btn : :class:`~QtWidgets.QPushButton`
basic_btn : :class:`~QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Button to open the basic window
basic_window : :class:`Basic`
Window to adjust cut levels and change images
transforms_btn : :class:`QtWidgets.QPushButton`
transforms_btn : :class:`QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Open Transforms window
transforms_window : :class:`Transforms`
Window to flip x axis, flip y axis, or switch x and y axis
quit_btn : :class:`~QtWidgets.QPushButton`
quit_btn : :class:`~QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Quit
button_layout : :class:`~QtWidgets.QHBoxLayout`
button_layout : :class:`~QtWidgets.QHBoxLayout <PySide.QtGui.QHBoxLayout>`
Layout for the buttons. If you want to re-adjust where the buttons
go, override this attribute
main_layout : :class:`~QtWidgets.QVBoxLayout`
main_layout : :class:`~QtWidgets.QVBoxLayout <PySide.QtGui.QVBoxLayout>`
Place the image viewer over the buttons. Overide this attribute if
changing overall layout
"""
Expand Down
16 changes: 8 additions & 8 deletions pdsspect/pdsspect_image_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ def center(self, new_center):

@property
def all_rois_coordinates(self):
""":obj:`tuple` of two :class:`np.ndarray` : Coordinates of where there
is a pixel selected in a ROI
""":obj:`tuple` of two :class:`numpy.ndarray` : Coordinates of where
there is a pixel selected in a ROI
"""
return np.where((self._roi_data != 0).any(axis=2))

Expand Down Expand Up @@ -444,19 +444,19 @@ def edges(self):

@property
def pan_slice(self):
""":class:`np.s_` : A slice of the pan to extract data from an array"""
""":obj:`numpy.s_` : Slice of pan to extract data from an array"""
x1, y1, x2, y2 = self.edges
pan_slice = np.s_[y1:y2:1, x1:x2:1]
return pan_slice

@property
def pan_data(self):
""":class:`np.ndarray` : The data within the pan"""
""":class:`numpy.ndarray` : The data within the pan"""
return self.current_image.get_data()[self.pan_slice]

@property
def pan_roi_data(self):
""":class:`np.ndarray` : The ROI data in the pan"""
""":class:`numpy.ndarray` : The ROI data in the pan"""
return self._roi_data[self.pan_slice]

def _get_rgb255_from_color(self, color):
Expand Down Expand Up @@ -498,7 +498,7 @@ def _erase_coords(self, coordinates):
Parameters
----------
coordinates : :class:`np.ndarray` or :obj:`tuple`
coordinates : :class:`numpy.ndarray` or :obj:`tuple`
Either a ``(m x 2)`` array or a tuple of two arrays
If an array, the first column are the x coordinates and the second
Expand All @@ -515,7 +515,7 @@ def add_coords_to_roi_data_with_color(self, coordinates, color):
Parameters
----------
coordinates : :class:`np.ndarray` or :obj:`tuple`
coordinates : :class:`numpy.ndarray` or :obj:`tuple`
Either a ``(m x 2)`` array or a tuple of two arrays
If an array, the first column are the x coordinates and the second
Expand Down Expand Up @@ -558,7 +558,7 @@ def get_coordinates_of_color(self, color):
Returns
-------
coordinates : :obj:`tuple` of two :class:`np.ndarray`
coordinates : :obj:`tuple` of two :class:`numpy.ndarray`
The first array are the x coordinates and the second are the
corresponding y coordinates
"""
Expand Down
8 changes: 4 additions & 4 deletions pdsspect/pdsspect_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ class PDSSpectView(QtWidgets.QWidget, PDSSpectImageSetViewBase):
image_set : :class:`~.pdsspect_image_set.PDSSpectImageSet`
pdsspect model
controller : :class:`PDSSpectViewController`
main_layout : :class:`QtWidgets.QVBoxLayout`
zoom_layout : :class:`QtWidgets.QHBoxLayout`
main_layout : :class:`QtWidgets.QVBoxLayout <PySide.QtGui.QVBoxLayout>`
zoom_layout : :class:`QtWidgets.QHBoxLayout <PySide.QtGui.QHBoxLayout>`
Layout for :attr:`zoom_label` and :attr:`zoom_text`
zoom_label : :class:`QtWidgets.QLabel`
zoom_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label the :attr:`zoom_text` text box
zoom_text : :class:`QtWidgets.QLineEdit`
zoom_text : :class:`QtWidgets.QLineEdit <PySide.QtGui.QLineEdit>`
Text box to enter the zoom factor. Zoom will change on ``return key``
view_canvas : :class:`PDSImageViewCanvas`
canvas to place the image on
Expand Down
14 changes: 7 additions & 7 deletions pdsspect/roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def create_ROI(self, points=None):
Returns
-------
coordinates : :class:`np.ndarray`
coordinates : :class:`numpy.ndarray`
``m x 2`` array of coordinates.
"""

Expand All @@ -164,14 +164,14 @@ def contains_arr(self, x_arr, y_arr):
Parameters
----------
x_arr : :class:`np.ndarray`
x_arr : :class:`numpy.ndarray`
Array of x coodinates
y_arr : :class:`np.ndarray`
y_arr : :class:`numpy.ndarray`
Array of y coordinates
Returns
-------
result : :class:`np.ndarray`
result : :class:`numpy.ndarray`
Boolean array where coordinates that are in ROI are True
"""
# NOTE: we use a version of the ray casting algorithm
Expand Down Expand Up @@ -230,12 +230,12 @@ def _get_mask_from_roi(self, roi, mask=None):
----------
roi : :class:`ROIBase`
The region of interest
mask : :class:`np.ndarray`
mask : :class:`numpy.ndarray`
Boolean array of the image
Returns
-------
mask : :class:`np.ndarray`
mask : :class:`numpy.ndarray`
Boolean array of the image with ROI coordinates as ``True``
"""

Expand Down Expand Up @@ -515,7 +515,7 @@ def stop_ROI(self, data_x, data_y):
Returns
-------
coordinates : :class:`np.ndarray`
coordinates : :class:`numpy.ndarray`
Coordinates of points selected
"""

Expand Down
31 changes: 16 additions & 15 deletions pdsspect/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def add_ROI(self, coordinates, color):
Parameters
----------
coordinates : :class:`np.ndarray` or :obj:`tuple`
coordinates : :class:`numpy.ndarray` or :obj:`tuple`
Either a ``(m x 2)`` array or a tuple of two arrays
If an array, the first column are the x coordinates and the second
Expand Down Expand Up @@ -110,33 +110,34 @@ class Selection(QtWidgets.QDialog, PDSSpectImageSetViewBase):
Parent of the view
controller : :class:`SelectionController`
View controller
type_label : :class:`QtWidgets.QLabel`
type_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label for the selection menu
selection_menu : :class:`QtWidgets.QComboBox`
selection_menu : :class:`QtWidgets.QComboBox <PySide.QtGui.QComboBox>`
Drop down menu of selection types
type_layout : :class:`QtWidgets.QHBoxLayout`
type_layout : :class:`QtWidgets.QHBoxLayout <PySide.QtGui.QHBoxLayout>`
Horizontal box layout for selection
color_label : :class:`QtWidgets.QLabel`
color_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label for the :attr:`color_menu`
color_menu : :class:`QtWidgets.QComboBox`
color_menu : :class:`QtWidgets.QComboBox <PySide.QtGui.QComboBox>`
Drop down menu for color selection
color_layout : :class:`QtWidgets.QHBoxLayout`
color_layout : :class:`QtWidgets.QHBoxLayout <PySide.QtGui.QHBoxLayout>`
Horizontal box layout for color selection
opacity_label : :class:`QtWidgets.QLabel`
opacity_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label for the :attr:`opacity_slider`
opacity_slider : :class:`QtWidgets.QSlider`
opacity_slider : :class:`QtWidgets.QSlider <PySide.QtGui.QSlider>`
Slider to determine opacity for ROIs
opacity_layout : :class:`QtWidgets.QHBoxLayout`
opacity_layout : :class:`QtWidgets.QHBoxLayout <PySide.QtGui.QHBoxLayout>`
Horizontal box layout for opacity slider
clear_current_color_btn : :class:`QtWidgets.QPushButton`
clear_current_color_btn : :class:`QtWidgets.QPushButton
<PySide.QtGui.QPushButton>`
Button to clear all ROIs will the current color
clear_all_btn : :class:`QtWidgets.QPushButton`
clear_all_btn : :class:`QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Button to clear all ROIs
export_btn : :class:`QtWidgets.QPushButton`
export_btn : :class:`QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Export ROIs to ``.npz`` file
load_btn : :class:`QtWidgets.QPushButton`
load_btn : :class:`QtWidgets.QPushButton <PySide.QtGui.QPushButton>`
Load ROIs from ``.npz`` file
main_layout : :class:`QtWidgets.QVBoxLayout`
main_layout : :class:`QtWidgets.QVBoxLayout <PySide.QtGui.QVBoxLayout>`
Vertical Box layout for main layout
"""

Expand Down
14 changes: 7 additions & 7 deletions pdsspect/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ class Transforms(QtWidgets.QDialog, PDSSpectImageSetViewBase):
The view canvas to apply transformations to
controller : :class:`TransformsController`
The view's controller
flip_x_label : :class:`QtWidgets.QLabel`
flip_x_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label for :attr:`flip_x_box`
flip_x_box : :class:`QtWidgets.QCheckBox`
flip_x_box : :class:`QtWidgets.QCheckBox <PySide.QtGui.QCheckBox>`
Flip x axis when checked
flip_y_label : :class:`QtWidgets.QLabel`
flip_y_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label for :attr:`flip_y_box`
flip_y_box : :class:`QtWidgets.QCheckBox`
flip_y_box : :class:`QtWidgets.QCheckBox <PySide.QtGui.QCheckBox>`
Flip y axis when checked
swap_xy_label : :class:`QtWidgets.QLabel`
swap_xy_label : :class:`QtWidgets.QLabel <PySide.QtGui.QLabel>`
Label for :attr:`swap_xy_box`
swap_xy_box : :class:`QtWidgets.QCheckBox`
swap_xy_box : :class:`QtWidgets.QCheckBox <PySide.QtGui.QCheckBox>`
Swap x and y axis when checked
layout : :class:`QtWidgets.QGridLayout`
layout : :class:`QtWidgets.QGridLayout <PySide.QtGui.QGridLayout>`
Layout for widget
"""

Expand Down
4 changes: 2 additions & 2 deletions pdsspect/warningtimer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class WarningTimerController(object):
----------
model : :class:`WarningTimerModel`
The Warning Timer Model
view : :class:`QtWidgets.QMessageBox`
view : :class:`QtWidgets.QMessageBox <PySide.QtGui.QMessageBox>`
A message box with a :class:`WarningTimerModel` model
"""

Expand All @@ -128,7 +128,7 @@ class WarningTimer(QtWidgets.QMessageBox):
The Warning Timer Model
control : :class:`WarningTimerController`
The controller
timer : :class:`QtCore.QTimer`
timer : :class:`QtCore.QTimer <PySide.QtCore.QTimer>`
The timer
"""

Expand Down

0 comments on commit 8070dac

Please sign in to comment.