Add module level docstrings.
This commit is contained in:
parent
80beeea07b
commit
2cb4003835
17 changed files with 70 additions and 2 deletions
|
|
@ -1,3 +1,16 @@
|
|||
"""Configure logging for the OpenFlexure Server.
|
||||
|
||||
A module containing a custom logging handler and helper function for
|
||||
the OpenFlexure server. These handle formatting logs, ensuring that logs
|
||||
are logged both to a file and to the terminal (see note below!). Functionality
|
||||
is also provided for retrieving logs for to send over HTTP.
|
||||
|
||||
Note that when running in production OpenFlexure Microscope the server is run via
|
||||
``systemd``. As such, the logs that are sent to the terminal (STDERR) or any other
|
||||
output to STDOUT/STDERR are captured by ``systemd``. These can be viewed by using
|
||||
``journalctl`` or the ``ofm journal`` command.
|
||||
"""
|
||||
|
||||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"""Provide endpoints that mimic the v2 API for OpenFlexure Connect discoverability."""
|
||||
|
||||
import labthings_fastapi as lt
|
||||
from fastapi import Response
|
||||
from socket import gethostname
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"""Add endpoints for static files to the underlying FastAPI server."""
|
||||
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"""Provide functionality for automatically recentring the Stage."""
|
||||
|
||||
import numpy as np
|
||||
import logging
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
"""Provide functionality to detect if the camera is imaging sample or background.
|
||||
|
||||
An example background image must be captured and analysed by BackgroundDetectThing,
|
||||
information from this images is used to detect whether the current camera field of
|
||||
view contains sample.
|
||||
"""
|
||||
|
||||
from typing import Mapping, Optional
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
"""The core sample scanning functionality for the OpenFlexure Microscope.
|
||||
|
||||
SmartScan provides sample scanning functionality including automatic background
|
||||
dectection (via the `BackgroundDetectThing`) and automatic path planning via
|
||||
`scan_planners`. It manages the directories of past scans via `scan_directories`.
|
||||
It also controls external processes for live stitching composite images, and
|
||||
the creation of the final stitched images.
|
||||
"""
|
||||
|
||||
from typing import Optional, Mapping
|
||||
import threading
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"""Functionality for mimicking a stage during simulation and testing."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Mapping
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"""Provide a LabThings-FastAPI interface to the Sangaboard motor controller."""
|
||||
|
||||
from __future__ import annotations
|
||||
import logging
|
||||
import threading
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue