Skip to content

Commit 789e639

Browse files
author
David Miguel Susano Pinto
committed
doc: multiple reStructuredText fixes
1 parent d318517 commit 789e639

File tree

7 files changed

+64
-51
lines changed

7 files changed

+64
-51
lines changed

NEWS.rst

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,78 @@ Version 0.7.0 (upcoming)
66

77
* Selected most important, backwards incompatible, changes:
88

9-
* The `Camera.get_trigger_type` method, deprecated on version 0.6.0,
10-
has been removed as well as the multiple `TRIGGER_*` constants it
11-
returned. Use the `Camera.trigger_type` and `Camera.trigger_mode`
12-
properties. Note that, despite the similar names, the removed
13-
`Camera.get_trigger_type` does not return the same as
14-
`Camera.trigger_type` property.
9+
* The ``Camera.get_trigger_type`` method, deprecated on version
10+
0.6.0, has been removed as well as the multiple ``TRIGGER_*``
11+
constants it returned. Use the :attr:`trigger_type
12+
<microscope.abc.TriggerTargetMixin.trigger_type>` and
13+
:attr:`trigger_mode
14+
<microscope.abc.TriggerTargetMixin.trigger_mode>` properties
15+
instead. Note that despite the similar names, the new
16+
``trigger_type`` property does not return the same as the old
17+
``get_trigger_type`` method.
1518

1619
* Changes to device ABCs:
1720

18-
* The `Stage` ABC has a new method `may_move_on_enable` to hint
19-
whether calling `enable` will cause the stage to move.
20-
21-
* All cameras had a ``"readout mode"`` setting for most cameras only
22-
had a ``"default"`` value was available. This setting has been
23-
removed from the base class and is now only kept by cameras that
24-
actually make use of it, namely, ``PVCamera`` and ``AndorAtmcd``.
21+
* The :class:`Stage <microscope.abc.Stage>` ABC has a new
22+
:meth:`may_move_on_enable
23+
<microscope.abc.Stage.may_move_on_enable>` method to hint whether
24+
calling :meth:`enable <microscope.abc.Device.enable>` will cause
25+
the stage to move.
2526

2627
* All cameras had ``"transform"`` setting. This has been removed.
27-
Use the ``get_transform`` and ``set_transform`` methods instead.
28-
The result may be different since the ``"transform"`` setting also
28+
Use the :meth:`get_transform
29+
<microscope.abc.Camera.get_transform>` and :meth:`set_transform
30+
<microscope.abc.Camera.set_transform>` methods instead. The
31+
result may be different since the ``"transform"`` setting also
2932
exposed any internal transformation after readout.
3033

3134
* All filterwheels had a ``"position"`` setting which was redundant
3235
with the related get/set methods. The setting was been removed.
3336

3437
* New :class:`ValueLogger <microscope.abc.ValueLogger>` ABC for
35-
devices with a series of sensors. Simulation and Raspberry Pi
36-
implementations for MCP9808 and TSYS01 temparture sensors.
38+
devices with a series of different sensors such as temperature.
3739

38-
* New :class:`DigitalIO <microscope.abc.DigitalIO>` ABC. Added
39-
simulation device and Raspberry Pi implmentation.
40+
* New :class:`DigitalIO <microscope.abc.DigitalIO>` ABC for devices
41+
with a series of Digital IO (DIO) lines.
4042

4143
* New devices supported:
4244

43-
* ASI MS 2000 controller (:class:`microscope.controllers.asi.ASIMS2000`)
44-
45-
* RaspberryPi as a valuelogger (:class:`microscope.valuelogger.RPiValueLogger`)
46-
47-
* RaspberryPi as Digital IO (:class:`microscope.digitalio.raspberrypi.RPiDIO`)
45+
* ASI MS 2000 controller
46+
(:class:`microscope.controllers.asi.ASIMS2000`)
47+
48+
* Hamamatsu cameras
49+
(:class:`microscope.cameras.hamamatsu.HamamatsuCamera`)
4850

49-
* Hamamatsu cameras (:class:`microscope.cameras.hamamatsu.HamamatsuCamera`)
51+
* Ludl MC 2000 controller
52+
(:class:`microscope.controllers.ludl.LudlMC2000`)
5053

51-
* Ludl MC 2000 controller (:class:`microscope.controllers.ludl.LudlMC2000`)
54+
* MCP9808 temperature sensor on RaspberryPi
55+
(:class:`microscope.valuelogger.raspberrypi.RPiValueLogger`)
5256

5357
* RaspberryPi camera (:class:`microscope.cameras.picamera.PiCamera`)
5458

55-
* Toptica iChrome MLE (:class:`microscope.controllers.toptica.iChromeMLE`)
59+
* RaspberryPi as Digital IO
60+
(:class:`microscope.digitalio.raspberrypi.RPiDIO`)
61+
62+
* Toptica iChrome MLE
63+
(:class:`microscope.controllers.toptica.iChromeMLE`)
64+
65+
* TSYS01 temperature sensor on RaspberryPi
66+
(:class:`microscope.valuelogger.raspberrypi.RPiValueLogger`)
5667

5768
* Device specific changes:
5869

59-
* `PVCamera`:
70+
* :class:`PVCamera <microscope.cameras.pvcam.PVCamera>`:
6071

6172
* In version 0.6.0 the default PVCAM trigger mode was accidentally
6273
changed from "strobed" to "trig. first". This has now been
6374
reversed.
6475

6576
* 8-bit acquisition mode now works.
6677

