Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish adding missing service docs #279

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
2 changes: 2 additions & 0 deletions catkit2/services/safety_manual_check/safety_manual_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np


class SafetyManualCheck(Service):
def __init__(self):
super().__init__('safety_manual_check')
Expand All @@ -26,6 +27,7 @@ def set_value(self, new_value):
# This makes sure that the new value is actually convertable to a self.dtype.
self.value = np.array([new_value], dtype=self.dtype)


if __name__ == '__main__':
service = SafetyManualCheck()
service.run()
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Catkit2
services/nkt_superk
services/oceanoptics_spectrometer
services/omega_ithx_w3
services/safety_manual_check
services/safety_monitor
services/snmp_ups
services/thorlabs_cld101x
Expand Down
26 changes: 13 additions & 13 deletions docs/services/accufiz_interferometer.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
AccuFiz Interferometer
==========
======================

This service operates a 4D Technologies AccuFiz Interferometer using the 4D InSight software and their Web Services API for communication. It handles image acquisition, processing, and data management.

.. note::
The AccuFiz Interferometer requires the 4D InSight software to be in listening mode and WebServices4D to be installed and configured correctly.
The service communicates with the interferometer using HTTP requests to the Web Services API provided by the 4D InSight software and Web Service.
Ensure that the mask file specified in the configuration is accessible to the 4D computer.


Configuration
-------------

Expand All @@ -13,13 +19,14 @@ Configuration
simulated_service_type: accufiz_interferometer_sim
interface: camera
requires_safety: false
height: 1967
width: 1970
sim_data: C:/path/to/example.h5
mask: C:/path/to/4d.mask

ip_address: localhost:8080
server_path: C:/path/to/data
local_path: C:/path/to/data
ip_address: localhost:8080
sim_data: C:/path/to/example.h5
mask: C:/path/to/4d.mask
height: 1967
width: 1970
save_h5: true
save_fits: false
num_avg: 2
Expand Down Expand Up @@ -75,10 +82,3 @@ Datastreams
``detector_masks``: The detector masks used during measurements.

``is_acquiring``: Indicates whether the service is currently acquiring data (1 for acquiring, 0 for not acquiring).

Notes
The AccuFiz Interferometer requires the 4D InSight software to be in listening mode and WebServices4D to be installed and configured correctly.

The service communicates with the interferometer using HTTP requests to the Web Services API provided by the 4D InSight software and Web Service.

Ensure that the mask file specified in the configuration is accessible to the 4D computer.
3 changes: 1 addition & 2 deletions docs/services/aimtti_plp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ and Downloads". It is also shipped with the device on a CD. Installation instruc

The Python API used to control the device is `dcps <https://github.com/sgoadhouse/dcps>`_

Notes:

.. note::
- The device automatically applies a remote interface lock when it is commanded for the first time
(see `manual <https://resources.aimtti.com/manuals/New_PL+PL-P_Series_Instruction_Manual-Iss18.pdf>`_, page 23).
This is also noted in the `dcps library <https://github.com/sgoadhouse/dcps/blob/afbe687236bfa6176240e26790dd26b6c395b515/dcps/AimTTiPLP.py#L85>`_.
Expand Down
1 change: 1 addition & 0 deletions docs/services/bmc_deformable_mirror.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The child hardware service is ``BmcDeformableMirrorHardware``, and the child sim
``BmcDeformableMirrorSim``. While the simulated service talks directly to a simulator, the hardware service talks to the
actual hardware. The latter performs a conversion to the actual hardware device command by reading an optional command
starting index ``device_command_index`` from the service configuration. This parameter has three value options:

- *Undefined*: Zero will be assumed as the hardware command index.
- *Integer*: If only one device is controlled by the service, using a non-zero starting index for its hardware command.
- *List of integers*: If multiple devices with the same number of actuators are controlled by the service.
Expand Down
5 changes: 4 additions & 1 deletion docs/services/hamamatsu_camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ Hamamatsu Camera
====================

This service controls a Hamamatsu camera. It is a wrapper around the DCAM SDK, which is distributed on the manufacturer
website together with their Python API ``dcam``: `https://www.hamamatsu.com/eu/en/product/cameras/software/driver-software.html <https://www.hamamatsu.com/eu/en/product/cameras/software/driver-software.html>`_
website together with their Python API ``dcam``:
`https://www.hamamatsu.com/eu/en/product/cameras/software/driver-software.html <https://www.hamamatsu.com/eu/en/product/cameras/software/driver-software.html>`_

The service requires the definition of an environment variable ``CATKIT_DCAM_SDK_PATH`` that points to the
``python`` directory within the DCAM SDK installation.

The service has been successfully tested with the following camera models:

- Hamamatsu ORCA-Quest C15550-20UP
- Hamamatsu ORCA-Quest 2 C15550-22UP

Configuration
-------------
Expand Down
3 changes: 1 addition & 2 deletions docs/services/newport_picomotor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Newport Picomotor
This service controls a Newport Picomotor Motion Controller.
The following Newport Picomotors have been tested and used with catkit2 so far:

