From 151d9f1bc097274e2eae53bcdac277c535a3b7ae Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 21 Sep 2021 13:55:29 +0100 Subject: [PATCH] Various fixes to docs I've added a lot more mock imports so the automatic documentation now works. I've updated the links between pages (removing .rst extension) so they work. I've added a link to the settings pane image. --- docs/source/conf.py | 26 +++++++++++++++----------- docs/source/webapp/index.rst | 10 +++++----- docs/source/webapp/pane_capture.rst | 2 +- docs/source/webapp/pane_navigate.rst | 2 +- docs/source/webapp/pane_settings.rst | 4 +++- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index c6495bc0..bb3a38c9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,7 +34,21 @@ class Mock(MagicMock): return MagicMock() -mock_imports = ["picamerax", "picamerax.array", "picamerax.mmalobj"] +mock_imports = [ + "picamerax", + "picamerax.array", + "picamerax.mmalobj", + "numpy", + "labthings", + "labthings.json", + "expiringdict", + "dateutil", + "dateutil.parser", + "typing_extensions", + "PIL", + "sangaboard", + "piexif", +] sys.modules.update((mod_name, Mock()) for mod_name in mock_imports) @@ -235,13 +249,3 @@ intersphinx_mapping = { # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True - -# -- Options for redoc extension --------------------------------------------- -redoc = [ - { - "name": "OpenFlexure Microscope HTTP API", - "page": "api_redoc", - "spec": "../build/swagger.yaml", - "embed": True, - } -] diff --git a/docs/source/webapp/index.rst b/docs/source/webapp/index.rst index d479d04f..7feb37fd 100644 --- a/docs/source/webapp/index.rst +++ b/docs/source/webapp/index.rst @@ -5,12 +5,12 @@ Web Application interface :maxdepth: 2 :caption: Contents: - pane_navigate.rst - pane_capture.rst - pane_settings.rst - pane_gallery.rst + pane_navigate + pane_capture + pane_settings + pane_gallery -The main graphical interface for the OpenFlexure Microscope is implemented as a web application, which allows it to be accessed either through OpenFlexure Connect or a web browser. See the :doc:`../quickstart.rst` page for connection instructions. A "tour" should guide users through the interface when they connect for the first time, and introduce the key interface elements. +The main graphical interface for the OpenFlexure Microscope is implemented as a web application, which allows it to be accessed either through OpenFlexure Connect or a web browser. See the :doc:`../quickstart` page for connection instructions. A "tour" should guide users through the interface when they connect for the first time, and introduce the key interface elements. Interface structure ------------------- diff --git a/docs/source/webapp/pane_capture.rst b/docs/source/webapp/pane_capture.rst index c4990818..dcbdbd42 100644 --- a/docs/source/webapp/pane_capture.rst +++ b/docs/source/webapp/pane_capture.rst @@ -20,4 +20,4 @@ Various scan patterns are available for XY scanning. Raster scanning is the def Images acquired during the scan will be saved to a folder on the Raspberry Pi. They can be named according to their coordinates in the scan (default) or numbered sequentially (in case the latter is easier to process). -To retrieve images acquired during a scan, or captured individually, you can use the :doc:`pane_gallery.rst`. \ No newline at end of file +To retrieve images acquired during a scan, or captured individually, you can use the :doc:`pane_gallery`. \ No newline at end of file diff --git a/docs/source/webapp/pane_navigate.rst b/docs/source/webapp/pane_navigate.rst index 62d2c109..d1f050bc 100644 --- a/docs/source/webapp/pane_navigate.rst +++ b/docs/source/webapp/pane_navigate.rst @@ -1,7 +1,7 @@ Navigate pane ============= -The navigate pane displays the current stage position. Editing the values for X, Y, and Z and then hitting "enter" or clicking "move" will move the stage to the specified coordinates. Using the arrow keys (or page up/down) when not editing a text box will also move the stage, and the step size used can be set in the "configure" section at the top of the pane (which is collapsed by default). Using the mouse scroll wheel on the image will also move in Z, using the same configured step size. Double clicking on the image will bring the point clicked to the centre of the field of view, if the camera-stage mapping has been calibrated (see :doc:`pane_settings.rst`). +The navigate pane displays the current stage position. Editing the values for X, Y, and Z and then hitting "enter" or clicking "move" will move the stage to the specified coordinates. Using the arrow keys (or page up/down) when not editing a text box will also move the stage, and the step size used can be set in the "configure" section at the top of the pane (which is collapsed by default). Using the mouse scroll wheel on the image will also move in Z, using the same configured step size. Double clicking on the image will bring the point clicked to the centre of the field of view, if the camera-stage mapping has been calibrated (see :doc:`pane_settings`). Autofocus can also be run from the navigate pane, by clicking the "fast", "medium" or "fine" buttons. Fast autofocus moves the stage up and down in a continuous motion, using the size of images in the MJPEG stream from the camera to determine the sharpest point. This is usually both faster and more accurate than the other methods, however the other two options use a different metric, and stop the stage for each measurement. This can lead to them being more reliable in some circumstances. diff --git a/docs/source/webapp/pane_settings.rst b/docs/source/webapp/pane_settings.rst index 00b0a85a..f25ff83b 100644 --- a/docs/source/webapp/pane_settings.rst +++ b/docs/source/webapp/pane_settings.rst @@ -9,4 +9,6 @@ The settings for the microscope are gathered together into a settings pane, whic * Enabling or disabling the video stream (this allows the native low-latency preview on the Raspberry Pi to be used instead). * Calibrating the relationship between stage coordinates and pixel coordinates in the video stream, allowing click-to-move to function. -Important calibration tasks (in particular camera settings adjustment and click-to-move calibration) will be prompted in a "wizard" dialogue when the software is first run, to help first time users set up their microscope. All of the auto calibration routines are also available from the settings pane. \ No newline at end of file +Important calibration tasks (in particular camera settings adjustment and click-to-move calibration) will be prompted in a "wizard" dialogue when the software is first run, to help first time users set up their microscope. All of the auto calibration routines are also available from the settings pane. + +.. image:: pane_settings.png \ No newline at end of file