summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:20 +0200
committerAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:20 +0200
commit654a6ac93513c3cc1ef97cacd782ff674c6f4559 (patch)
tree3b986e4972de7c57fa465820367602fc34bcb0d3 /doc
parenta763e5d1b3921b3194f3d4e94ab9de3fbe08bbdd (diff)
New upstream version 0.11.0+dfsg
Diffstat (limited to 'doc')
-rw-r--r--doc/source/ext/snapshotqt_directive.py29
-rw-r--r--doc/source/install.rst4
-rw-r--r--doc/source/modules/gui/icons.rst9
-rw-r--r--doc/source/modules/gui/plot/index.rst7
-rw-r--r--doc/source/modules/gui/plot/statswidget.rst8
-rw-r--r--doc/source/modules/gui/plot/utils.rst12
-rw-r--r--doc/source/modules/gui/plot3d/glutils.rst10
-rw-r--r--doc/source/modules/opencl/convolution.rst10
-rw-r--r--doc/source/modules/opencl/index.rst3
-rw-r--r--doc/source/modules/opencl/processing.rst10
-rw-r--r--doc/source/modules/opencl/statistics.rst10
-rw-r--r--doc/source/sample_code/img/plot3dUpdateScatterFromThread.pngbin0 -> 181775 bytes
-rw-r--r--doc/source/sample_code/index.rst91
13 files changed, 115 insertions, 88 deletions
diff --git a/doc/source/ext/snapshotqt_directive.py b/doc/source/ext/snapshotqt_directive.py
index 53508df..81305e0 100644
--- a/doc/source/ext/snapshotqt_directive.py
+++ b/doc/source/ext/snapshotqt_directive.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2018 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -39,41 +39,14 @@ __date__ = "07/12/2018"
import os
import logging
-import subprocess
import sys
-import distutils
-import shutil
from docutils.parsers.rst.directives.images import Image
from docutils.parsers.rst import directives
-from docutils.parsers.rst import Directive
-from docutils.nodes import fully_normalize_name
-from docutils import nodes
# from docutils.par
# note: conf.py is patching the PATH so this will be the 'current' qt version
-
-def _distutils_dir_name(dname="lib"):
- """
- Returns the name of a distutils build directory
- """
- platform = distutils.util.get_platform()
- architecture = "%s.%s-%i.%i" % (dname, platform,
- sys.version_info[0], sys.version_info[1])
- return architecture
-
home = os.path.abspath(os.path.join(__file__, "..", "..", "..", '..'))
-home = os.path.abspath(home)
-LIBPATH = os.path.join(home, 'build', _distutils_dir_name('lib'))
-
-if not os.path.exists(LIBPATH):
- raise RuntimeError("%s is not on the path. Fix your PYTHONPATH and restart sphinx." % project)
-
-sys.path.append(LIBPATH)
-env = os.environ.copy()
-env.update(
- {"PYTHONPATH": LIBPATH + os.pathsep + os.environ.get("PYTHONPATH", ""),
- "PATH": os.environ.get("PATH", "")})
if not os.environ.get('DIRECTIVE_SNAPSHOT_QT') == 'True':
diff --git a/doc/source/install.rst b/doc/source/install.rst
index 7941a7b..3862e4c 100644
--- a/doc/source/install.rst
+++ b/doc/source/install.rst
@@ -110,7 +110,7 @@ Linux
Packages are available for a few distributions:
-- Debian 8: see `Installing a Debian package`_.
+- Debian 9: see `Installing a Debian package`_.
- `CentOS 7 RPM packages <http://pubrepo.maxiv.lu.se/rpm/el7/x86_64/>`_ provided by the Max IV institute at Lund, Sweden.
- `Fedora 23 rpm packages <http://pubrepo.maxiv.lu.se/rpm/fc23/x86_64/>`_ provided by the Max IV institute at Lund, Sweden.
- `Arch Linux (AUR) package <https://aur.archlinux.org/packages/python-silx>`_ provided by Leonid Bloch.
@@ -125,7 +125,7 @@ You can also follow one of those installation procedures:
Installing a Debian package
+++++++++++++++++++++++++++
-Debian 8 (Jessie) packages are available on http://www.silx.org/pub/debian/ for amd64 computers.
+Debian 9 (Stretch) packages are available on http://www.silx.org/pub/debian/ for amd64 computers.
To install it, you need to download this file :
.. code-block:: bash
diff --git a/doc/source/modules/gui/icons.rst b/doc/source/modules/gui/icons.rst
index 659bc4c..dbd58b4 100644
--- a/doc/source/modules/gui/icons.rst
+++ b/doc/source/modules/gui/icons.rst
@@ -75,6 +75,8 @@ Available icons
- compare-align-stretch
* - |compare-keypoints|
- compare-keypoints
+ * - |compare-mode-a-minus-b|
+ - compare-mode-a-minus-b
* - |compare-mode-a|
- compare-mode-a
* - |compare-mode-b|
@@ -121,6 +123,8 @@ Available icons
- draw-rubber
* - |edit-copy|
- edit-copy
+ * - |eye|
+ - eye
* - |first|
- first
* - |folder|
@@ -251,6 +255,8 @@ Available icons
- plot-ylog
* - |plot-yup|
- plot-yup
+ * - |pointing-hand|
+ - pointing-hand
* - |previous|
- previous
* - |profile-clear|
@@ -370,6 +376,7 @@ Available icons
.. |compare-align-origin| image:: ../../../../silx/resources/gui/icons/compare-align-origin.png
.. |compare-align-stretch| image:: ../../../../silx/resources/gui/icons/compare-align-stretch.png
.. |compare-keypoints| image:: ../../../../silx/resources/gui/icons/compare-keypoints.png
+.. |compare-mode-a-minus-b| image:: ../../../../silx/resources/gui/icons/compare-mode-a-minus-b.png
.. |compare-mode-a| image:: ../../../../silx/resources/gui/icons/compare-mode-a.png
.. |compare-mode-b| image:: ../../../../silx/resources/gui/icons/compare-mode-b.png
.. |compare-mode-hline| image:: ../../../../silx/resources/gui/icons/compare-mode-hline.png
@@ -393,6 +400,7 @@ Available icons
.. |draw-pencil| image:: ../../../../silx/resources/gui/icons/draw-pencil.png
.. |draw-rubber| image:: ../../../../silx/resources/gui/icons/draw-rubber.png
.. |edit-copy| image:: ../../../../silx/resources/gui/icons/edit-copy.png
+.. |eye| image:: ../../../../silx/resources/gui/icons/eye.png
.. |first| image:: ../../../../silx/resources/gui/icons/first.png
.. |folder| image:: ../../../../silx/resources/gui/icons/folder.png
.. |image-mask| image:: ../../../../silx/resources/gui/icons/image-mask.png
@@ -458,6 +466,7 @@ Available icons
.. |plot-ydown| image:: ../../../../silx/resources/gui/icons/plot-ydown.png
.. |plot-ylog| image:: ../../../../silx/resources/gui/icons/plot-ylog.png
.. |plot-yup| image:: ../../../../silx/resources/gui/icons/plot-yup.png
+.. |pointing-hand| image:: ../../../../silx/resources/gui/icons/pointing-hand.png
.. |previous| image:: ../../../../silx/resources/gui/icons/previous.png
.. |profile-clear| image:: ../../../../silx/resources/gui/icons/profile-clear.png
.. |profile1D| image:: ../../../../silx/resources/gui/icons/profile1D.png
diff --git a/doc/source/modules/gui/plot/index.rst b/doc/source/modules/gui/plot/index.rst
index 6f06830..01cb29b 100644
--- a/doc/source/modules/gui/plot/index.rst
+++ b/doc/source/modules/gui/plot/index.rst
@@ -61,6 +61,13 @@ Additionnal plot tool widgets:
statswidget.rst
stats/index.rst
+Utilities
+
+.. toctree::
+ :maxdepth: 2
+
+ utils.rst
+
Internals
---------
diff --git a/doc/source/modules/gui/plot/statswidget.rst b/doc/source/modules/gui/plot/statswidget.rst
index 6cd8ecf..1574abc 100644
--- a/doc/source/modules/gui/plot/statswidget.rst
+++ b/doc/source/modules/gui/plot/statswidget.rst
@@ -32,18 +32,18 @@
:members:
-:class:`BasicGridStatsWidget` class
+:class:`BasicLineStatsWidget` class
-----------------------------------
-.. autoclass:: BasicGridStatsWidget
+.. autoclass:: BasicLineStatsWidget
:show-inheritance:
:members:
-:class:`BasicLineStatsWidget` class
+:class:`BasicGridStatsWidget` class
-----------------------------------
-.. autoclass:: BasicLineStatsWidget
+.. autoclass:: BasicGridStatsWidget
:show-inheritance:
:members:
diff --git a/doc/source/modules/gui/plot/utils.rst b/doc/source/modules/gui/plot/utils.rst
new file mode 100644
index 0000000..e930208
--- /dev/null
+++ b/doc/source/modules/gui/plot/utils.rst
@@ -0,0 +1,12 @@
+.. currentmodule:: silx.gui.plot.utils
+
+
+:mod:`axis`: utilities for plots
+================================
+
+SyncAxes
+--------
+
+.. autoclass:: silx.gui.plot.utils.axis.SyncAxes
+ :members:
+
diff --git a/doc/source/modules/gui/plot3d/glutils.rst b/doc/source/modules/gui/plot3d/glutils.rst
index 2c36e83..21781d9 100644
--- a/doc/source/modules/gui/plot3d/glutils.rst
+++ b/doc/source/modules/gui/plot3d/glutils.rst
@@ -13,13 +13,17 @@
Utility functions
-----------------
-.. currentmodule:: silx.gui._glutils
+.. currentmodule:: silx.gui._glutils.Context
For OpenGL context management:
-.. autofunction:: getGLContext
+.. autofunction:: getCurrent
+
+.. autofunction:: setCurrent
-.. autofunction:: setGLContextGetter
+.. autofunction:: current
+
+.. currentmodule:: silx.gui._glutils
For type checking and conversion:
diff --git a/doc/source/modules/opencl/convolution.rst b/doc/source/modules/opencl/convolution.rst
new file mode 100644
index 0000000..225d016
--- /dev/null
+++ b/doc/source/modules/opencl/convolution.rst
@@ -0,0 +1,10 @@
+
+.. currentmodule:: silx.opencl
+
+:mod:`convolution`: Convolution
+-------------------------------
+
+.. automodule:: silx.opencl.convolution
+ :members: Convolution, gaussian_kernel
+ :show-inheritance:
+ :undoc-members:
diff --git a/doc/source/modules/opencl/index.rst b/doc/source/modules/opencl/index.rst
index 20a3a01..ef8b9e6 100644
--- a/doc/source/modules/opencl/index.rst
+++ b/doc/source/modules/opencl/index.rst
@@ -11,6 +11,9 @@
sift/index.rst
fbp.rst
sinofilter.rst
+ processing.rst
+ convolution.rst
+ statistics.rst
medfilt.rst
codec_cbf.rst
diff --git a/doc/source/modules/opencl/processing.rst b/doc/source/modules/opencl/processing.rst
new file mode 100644
index 0000000..a246cc6
--- /dev/null
+++ b/doc/source/modules/opencl/processing.rst
@@ -0,0 +1,10 @@
+
+.. currentmodule:: silx.opencl
+
+:mod:`processing`: Processing
+-------------------------------
+
+.. automodule:: silx.opencl.processing
+ :members: OpenclProcessing, KernelContainer
+ :show-inheritance:
+ :undoc-members:
diff --git a/doc/source/modules/opencl/statistics.rst b/doc/source/modules/opencl/statistics.rst
new file mode 100644
index 0000000..0db7566
--- /dev/null
+++ b/doc/source/modules/opencl/statistics.rst
@@ -0,0 +1,10 @@
+
+.. currentmodule:: silx.opencl
+
+:mod:`statistics`: Statistics
+-------------------------------
+
+.. automodule:: silx.opencl.statistics
+ :members: Statistics
+ :show-inheritance:
+ :undoc-members:
diff --git a/doc/source/sample_code/img/plot3dUpdateScatterFromThread.png b/doc/source/sample_code/img/plot3dUpdateScatterFromThread.png
new file mode 100644
index 0000000..acd1c58
--- /dev/null
+++ b/doc/source/sample_code/img/plot3dUpdateScatterFromThread.png
Binary files differ
diff --git a/doc/source/sample_code/index.rst b/doc/source/sample_code/index.rst
index a5cbf11..409391f 100644
--- a/doc/source/sample_code/index.rst
+++ b/doc/source/sample_code/index.rst
@@ -25,8 +25,7 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`icons.py <../../../examples/icons.py>`
- .. image:: img/icons.png
- :height: 150px
- :align: center
+ :width: 150px
- Display icons and animated icons provided by silx.
:mod:`silx.gui.data` and :mod:`silx.gui.hdf5`
@@ -41,18 +40,15 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`customHdf5TreeModel.py <../../../examples/customHdf5TreeModel.py>`
- .. image:: img/customHdf5TreeModel.png
- :height: 150px
- :align: center
+ :width: 150px
- Qt Hdf5 widget examples
* - :download:`customDataView.py <../../../examples/customDataView.py>`
- .. image:: img/customDataView.png
- :height: 150px
- :align: center
+ :width: 150px
- Qt data view example
* - :download:`hdf5widget.py <../../../examples/hdf5widget.py>`
- .. image:: img/hdf5widget.png
- :height: 150px
- :align: center
+ :width: 150px
- Qt Hdf5 widget examples
.. note:: This module has a dependency on the `h5py <http://www.h5py.org/>`_
@@ -71,8 +67,7 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`fileDialog.py <../../../examples/fileDialog.py>`
- .. image:: img/fileDialog.png
- :height: 150px
- :align: center
+ :width: 150px
- Example for the use of the ImageFileDialog.
:mod:`silx.gui.widgets`
@@ -87,14 +82,13 @@ All sample codes can be downloaded as a zip file: |sample_code_archive|.
- Description
* - :download:`periodicTable.py <../../../examples/periodicTable.py>`
- .. image:: img/periodicTable.png
- :height: 150px
+ :width: 150px
:align: center
- This script is a simple example of how to use the periodic table widgets,
select elements and connect signals.
* - :download:`simplewidget.py <../../../examples/simplewidget.py>`
- .. image:: img/simplewidget.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows a gallery of simple widgets provided by silx.
It shows the following widgets:
@@ -117,8 +111,7 @@ Widgets
- Description
* - :download:`imageview.py <../../../examples/imageview.py>`
- .. image:: img/imageview.png
- :height: 150px
- :align: center
+ :width: 150px
- Example to show the use of :mod:`~silx.gui.plot.ImageView` widget.
It can be used to open an EDF or TIFF file from the shell command line.
@@ -134,14 +127,12 @@ Widgets
``./bootstrap.py python examples/imageview.py <file to open>``
* - :download:`stackView.py <../../../examples/stackView.py>`
- .. image:: img/stackView.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is a simple example to illustrate how to use the
:mod:`~silx.gui.plot.StackView` widget.
* - :download:`colormapDialog.py <../../../examples/colormapDialog.py>`
- .. image:: img/colormapDialog.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows the features of a :mod:`~silx.gui.dialog.ColormapDialog`.
:class:`silx.gui.plot.actions.PlotAction`
@@ -158,16 +149,14 @@ Sample code that adds buttons to the toolbar of a silx plot widget.
- Description
* - :download:`plotClearAction.py <../../../examples/plotClearAction.py>`
- .. image:: img/plotClearAction.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows how to create a minimalistic
:class:`~silx.gui.plot.actions.PlotAction` that clear the plot.
This illustrates how to add more buttons in a plot widget toolbar.
* - :download:`shiftPlotAction.py <../../../examples/shiftPlotAction.py>`
- .. image:: img/shiftPlotAction.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is a simple (trivial) example of how to create a :class:`~silx.gui.plot.PlotWindow`,
create a custom :class:`~silx.gui.plot.actions.PlotAction` and add it to the toolbar.
@@ -176,8 +165,7 @@ Sample code that adds buttons to the toolbar of a silx plot widget.
* - :download:`fftPlotAction.py <../../../examples/fftPlotAction.py>`,
:download:`fft.png <../../../examples/fft.png>`
- .. image:: img/fftPlotAction.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is a simple example of how to create a :class:`~silx.gui.plot.PlotWindow`
with a custom :class:`~silx.gui.plot.actions.PlotAction` added to the toolbar.
@@ -206,8 +194,7 @@ Sample code that adds specific tools or functions to plot widgets.
- Description
* - :download:`plotWidget.py <../../../examples/plotWidget.py>`
- .. image:: img/plotWidget.png
- :height: 150px
- :align: center
+ :width: 150px
- This script shows how to create a custom window around a PlotWidget.
It subclasses :class:`QMainWindow`, uses a :class:`~silx.gui.plot.PlotWidget`
@@ -220,8 +207,7 @@ Sample code that adds specific tools or functions to plot widgets.
- :class:`silx.gui.plot.ColorBar.ColorBarWidget`
* - :download:`plotContextMenu.py <../../../examples/plotContextMenu.py>`
- .. image:: img/plotContextMenu.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the addition of a context menu to a
:class:`~silx.gui.plot.PlotWidget`.
@@ -237,20 +223,17 @@ Sample code that adds specific tools or functions to plot widgets.
For more information on context menus, see Qt documentation.
* - :download:`plotItemsSelector.py <../../../examples/plotItemsSelector.py>`
- .. image:: img/plotItemsSelector.png
- :height: 150px
- :align: center
+ :width: 150px
- This example illustrates how to use a :class:`ItemsSelectionDialog` widget
associated with a :class:`~silx.gui.plot.PlotWidget`
* - :download:`plotLimits.py <../../../examples/plotLimits.py>`
- .. image:: img/plotLimits.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is an example to illustrate how to use axis synchronization
tool.
* - :download:`plotUpdateCurveFromThread.py <../../../examples/plotUpdateCurveFromThread.py>`
- .. image:: img/plotUpdateCurveFromThread.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the update of a :mod:`silx.gui.plot` widget from a thread.
The problem is that plot and GUI methods should be called from the main thread.
@@ -263,8 +246,7 @@ Sample code that adds specific tools or functions to plot widgets.
of a plot.
* - :download:`plotUpdateImageFromThread.py <../../../examples/plotUpdateImageFromThread.py>`
- .. image:: img/plotUpdateImageFromThread.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the update of a :mod:`silx.gui.plot` widget from a thread.
The problem is that plot and GUI methods should be called from the main thread.
@@ -277,8 +259,7 @@ Sample code that adds specific tools or functions to plot widgets.
of a plot.
* - :download:`plotInteractiveImageROI.py <../../../examples/plotInteractiveImageROI.py>`
- .. image:: img/plotInteractiveImageROI.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates image ROI selection in a :class:`~silx.gui.plot.PlotWidget`
It uses :class:`~silx.gui.plot.tools.roi.RegionOfInterestManager` and
@@ -286,8 +267,7 @@ Sample code that adds specific tools or functions to plot widgets.
interactive selection and to display the list of selected ROIs.
* - :download:`printPreview.py <../../../examples/printPreview.py>`
- .. image:: img/printPreview.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates how to add a print preview tool button to any plot
widget inheriting :class:`~silx.gui.plot.PlotWidget`.
@@ -298,14 +278,12 @@ Sample code that adds specific tools or functions to plot widgets.
which allows them to send their content to the same print preview page.
* - :download:`scatterMask.py <../../../examples/scatterMask.py>`
- .. image:: img/scatterMask.png
- :height: 150px
- :align: center
+ :width: 150px
- This example demonstrates how to use ScatterMaskToolsWidget
and NamedScatterAlphaSlider with a PlotWidget.
* - :download:`syncaxis.py <../../../examples/syncaxis.py>`
- .. image:: img/syncaxis.png
- :height: 150px
- :align: center
+ :width: 150px
- This script is an example to illustrate how to use axis synchronization
tool.
@@ -323,8 +301,7 @@ Sample code that adds specific tools or functions to plot widgets.
- Description
* - :download:`plot3dContextMenu.py <../../../examples/plot3dContextMenu.py>`
- .. image:: img/plot3dContextMenu.png
- :height: 150px
- :align: center
+ :width: 150px
- This script adds a context menu to a :class:`silx.gui.plot3d.ScalarFieldView`.
This is done by adding a custom context menu to the :class:`Plot3DWidget`:
@@ -335,8 +312,7 @@ Sample code that adds specific tools or functions to plot widgets.
For more information on context menus, see Qt documentation.
* - :download:`viewer3DVolume.py <../../../examples/viewer3DVolume.py>`
- .. image:: img/viewer3DVolume.png
- :height: 150px
- :align: center
+ :width: 150px
- This script illustrates the use of :class:`silx.gui.plot3d.ScalarFieldView`.
It loads a 3D scalar data set from a file and displays iso-surfaces and
@@ -344,8 +320,7 @@ Sample code that adds specific tools or functions to plot widgets.
It can also be started without providing a file.
* - :download:`plot3dSceneWindow.py <../../../examples/plot3dSceneWindow.py>`
- .. image:: img/plot3dSceneWindow.png
- :height: 150px
- :align: center
+ :width: 150px
- This script displays the different items of :class:`~silx.gui.plot3d.SceneWindow`.
It shows the different visualizations of :class:`~silx.gui.plot3d.SceneWindow`
@@ -359,6 +334,20 @@ Sample code that adds specific tools or functions to plot widgets.
- 3D scatter plot
- 3D scalar field with iso-surface and cutting plane.
- A clipping plane.
+ * - :download:`plot3dUpdateScatterFromThread.py <../../../examples/plot3dUpdateScatterFromThread.py>`
+ - .. image:: img/plot3dUpdateScatterFromThread.png
+ :width: 150px
+ - This script illustrates the update of a
+ :class:`~silx.gui.plot3d.SceneWindow.SceneWindow` widget from a thread.
+
+ The problem is that GUI methods should be called from the main thread.
+ To safely update the scene from another thread, one need to execute the update
+ asynchronously in the main thread.
+ In this example, this is achieved with
+ :func:`~silx.gui.utils.concurrent.submitToQtMainThread`.
+
+ In this example a thread calls submitToQtMainThread to append data to a 3D scatter.
+
:mod:`silx.io` sample code
++++++++++++++++++++++++++