Skip to content

Commit b673f8f

Browse files
committed
microEye v2.4.0a5
___ __ __ / _ | / /__ / / ___ _ / __ |/ / _ \/ _ \/ _ `/ /_/ |_/_/ .__/_//_/\_,_/ /_/ What's New: ------------------------------------------------------------- IMPORTANT: Zarr V3 support now requires Python 3.11 or newer. Support for Python 3.9 and 3.10 has been discontinued. ------------------------------------------------------------- ----------------- microEye v2.4.0a5 ----------------- - Focus Widget: - Previously, performance issues included GUI freezes caused by: - Expensive autorange operations and reliance on `pg.GraphicsLayoutWidget` for all plots. - Non-optimized plot update logic in `focusWidget` and `PyQtGraphDisplay` caused overlapping calls and race conditions. - The issue appears when acquisition display runs at high framerates (>30Hz) with one or more ROIs. - Issue has been resolved and tested with acquisition camera running at ~165Hz and focus plots and GUI were responsive. - Refactor `focusWidget` to use separate `pg.GraphicsView` and `pg.PlotWidget` for all plots instead of `GraphicsLayoutWidget`. - Implemented non-pyqtgraph-native logic to update plot ranges at less frequent intervals, reducing resource usage and improving responsiveness. - Added a boolean option in the GUI to enable or disable the non-pyqtgraph-native plot range updates. - Add async worker for plot updates to avoid GUI blocking. - Remove use of `HistogramBarItem` for histogram plots, as it is computationally heavy; instead, use histogram step plotting (drawing the histogram as a stepped line plot rather than bars) on a regular `pg.PlotWidget` for improved performance. - Fix ROI update logic after loading config; previously the GUI did not update accordingly. - Update plots visibility dynamically depending on the selected stabilization method: - For example, when reflection "Z-only" stabilization method is selected, only the Z histogram and Z time log plots are shown. - When beads or Hybrid "XYZ" stabilization methos is selected, XY scatter and X/Y time log plots are also displayed. - The GUI logic automatically hides or shows relevant plots based on the current stabilization mode. - Display & Viewer: - Refactor `FrameCounter` to use monotonic nanosecond clock for FPS calculation (previously used `time.time()`). - Fix `PyQtGraphDisplay` update logic reducing resource usage and improving GUI responsiveness: - Refactor histogram and CDF updates to occur at less frequent intervals. - Add a flag in the `PyQtGraphDisplay` class to block overlapping update calls and prevent race conditions during rapid image updates. - Set `pg.GraphicsView(useOpenGL=True)` for improved rendering performance. - Stage Adapters: (BUG) - Fix `PiezoConceptFOC` stage adapter to always cast Z position to integer before sending commands, preventing random jumps caused by `float`/`int` type mismatch. - Device Manager: (BUG) - Fix `FocusStabilizer` signals to use `moveXYZ` (signal) and `StageManager.move_relative` (function), replacing legacy `moveStage` (signal) and `move_z` (function). - Focus Stabilizer & Controller: - Fix controller attributes to use single underscore; double underscore caused them to be inaccessible to subclasses. - Add missing tau parameter to FocusStabilizer config and ensure it is loaded/saved. (reserved to be used later) - Fix loading of per-axis inverted flags in `FocusStabilizerView`. - Refactor `FocusStabilizer` worker logic to use correct per-axis stabilization and response inversion emitted through `moveXYZ`. - Fix method and rejection method enum handling in `FocusStabilizerView`. - Fix ROI activation signal emission after config load. - Add __str__ method to RejectionMethod enum. - Other: - Update GitHub Actions workflow to use `Python 3.11.9` ----------------- microEye v2.4.0a4 ----------------- - Images & Data IO - refactor: Move all image sequence and uImage classes from `microEye.utils.uImage` to new `microEye.images` subpackage (`handlers.py`, `uImage.py`, `zarr.py`) - refactor: Update all imports to use `microEye.images` instead of `microEye.utils.uImage` - feat: Add unified `ImageSequenceBase`, `TiffSeqHandler`, `ZarrImageSequence`, and `saveZarrImage` to microEye.images.handlers - feat: Add `ZarrAcquisition`, `create_array`, and `store_zarr_array` for streaming and saving Zarr V3 data - feat: Added `close_display(display_name)` method to `DisplayManager` to allow closing a specific display window by name - fix: Ensure Zarr handler support both zipped and directory stores - Analysis & Viewer - refactor: Update all analysis modules to use new image handler imports - fix: Remove legacy `microEye.utils.uImage` import from all modules - feat: Add registration tool (`registration.py`) for image stack registration and transformation - feat: Add multi-channel stack merging and transformation export/import in registration tool - fix: Fixed channel display logic for multichannel data in `images.py` so channels are handled correctly in viewer. - Multi Viewer Module - feat: Add "Opened Files" dock to `multi_viewer`, showing all currently opened files and allowing quick switching - feat: Add "Registration Tool" to Tools menu in `multi_viewer` for stack alignment - fix: Properly handle .zarr files in file system model and viewer - fix: Ensure opened files are tracked and closed correctly in `multi_viewer` - Fitting & Filters - fix: Update all fitting and filter modules to use new image handler imports - Hardware & Acquisition - Thorlabs Camera: - Fixed bugs in exposure range and pixel clock list handling. - Corrected driver string and status dictionary logic. - AcquisitionJob: - Refactored ROI extraction and frame writing logic for TIFF/Zarr. - Improved resource cleanup and metadata saving. - Ensured correct handling of Zarr array finalization and TIFF writer logic. - fix: Update all camera panels and acquisition logic to use new image handler imports - fix: Remove legacy `microEye.utils.uImage` import from hardware modules ------------------------------------ Focus Stabilizer Refactor (v2.4.0a3) ------------------------------------ - Major refactor of the Focus Stabilizer backend and frontend: - Modularized stabilization logic into `stabilization.controller` and `stabilization.methods` submodules. - Each axis (X, Y, Z) now has independent PID controller gains and calibration coefficients. - Outlier rejection for shift estimation is now configurable (Standard Deviation, MAD, or None). - Added support for XY stabilization and hybrid modalities (under development). - New data logging system for time, X/Y/Z shifts, and parameter values. - Visualization improvements: - Z histogram, time log of X/Y/Z, XY scatter, and localization overlays. - All plots update in real time with stabilization. - FocusStabilizerView and focusWidget updated for new parameter tree and ROI management. - Configuration save/load for all stabilizer and ROI parameters. - Improved thread safety and async handling for stabilization worker. - Refactored stage and device manager integration for stabilization toggling and lock state. - All stabilization methods now use unified interface for parameter fitting and shift calculation. - Internal API changes: - `FocusStabilizer` and `FocusStabilizerView` now use enums for all axis and parameter references. - `StageManager` and `DeviceManager` updated to use new stabilization API. - Controller widget now supports toggling XY and Z stabilization independently. - Added `FocusPlot` enum and unified plotting logic in `focusWidget`. - Camera/Acquisition/Stage: - All camera classes now implement a `snap_image()` method for single-frame acquisition (Basler, Vimba, uEye, Thorlabs, PCO, PycroManager, Dummy). - Improved dummy camera (`miDummy`) astigmatic fiducials pattern simulation and parameters. - `CameraManager` is now the singleton for all camera lists; all references to `CameraList.CAMERAS` replaced with `CameraManager.CAMERAS`. - Acquisition manager and scan/z-stack logic updated to use new focus stabilization API and per-axis calibration. - KinesisXY and AbstractStage now use unified async worker logic and busy checks. - PycroStageXY async move logic improved and now waits for hardware busy state. - Spatial filter optimizations: - Difference of Gaussians (DoG) and PointGaussFilter now use `fftconvolve` for significantly improved filtering speed. - Radial coordinate calculations for Fourier filters are now Numba-accelerated for faster execution. - General Refactoring: - Moved focus stabilization logic out of monolithic files into dedicated submodules under `stabilization/`. - Minor bugfixes for timeouts, async workers, and config serialization. - Replaced all delay and timeout time measurements to use `monotonic` clocks instead of `time` for improved reliability. - Bugfixes: - Fixed config loading to ensure Pycro-Manager instances and bridges are started before device configuration is loaded, preventing initialization errors. ----------------- microEye v2.4.0a2 ----------------- ------------- Slides Widget ------------- - Add a new `SlideWidget` for visualizing and selecting slide channels - Support multiple slide types and channel geometries (sticky-Slide VI 0.4, μ-Slide VI 0.1, 8/18 Well) - Implement interactive channel selection, highlight, and move-to-center logic in `SlideWidget` - Show current stage position and delta in info bar - Draw position cross and center cross overlays - Emit signals for channel selection and move the stage to the channel center - Add context menu for slide type, orientation (swap XY), and axis inversion - Persist and restore slide widget configuration (`slide`, `swap_xy`, `invert_x`, `invert_y`) in `config.json` - Add "Slides" dock to `miEye_module` ------------------------------------ Stage Metadata & Editable Parameters ------------------------------------ - Add editable X/Y/Z center and max parameters to `StageView` parameter tree - Add `get_center`, `set_center`, `get_max` methods to `AbstractStage` for axis metadata - Update `StageView` to support editing center/max for each axis - Persist and restore center/max values in stage config ------------- Stage Manager ------------- - Implement `StageManager.center(axis)` to move X, Y, or Z stage to editable center position - Refactor `StageManager.move_absolute` to accept optional coordinates and units -------------- Device Manager -------------- - Add unified `update_gui` methods to `DeviceManager` and `CameraList` - Add `centerRequest` method which accepts `Axis` enum for stage centering. - Refactor main window timer to call widget GUI updates ------------------------------ Other Refactors & Improvements ------------------------------ - refactor `miEye_module` to accommodate all the changes and new widgets. - Add XY and Z "Center" buttons to the Controller widget for moving stages to center positions - Fix mouse event handling in `TiledImageSelector' for Qt6 compatibility - Update `config.json` to persist new dock and widget states ----------------- microEye v2.4.0a1 ----------------- -------------------------------------------------- Unified Abstract Stage Class & Stage View Refactor -------------------------------------------------- - The `AbstractStage` class was refactored to unify the interface for all stage types (Z, XY, multi-axis, etc.), supporting: - Consistent axis handling via the `axes` property. - Unified position, movement, and configuration methods for all axes. - Standardized unit conversion and metadata storage. - Improved signal handling for async operations. - The new `StageView provides` a generic parameter tree UI for any stage, automatically adapting to supported axes and serial configuration. - Legacy stage-specific views and controllers (e.g., PiezoConcept, Kinesis) are now replaced or wrapped by the unified view. ---------------------------------- Stage Manager & Stage Manager View ---------------------------------- - Added `StageManager` singleton class to manage all connected stages, their assignment to axes, and movement coordination. - Supports adding/removing stages, axis assignment, and step/jump configuration. - Handles open/close, busy state, and movement requests for all axes. - Added `StageManagerView` for GUI management of stages, drivers, axis assignment, and step/jump sizes. - Stages are now dynamically added/removed and assigned to axes via the manager, supporting multiple hardware backends. -------------- Device Manager -------------- - Removed support for legacy stages and related stage selection logic. - Updated stage management to use the new unified `StageManager` and its API for adding/removing stages and axis assignment. - Updated configuration loading/saving to use the new stage config format. ----------------------------------------- SmarAct Stage Support (Under Development) ----------------------------------------- - Initial implementation of `MCS2Stage` for SmarAct MCS2 controllers. - Device discovery, connection, and configuration support. - Not yet fully integrated into the main GUI, but ready for further development. ------------------------ Camera List Improvements ------------------------ - The `CameraList` now supports dynamic addition/removal of cameras, including PycroManager and hardware cameras. - Improved support for saving/loading camera configuration in the main config file. - Generalized population logic of available connected cameras. ----------------- Base Camera Class ----------------- - Added support for property trees and parameter updates for camera settings. - Improved ROI handling: added `set_roi`, `get_roi`, and `reset_roi` methods. - Added metadata retrieval with get_metadata. - Implemented `update_cam` for dynamic parameter changes. - Added class methods for available camera list enumeration. ------------ Camera Panel ------------ - Unified logic for exposure, framerate, ROI, and capture handling in `Camera_Panel`. - Removed duplicated exposure/framerate/ROI logic from subclasses (Basler, Pycro, Dummy, IDS, Thorlabs, Vimba, PCO). - Subclasses now delegate to base class for common parameter setup and signal connections. - Capture and update methods standardized; device-specific logic moved to base class where possible. - Clean up resources used by the camera panel using overrides of `Camera_Panel.dispose` if needed. - Subclass panels now only implement device-specific overrides and minimal customizations. --------------------- Basler Camera Support --------------------- - Added full support for Basler cameras via the `Basler_Panel` and `basler_cam`. - Camera options, ROI, exposure, and acquisition are integrated into the unified camera panel system. - Basler cameras are now included in config save/load and dynamic camera list management. - SDK seems to conflict with Vimba and Vimba X SDK transport layers. ----------------------------------- Allied Vision (Vimba X SDK) Support ----------------------------------- - Updated support for Allied Vision cameras to use the new Vimba X SDK (`vmbpy`), replacing legacy Vimba SDK. - All Vimba-related panels and camera classes now use the new SDK and are compatible with the unified camera panel and camera list system. - Refactored the `with` context from the main scope to `vimba_cam`. - SDK seems to conflict with Basler Pylon SDK transport layers. ------------------------ PycroManager Refactoring ------------------------ - PycroManager camera and stage classes are now split into their own submodules: - `PycroCamera` in `microEye/hardware/cams/pycromanager/pycro_cam.py`. - `PycroStageZ` and `PycroStageXY` in `microEye/hardware/stages/pycromanager/core.py`. - `PycroPanel` in `microEye/hardware/cams/pycromanager/pycro_panel.py`. - Stage selection and port management are now handled via dialogs and the stage manager. ----------------------------- Save/Load Config Improvements ----------------------------- - The config system now saves and loads all stages and cameras, including their assignment, configuration, and dynamic addition/removal. - When loading a config, available stages and cameras are automatically added if detected. - Dock widget positions, visibility, and floating state are still preserved in config. ------------------------------ Other Refactors & Improvements ------------------------------ - The miEye module has minor updates to accommodate the changes above. - Updated controller and device views to use the new signal and parameter system. - The controller signals now use the improved `Axis` enum type for move requests. -------------- Future Updates -------------- - Complete SmarAct MCS2 stage integration and testing. - Develop the Focus Stabilization alternative modalities. (Under Dev) - MacOS compatibility testing. - Acquisition Experiments Designer tools. - 3D Localization fitting from Experimental PSF. - Introduction of 2D/3D Single-Particle Tracking.
1 parent 7680b3f commit b673f8f

