Skip to content

Commit 032125a

Browse files
committed
Changes to pass interrogate
1 parent 234210d commit 032125a

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

parallax/coords_converter.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
1+
"""
2+
This module provides a class for converting between local and global coordinates
3+
using transformation matrices and scale factors.
4+
"""
25
import logging
36
import numpy as np
47
from typing import Optional
@@ -9,6 +12,10 @@
912

1013

1114
class CoordsConverter:
15+
"""
16+
Converts between local and global coordinates using transformation matrices
17+
and scale factors. It also applies reticle adjustments for specific reticles.
18+
"""
1219
def __init__(self, model):
1320
"""Initialize the CoordsConverter class."""
1421
self.model = model
@@ -189,10 +196,4 @@ def _apply_reticle_adjustments(self, global_pts: np.ndarray, reticle: str) -> np
189196
global_pts = global_pts @ reticle_rotmat.T
190197
global_pts = global_pts + reticle_offset
191198

192-
"""
193-
global_x = np.round(global_pts[0], 1)
194-
global_y = np.round(global_pts[1], 1)
195-
global_z = np.round(global_pts[2], 1)
196-
return np.array([global_x, global_y, global_z])"
197-
"""
198199
return np.round(global_pts, 1)

parallax/stage_http_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
This module provides a StageHttpServer class that manages an HTTP server for controlling
3+
and querying the state of a stage controller. It uses aiohttp for asynchronous handling of HTTP requests.
4+
"""
15
import logging
26
import json
37
import asyncio
@@ -16,6 +20,7 @@ class StageHttpServer(QObject):
1620
"""Manages the Stage HTTP Server using aiohttp (Fully Async)"""
1721

1822
def __init__(self, model, stages_info, port=8081):
23+
"""Initialize the StageHttpServer with a model, stages_info, and port."""
1924
super().__init__()
2025
self.model = model
2126
self.stage_controller = StageController(self.model)

parallax/stage_listener.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Provides classes to manage stage data fetching, representation, and updates in microscopy
33
applications, using PyQt5 for threading and signals, and requests for HTTP requests.
44
"""
5-
65
import os
76
import json
87
import logging
@@ -550,6 +549,10 @@ def _get_stage_info_json(self, stage):
550549

551550
# Convert to mm and round to 4 decimal places if the value is not None
552551
def convert_and_round(value):
552+
"""Convert the value from um to mm and round it to 4 decimal places.
553+
Args: value (float): The value in um.
554+
Returns: float: The value in mm rounded to 4 decimal places.
555+
"""
553556
return round(value * 0.001, 4) if value is not None else None
554557

555558
stage_data = {

0 commit comments

Comments
 (0)