Skip to content

Commit d2d207d

Browse files
committed
doc: multiple fixes on reST syntax, link more docs, remove design.rst
wip fixes on Rest syntax
1 parent 3bd0c62 commit d2d207d

File tree

25 files changed

+178
-298
lines changed

25 files changed

+178
-298
lines changed

NEWS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Version 0.7.0 (upcoming)
2424

2525
* Ludl MC 2000 (:class:`microscope.controllers.ludl.LudlMC2000`)
2626

27-
* Raspberry Pi picam (:class:`microscope.cameras.picam.Picamera`)
27+
* Raspberry Pi picam (:class:`microscope.cameras.picam.PiCamera`)
2828

2929
* Toptica iChrome MLE (:class:`microscope.controllers.toptica.iChromeMLE`)
3030

doc/architecture/abc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ few reasons not to. First, many classes support a wide range of
9393
models, for example, ``AndorSDK3`` supports all of Andor CMOS cameras,
9494
and different models have different settings which would lead to
9595
multiple classes with different sets of methods. Second, some of
96-
those settings would clash with the ABC, for example, `"AndorAtmcd"`
97-
devices might have a `"Binning"` setting which could clash with the
96+
those settings would clash with the ABC, for example, ``AndorAtmcd``
97+
devices might have a ``"Binning"`` setting which could clash with the
9898
``binning`` property. Finally, using ``get_setting`` and
9999
``set_setting`` clearly declares the use of methods that are not part
100100
of the interface and reminds the implications that come with it.

doc/architecture/device-server.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ series of advantages:
3535

3636
add figures to explain device server (figure from the paper).
3737

38-
The `device-server` program
39-
===========================
38+
The ``device-server`` program
39+
=============================
4040

41-
The `device-server` program is part of the Microscope installation.
41+
The ``device-server`` program is part of the Microscope installation.
4242
It can started from the command line with a configuration file
4343
defining the devices to be served, like so:
4444

4545
.. code-block:: bash
4646
4747
device-server PATH-TO-CONFIGURATION-FILE
4848
# alternatively, if scripts were not installed:
49-
python -m microscope.device_server PATH-TO-CONFIGURATION-FILE
49+
python3 -m microscope.device_server PATH-TO-CONFIGURATION-FILE
5050
5151
where the configuration file is a Python script that declares the
5252
devices to be constructed and served on its ``DEVICES`` attribute via
@@ -123,7 +123,7 @@ matter of knowing the device server URI:
123123
124124
import Pyro4
125125
126-
proxy = Pyro4.Proxy('PYRO:SomeLaser@127.0.0.1:8000')
126+
proxy = Pyro4.Proxy("PYRO:SomeLaser@127.0.0.1:8000")
127127
# use proxy as if it was an instance of the SomeLaser class
128128
proxy._pyroRelease()
129129
@@ -135,9 +135,9 @@ devices it controls.
135135
Pyro configuration
136136
------------------
137137

138-
Pyro4 configuration is the singleton :obj:`Pyro4.config`. If there's
139-
any special configuration wanted, this can be done on the
140-
`device-server` configuration file:
138+
Pyro4 configuration is the singleton ``Pyro4.config``. If there's any
139+
special configuration wanted, this can be done on the
140+
``device-server`` configuration file:
141141

142142
.. code-block:: python
143143
@@ -155,7 +155,7 @@ any special configuration wanted, this can be done on the
155155
#...
156156
]
157157
158-
Importing the `microscope.device_server` will already change the Pyro
158+
Importing ``microscope.device_server`` will already change the Pyro
159159
configuration, namely it sets the `SERIALIZER` to use the pickle
160160
protocol. Despite the security implications associated with it,
161161
pickle is the fastest of the protocols and one of the few capable of
@@ -170,10 +170,10 @@ device that can't be specified during object construction, and only
170170
after initialisation can it be identified. This happens in some
171171
cameras and is an issue when more than one such device is present.
172172
For example, if there are two Andor CMOS cameras present, it is not
173-
possible to specify which one to use when constructing the `AndorSDK3`
174-
instance. Only after the device has been initialised can we query its
175-
ID, typically the device serial number, and check if we obtained the
176-
one we want. Like so:
173+
possible to specify which one to use when constructing the
174+
``AndorSDK3`` instance. Only after the device has been initialised
175+
can we query its ID, typically the device serial number, and check if
176+
we obtained the one we want. Like so:
177177

178178
.. code-block:: python
179179
@@ -190,7 +190,7 @@ one we want. Like so:
190190
191191
In the interest of keeping each camera on their own separate process,
192192
the above can't be used. To address this, the device definition must
193-
specify the `uid` if the device class is a floating device. Like so::
193+
specify ``uid`` if the device class is a floating device. Like so::
194194