67-
* `SimulatedCamera` now takes an optional `sensor_shape` constructor
68-
argument instead of always being 512x512 pixels.
78+
* :class:`SimulatedCamera <microscope.simulators.SimulatedCamera>`
79+
constructor now takes an optional ``sensor_shape`` argument.
80+
Previously, simulated cameras were always 512x512 pixels.
6981

7082
* The device server logging was broken in version 0.6.0 for Windows
7183
and macOS (systems not using fork for multiprocessing). This

doc/architecture/abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ which defines a base interface to all devices such as the
3535
:meth:`shutdown <microscope.abc.Device.shutdown>` method.
3636

3737
There is an additional special device class
38-
:class:`microsope.abc.DataDevice` which defines a class that has the
38+
:class:`microscope.abc.DataDevice` which defines a class that has the
3939
ability to asynchronously send data back to the calling
4040
connection. This is used for situations like cameras and asynchronous
4141
communication such as digital input signals.

doc/architecture/supported-devices.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ Stages
7171
DigitalIO
7272
=========
7373

74-
- Raspberry Pi (:class:`microsocpe.digitalio.raspberrypi`)
74+
- Raspberry Pi (:class:`microscope.digitalio.raspberrypi.RPiDIO`)
7575

7676

7777
ValueLogger
7878
===========
7979

80-
- Raspberry Pi (:class:`microsocpe.valuelogger.raspberrypi`) includes
81-
support for the MCP9808 and TSYS01 I2C temperature sensors
80+
- Raspberry Pi
81+
(:class:`microscope.valuelogger.raspberrypi.RPiValueLogger`)
82+
includes support for the MCP9808 and TSYS01 I2C temperature sensors
8283

8384

8485
Other

doc/get-involved/hacking.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ or even discussing a completely new device type.
1414
In short
1515
========
1616

17-
- Open new issues. Do not create pull requests.
17+
- Open new issues (do not create pull requests).
1818
- Open a new issue even if you already have a commit made. Even if it
1919
is about adding support for a new device.
2020
- Coding style is `Black <https://black.readthedocs.io/>`_
@@ -95,7 +95,7 @@ making a commit:
9595

9696
.. code-block:: shell
9797
98-
black ./
98+
black .
9999
100100
101101
Docstrings
@@ -173,4 +173,5 @@ We do not request that copyright is assigned to us, you can remain the
173173
copyright holder of any contribution made. However, please ensure
174174
that you are the copyright holder. Depending on your contract, even
175175
if you are a student, the copyright holder is likely to be your
176-
employer or university. Ask your employer or PhD supervisor first.
176+
employer or university. Ask your employer or PhD supervisor if you
177+
are not sure.

doc/install.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ Installation
1212
Microscope is available on the Python Package Index (PyPI) and can be
1313
`installed like any other Python package
1414
<https://packaging.python.org/tutorials/installing-packages/>`_. The
15-
short version of it is "use pip"::
15+
short version of it is "use pip" (you will need to have Python and pip
16+
already installed on your system)::
1617

1718
python3 -m pip install microscope
1819

19-
You need to have Python and pip already installed on your system.
20-
2120

2221
Requirements
2322
============
@@ -50,11 +49,11 @@ Linux. See the :ref:`device-server` section for details.
5049
Dependencies
5150
============
5251

53-
Microscope has very few dependencies. All are Python packages
54-
available on PyPI and will be automatically resolved if Microscope is
52+
Microscope has very few dependencies and all are Python packages
53+
available on PyPI that will be automatically resolved if Microscope is
5554
installed with pip. However, the interface to many devices is done
56-
via an external library (or SDK, or driver) that is only provided by
57-
the device vendor.
55+
via an external library (sometimes named SDK or driver) that is only
56+
provided by the device vendor.
5857

5958
To identify if an external library is required check the device module
6059
documentation. If an external library is required, contact the device

microscope/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def library_loader(
5858
libname: file name or path of the library to be loaded as
5959
required by `dlltype`
6060
dlltype: the class of shared library to load. Typically,
61-
``CDLL`` but sometimes ``WinDLL`` in windows.
62-
kwargs: other arguments passed on to ``dlltype``.
61+
`ctypes.CDLL` but sometimes `ctypes.WinDLL` in windows.
62+
kwargs: other arguments passed on to `dlltype`.
6363
"""
6464
# Python 3.8 in Windows uses an altered search path. Their
6565
# reasons is security and I guess it would make sense if we

microscope/abc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,15 +543,15 @@ class DataDevice(Device, metaclass=abc.ABCMeta):
543543
it to a client. The client is set using set_client(uri) or (legacy)
544544
receiveClient(uri).
545545
546-
Derived classed should implement::
546+
Derived classed should implement:
547547
548548
* :meth:`abort` (required)
549549
* :meth:`_fetch_data` (required)
550550
* :meth:`_process_data` (optional)
551551
552-
Derived classes may override `__init__`, `enable` and `disable`,
553-
but must ensure to call this class's implementations as indicated
554-
in the docstrings.
552+
Derived classes may override ``__init__``, ``enable`` and
553+
``disable``, but must ensure to call this class's implementations
554+
as indicated in the docstrings.
555555
556556
"""
557557

@@ -1705,7 +1705,7 @@ def __init__(self, numSensors: int, pullData: bool, **kwargs) -> None:
17051705
)
17061706
self._numSensors = numSensors
17071707
# If pull data is True data will be pulled from the server if False
1708-
# data will be pushed from microsocpe (default)
1708+
# data will be pushed from microscope (default)
17091709
self.pullData = pullData
17101710

17111711
@abc.abstractmethod

0 commit comments

Comments
 (0)