- `Model 8742 <https://www.newport.com/f/open-loop-picomotor-motion-controller>`_ (comes with a USB Flash Drive that contains communication drivers and software necessary for operating the controller,
see page 42 of the `user manual <https://www.newport.com/mam/celum/celum_assets/np/resources/8742_User_Manual.pdf?1>`_)
- `Model 8742 <https://www.newport.com/f/open-loop-picomotor-motion-controller>`_ (comes with a USB Flash Drive that contains communication drivers and software necessary for operating the controller, see page 42 of the `user manual <https://www.newport.com/mam/celum/celum_assets/np/resources/8742_User_Manual.pdf?1>`_)

Configuration
-------------
Expand Down
66 changes: 66 additions & 0 deletions docs/services/newport_xps_q8.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,80 @@
Newport Motor Controller
========================

This service controls a Newport XPS motor controller which controls a set of motors identified by their motor IDs. These motor
names are defined in the configuration file and have to follow the naming given to them through the Newport control interface.

Each motor can define an arbitrary number of named positions. These named positions can can also call each other in a chain. This
is useful for being able to save motor positions associated with different experiment modes.

- Something about command tolerances (TODO)

- Something about the concrete model used so far with catkit2, on HiCAT. (TODO)
Comment on lines +10 to +12
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raphaelpclt could you add something to these two points here? I remember you working on the motor tolerances, and you have access to the concrete info about the model HiCAT uses.


Configuration
-------------

.. code-block:: YAML

newport_xps:
service_type: newport_xps_q8
interface: newport_xps_q8
simulated_service_type: newport_xps_q8_sim
requires_safety: false

ip_address: xxx.xxx.xxx.xxx
port: 0000
timeout: 20
update_interval: 1
atol:
default: 0.001
lyot_theta: 0.01

# Any update to the values below might require an update in simulator.yml.
# Any difference with the values in simulator.yml will cause a misalignment between your hardware and the simulator.
motors:

example_motor:
nominal: in_beam

in_beam: in_beam_mode2
on_axis: on_axis_mode2
out_of_beam: out_of_beam_mode2
lowfs_beam: lowfs_beam_mode2

in_beam_mode1: 7.951
on_axis_mode1: 7.871
out_of_beam_mode1: 5.9
lowfs_beam_mode1: 10

in_beam_mode2: 9.301
on_axis_mode2: in_beam_mode2
out_of_beam_mode2: 8
lowfs_beam_mode2: in_beam_mode2

Lyot_X:
nominal: 8.27
Lyot_Y:
nominal: in_beam
in_beam: 2.3
out_of_beam: 20
Lyot_Z:
nominal: 9.7
Lyot_theta:
nominal: 56
camera_position:
nominal: 5.42

Properties
----------
None.

Commands
--------
None.

Datastreams
-----------
``{motor_name}_command``: A movement command for the motor identified with motor_name. The motor names are defined by the config file.

``{motor_name}_current_position``: The current position of the motor identified with motor_name. The motor names are defined by the config file.
17 changes: 16 additions & 1 deletion docs/services/safety_manual_check.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
Safety Manual Check
===================

A service that allows the user to manually check the safety of the testbed through the :ref:`safety_monitor` service.

This service has a property called ``value`` whose initial value is read from the configuration file, and it can be set to any value by the user.
It is continuously submitted to the only datastream ``check``.

By setting the value to something new, the safety monitor picks up on the new value on the datastream ``check`` and it should react accordingly.

Configuration
-------------

.. code-block:: YAML

safety_manual_check:
service_type: safety_manual_check
requires_safety: true

dtype: int
initial_value: 5

Properties
----------
``value``:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I also need to fill these in, whoops.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I didn't do that because I didn't fully understood how this service works... Where does the self.check_value[0] in it come from?



Commands
--------

None.

Datastreams
-----------
``check``:
2 changes: 0 additions & 2 deletions docs/services/safety_monitor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ This service periodically checks datastreams from other services and makes sure
Configuration
-------------

Example configuration:

.. code-block:: YAML

safety:
Expand Down
19 changes: 17 additions & 2 deletions docs/services/thorlabs_pm.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
Thorlabs Picomotor
==================
Thorlabs Power Meter
====================

This services periodically checks the measured power of a Thorlabs power meter.

Configuration
-------------

.. code-block:: YAML

power_meter:
service_type: thorlabs_pm
simulated_service_type: thorlabs_pm_sim
requires_safety: false

serial_number: 111000222
interval: 0.5

Properties
----------
None.

Commands
--------
None.

Datastreams
-----------
``power``: The measured power in W.
2 changes: 0 additions & 2 deletions docs/services/thorlabs_tsp01.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ temperature and humidity sensor.
Configuration
-------------

Example configuration:

.. code-block:: YAML

tsp01_1:
Expand Down
Loading