195195
DEVICES = [
196196
device(AndorSDK3, "127.0.0.1", 8000, uid="20200910"),
@@ -199,8 +199,8 @@ specify the `uid` if the device class is a floating device. Like so::
199199

200200
The device server will then construct each device on its own process,
201201
and then serve them on the named port. Two implication come out of
202-
this. The first is that the `uid` *must* be specified, even if there
203-
is only such device present on the system. The second is that all
202+
this. The first is that ``uid`` *must* be specified, even if there is
203+
only such device present on the system. The second is that all
204204
devices of that class *must* be present.
205205

206206
.. _composite-devices:
@@ -211,11 +211,11 @@ Composite Devices
211211
A composite device is a device that internally makes use of another
212212
device to function. These are typically not real hardware, they are
213213
an abstraction that merges multiple devices to provide something
214-
augmented. For example, `ClarityCamera` is a camera that returns a
215-
processed image based on the settings of `AuroxClarity`. Another
216-
example is the `StageAwareCamera` which is a dummy camera that returns
217-
a subsection of an image file based on the stage coordinates in order
218-
to mimic navigating a real sample.
214+
augmented. For example, ``ClarityCamera`` is a camera that returns a
215+
processed image based on the settings of ``AuroxClarity``. Another
216+
example is the ``StageAwareCamera`` which is a dummy camera that
217+
returns a subsection of an image file based on the stage coordinates
218+
in order to mimic navigating a real sample.
219219

220220
If the multiple devices are on the same computer, it might be worth
221221
have them share the same process to avoid the inter process

doc/architecture/gui.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Still, during development, both of the microscope and support for new
1919
modules, a GUI can be useful. For example, check what a camera is
2020
acquiring, emitting light, checking if all methods are working as
2121
expected. For this purpose, there is the ``microscope-gui`` program
22-
as well as a :mod:``microscope.gui`` module with Qt widgets.
22+
as well as a :mod:`microscope.gui` module with Qt widgets.
2323

2424
The ``microscope-gui`` program provides a minimal GUI for each device
2525
type. It requires the device server. For example:

doc/architecture/settings.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

doc/architecture/supported-devices.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ Cameras
1616
=======
1717

1818
- Andor (:class:`microscope.cameras.andorsdk3.AndorSDK3` and
19-
:class:`microscope.cameras.atmcd.AndotAtmcd`)
19+
:class:`microscope.cameras.atmcd.AndorAtmcd`)
2020
- Hamamatsu (:class:`microscope.cameras.hamamatsu.HamamatsuCamera`)
2121
- Photometrics (:class:`microscope.cameras.pvcam.PVCamera`)
2222
- QImaging (:class:`microscope.cameras.pvcam.PVCamera`)
23+
- Raspberry Pi camera (:class:`microscope.cameras.picam.PiCamera`)
2324
- Ximea (:class:`microscope.cameras.ximea.XimeaCamera`)
2425

2526
Controllers
2627
===========
2728

2829
- CoolLED (:class:`microscope.controllers.coolled.CoolLED`)
29-
- Prior ProScan III (:class:`microscope.controllers.prior.ProScanIII`)
30+
- Ludl MC 2000 (:class:`microscope.controllers.ludl.LudlMC2000`)
3031
- Lumencor Spectra III light engine
3132
(:class:`microscope.controllers.lumencor.SpectraIIILightEngine`)
33+
- Prior ProScan III (:class:`microscope.controllers.prior.ProScanIII`)
3234
- Toptica iChrome MLE (:class:`microscope.controllers.toptica.iChromeMLE`)
3335
- Zaber daisy chain devices
3436
(:class:`microscope.controllers.zaber.ZaberDaisyChain`)
@@ -61,6 +63,8 @@ Light Sources
6163
Stages
6264
======
6365

66+
- Linkam CMS196 (:class:`microscope.stages.linkam.LinkamCMS`)
67+
- Ludl (:class:`microscope.controllers.ludl.LudlMC2000`)
6468
- Zaber (:class:`microscope.controllers.zaber.ZaberDaisyChain`)
6569

6670
Other

doc/authors.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ Contributors
1010
The following people have contributed in the development of
1111
Microscope:
1212

13+
- Danail Stoychev
1314
- David Miguel Susano Pinto
1415
- Ian Dobbie
1516
- Julio Mateos-Langerak
1617
- Mick Phillips
18+
- Nicholas Hall
19+
- Thomas Fish
1720
- Tiago Susano Pinto
1821
- 久保俊貴 (Toshiki Kubo)

doc/conf.py

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,43 +17,57 @@
1717

1818
# This should ve read from setup.py. Maybe we should use
1919
# pkg_resources to avoid duplication?
20-
author = "Micron Oxford"
20+
author = ""
2121
project = "Microscope"
2222

2323
copyright = "%s, %s" % (datetime.datetime.now().year, author)
2424

2525
master_doc = "index"
26-
nitpicky = True
26+
# nitpicky = True
2727

2828

2929
extensions = [
3030
"sphinx.ext.autodoc",
31+
"sphinx.ext.intersphinx",
3132
"sphinx.ext.napoleon",
3233
"sphinx.ext.todo",
3334
"sphinx.ext.viewcode",
3435
]
3536

37+
# Configuration for sphinx.ext.autodoc
3638
autodoc_mock_imports = [
37-
# "microscope._wrappers",
39+
"microscope._wrappers",
40+
"microscope.cameras._SDK3", # should go into microscope._wrappers
3841
"picamera",
3942
"picamera.array",
40-
"RPi"
43+
"RPi",
44+
"servicemanager",
45+
"win32service",
46+
"win32serviceutil",
4147
]
4248

43-
# Configuration for sphinx.ext.todo
44-
todo_include_todos = True
49+
# Configuration for sphinx.ext.intersphinx
50+
intersphinx_mapping = {
51+
"numpy": ("https://numpy.org/doc/stable/", None),
52+
"pyro4": ("https://pyro4.readthedocs.io/en/stable/", None),
53+
"pyserial": ("https://pyserial.readthedocs.io/en/latest/", None),
54+
"python": ("https://docs.python.org/3", None),
55+
}
4556

4657
# Configuration for sphinx.ext.napoleon
4758
napoleon_google_docstring = True
4859
napoleon_include_private_with_doc = True
49-
napoleon_include_special_with_doc = True
60+
napoleon_include_special_with_doc = False
61+
62+
# Configuration for sphinx.ext.todo
63+
todo_include_todos = True
5064

5165

5266
#
5367
# Options for HTML output
5468
#
5569

56-
html_theme = "agogo"
70+
# html_theme = "agogo"
5771
html_static_path = ["_static"]
5872
html_title = "Python Microscope documentation"
5973
html_short_title = "import microscope"

0 commit comments

Comments
 (0)