13 files changed

Lines changed: 446 additions & 236 deletions

File tree

.github/workflows/publish-to-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Python
1616
uses: actions/setup-python@v4
1717
with:
18-
python-version: "3.9.13" # Specify your Python version
18+
python-version: "3.11.9" # Specify your Python version
1919

2020
- name: Install dependencies
2121
run: |

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This toolkit is compatible with the [hardware](#hardware) used in our microscope
88

99
```bash
1010
__ ____ ____ ___ ____ ___ ____
11-
/ |/ (_)__________ / __/_ _____ _ __|_ |/ / / / _ \___ _/ / /
12-
/ /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _// // / _ `/_ _/
13-
/_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)___/\_,_/ /_/
11+
/ |/ (_)__________ / __/_ _____ _ __|_ |/ / / / _ \___ _/ __/
12+
/ /|_/ / / __/ __/ _ \/ _// // / -_) | |/ / __//_ _// // / _ `/__ \
13+
/_/ /_/_/\__/_/ \___/___/\_, /\__/ |___/____(_)_/(_)___/\_,_/____/
1414
/___/
1515
___ __ __
1616
/ _ | / /__ / / ___ _

config.json

Lines changed: 122 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@
99
"baudrate": 9600
1010
},
1111
"Stages": {
12-
"PycroStage XY-f5d7fbaf": {
12+
"PycroStage Z-6079a658": {
13+
"class_name": "PycroStage Z",
14+
"config": {
15+
"Z": {
16+
"max": 100,
17+
"center": 50.0
18+
},
19+
"pycromanager": {
20+
"label": "Z",
21+
"port": 4827
22+
}
23+
},
24+
"axis": [
25+
"Z"
26+
]
27+
},
28+
"PycroStage XY-60e73acd": {
1329
"class_name": "PycroStage XY",
1430
"config": {
1531
"X": {
@@ -28,56 +44,87 @@
2844
"axis": [
2945
"X"
3046
]
31-
},
32-
"PycroStage Z-6caf6b42": {
33-
"class_name": "PycroStage Z",
34-
"config": {
35-
"Z": {
36-
"max": 100,
37-
"center": 50.0
38-
},
39-
"pycromanager": {
40-
"label": "Z",
41-
"port": 4827
42-
}
43-
},
44-
"axis": [
45-
"Z"
46-
]
4747
}
4848
},
4949
"FocusStabilizer": {
50-
"ROI_x": 25.5,
51-
"ROI_y": 25.5,
52-
"ROI_length": 256.0,
53-
"ROI_angle": 0,
54-
"ROI_Width": 1,
55-
"PID": [
56-
6.45,
57-
0.0,
58-
0.0,
59-
0.0,
60-
0.001
61-
],
62-
"PixelCalCoeff": 0.01,
63-
"UseCal": false,
64-
"Inverted": false
50+
"ROIs": {
51+
"z": {
52+
"x1": 31.88696729382842,
53+
"y1": 261.81778987165205,
54+
"x2": 478.5634565421389,
55+
"y2": 261.81778987165205,
56+
"linewidth": 100
57+
},
58+
"xy": {
59+
"x1": 50.5,
60+
"y1": 25.5,
61+
"x2": 150.5,
62+
"y2": 150.5,
63+
"linewidth": 1
64+
}
65+
},
66+
"Stabilizer": {
67+
"Kp": [
68+
1.0,
69+
4.0,
70+
7.0
71+
],
72+
"Ki": [
73+
2.0,
74+
5.0,
75+
8.0
76+
],
77+
"Kd": [
78+
3.0,
79+
6.0,
80+
9.0
81+
],
82+
"tau": 0.0,
83+
"error_th": 0.001,
84+
"cal_coeff": [
85+
10.0,
86+
10.0,
87+
10.0
88+
],
89+
"use_cal": false,
90+
"inverted": [
91+
true,
92+
false,
93+
true
94+
],
95+
"method": "reflection",
96+
"rejection_method": "Median Absolute Deviation",
97+
"rejection_threshold": 1.5,
98+
"rejection_min_points": 5
99+
}
65100
},
66101
"Pycromanager": {
67102
"core_instances": [
68103
4827
69104
],
70105
"headless_instances": {}
71106
},
72-
"Cameras": [],
107+
"Cameras": [
108+
{
109+
"Camera ID": "Cam 0",
110+
"Device ID": 0,
111+
"Model": "Dummy",
112+
"Serial": "42023060",
113+
"InUse": false,
114+
"Status": "Ready",
115+
"Sensor ID": "06032024",
116+
"Driver": "miDummy",
117+
"IR": true
118+
}
119+
],
73120
"Lasers": [],
74121
"miEye_module": {
75122
"position": {
76-
"x": 620,
77-
"y": 396
123+
"x": 878,
124+
"y": 100
78125
},
79126
"size": {
80-
"width": 1200,
127+
"width": 1368,
81128
"height": 920
82129
},
83130
"is_maximized": false
@@ -86,37 +133,37 @@
86133
"slide": "sticky-Slide VI 0.4",
87134
"swap_xy": false,
88135
"invert_x": false,
89-
"invert_y": true
136+
"invert_y": false
90137
},
91138
"controller_dock": {
92139
"is_floating": true,
93140
"position": {
94-
"x": 62,
95-
"y": 397
141+
"x": 108,
142+
"y": 375
96143
},
97144
"size": {
98-
"width": 392,
99-
"height": 445
145+
"width": 395,
146+
"height": 494
100147
},
101148
"is_visible": true
102149
},
103150
"slides_dock": {
104151
"is_floating": true,
105152
"position": {
106-
"x": 60,
107-
"y": 64
153+
"x": 93,
154+
"y": 73
108155
},
109156
"size": {
110-
"width": 762,
111-
"height": 282
157+
"width": 669,
158+
"height": 256
112159
},
113160
"is_visible": true
114161
},
115162
"devices_dock": {
116163
"is_floating": false,
117164
"position": {
118-
"x": -4,
119-
"y": -230
165+
"x": 254,
166+
"y": -526
120167
},
121168
"size": {
122169
"width": 124,
@@ -125,22 +172,22 @@
125172
"is_visible": true
126173
},
127174
"stages_dock": {
128-
"is_floating": false,
175+
"is_floating": true,
129176
"position": {
130-
"x": -230,
131-
"y": -284
177+
"x": 67,
178+
"y": 909
132179
},
133180
"size": {
134-
"width": 350,
135-
"height": 180
181+
"width": 767,
182+
"height": 471
136183
},
137184
"is_visible": true
138185
},
139186
"pyscript_dock": {
140187
"is_floating": false,
141188
"position": {
142-
"x": -89,
143-
"y": -264
189+
"x": 169,
190+
"y": -560
144191
},
145192
"size": {
146193
"width": 209,
@@ -151,8 +198,8 @@
151198
"protocols_dock": {
152199
"is_floating": false,
153200
"position": {
154-
"x": -72,
155-
"y": -232
201+
"x": 186,
202+
"y": -528
156203
},
157204
"size": {
158205
"width": 192,
@@ -163,8 +210,8 @@
163210
"lasers_dock": {
164211
"is_floating": false,
165212
"position": {
166-
"x": -93,
167-
"y": -230
213+
"x": 165,
214+
"y": -526
168215
},
169216
"size": {
170217
"width": 213,
@@ -175,8 +222,8 @@
175222
"cameras_dock": {
176223
"is_floating": false,
177224
"position": {
178-
"x": -151,
179-
"y": -262
225+
"x": 107,
226+
"y": -558
180227
},
181228
"size": {
182229
"width": 271,
@@ -187,13 +234,25 @@
187234
"focus_dock": {
188235
"is_floating": false,
189236
"position": {
190-
"x": 620,
191-
"y": 452
237+
"x": 878,
238+
"y": 156
192239
},
193240
"size": {
194-
"width": 1200,
241+
"width": 1368,
195242
"height": 843
196243
},
197244
"is_visible": true
245+
},
246+
"focus_camera_dock": {
247+
"is_floating": false,
248+
"position": {
249+
"x": 217,
250+
"y": -574
251+
},
252+
"size": {
253+
"width": 161,
254+
"height": 174
255+
},
256+
"is_visible": true
198257
}
199258
}

src/microEye/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version_info = (2, 4, 0)
2-
__version__ = '.'.join(map(str, version_info)) + 'a4'
2+
__version__ = '.'.join(map(str, version_info)) + 'a5'

src/microEye/hardware/cams/line_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self) -> None:
3333
# self.average)
3434
self.data = np.random.normal(size=(512, 512))
3535
self.remote_view = pg.GraphicsView()
36-
pg.setConfigOptions(antialias=True, imageAxisOrder='row-major')
36+
pg.setConfigOptions(antialias=False, imageAxisOrder='row-major')
3737
self.remote_plt = pg.ViewBox(invertY=True)
3838
self.remote_view.setCentralItem(self.remote_plt)
3939
self.remote_plt.setAspectLocked()

src/microEye/hardware/mieye/devices_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def _init_hid_controller(self):
138138
self.widgetAdded.emit(DEVICES.HID_CONTROLLER, self.hid_controller)
139139

140140
def _init_focus_stabilizer(self):
141-
FocusStabilizer.instance().moveStage.connect(StageManager.instance().move_z)
141+
FocusStabilizer.instance().moveXYZ.connect(StageManager.instance().move_relative)
142142
FocusStabilizer.instance().startWorker()
143143

144144
self.focus = focusWidget()

src/microEye/hardware/misc/acquisition_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def __init__(self) -> None:
1111

1212
self.setWindowTitle('Image View (Snap/Live)')
1313

14-
pg.setConfigOption('imageAxisOrder', 'row-major')
14+
pg.setConfigOptions(antialias=False, imageAxisOrder='row-major')
1515

1616
size = QApplication.primaryScreen().availableGeometry()
1717
minDim = int(min(size.width(), size.height()) * 0.9)

src/microEye/hardware/stages/piezon_concept/foc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def get_z(self):
8282
@emit_after_signal('moveFinished')
8383
def move_absolute(self, x, y, z, **kwargs):
8484
if self.is_open():
85-
self.z = min(max(z, 0), self.z_max)
85+
self.z = int(min(max(z, 0), self.z_max))
8686
self.send_command(f'MOVEZ {z}n\n'.encode())
8787
self.last_command = 'MOVEZ'
8888

@@ -95,7 +95,7 @@ def stop(self):
9595
@emit_after_signal('moveFinished')
9696
def move_relative(self, x, y, z, **kwargs):
9797
if self.is_open():
98-
self.z = min(max(self.z + z, 0), self.z_max)
98+
self.z = int(min(max(self.z + z, 0), self.z_max))
9999
self.send_command(f'MOVEZ {self.z}n\n'.encode())
100100
self.last_command = 'MOVEZ'
101101

0 commit comments

Comments
 (0)