Commit graph

145 commits

Author SHA1 Message Date
Richard Bowman
9334e99551 Fix typing of JPEGSharpnessMonitor attributes
appends should be done on the underlying `_`-prefixed attributes, not on the `Sequence` typed properties.
2026-04-28 14:58:55 +01:00
Richard Bowman
d2aebf8b10 Make properties of JPEGSharpnessMonitor read-only
For thread-safety reasons we should not modify the lists used by
`JPEGSharpnessMonitor`. This commit marks them as read-only properties
and types them as `Sequence` so `mypy` should flag if they get modified.
2026-04-28 14:50:04 +01:00
Joe Knapper
4da8172a16 Updates from review, mark tests as allowed to fail 2026-04-16 11:49:04 +01:00
jaknapper
bc6ea9a1ca Manually test for increasing or decreasing stacks 2026-04-02 17:43:52 +01:00
Joe Knapper
5ce77538d1 Fix tests now we dont do extra backlash moves 2026-03-12 14:53:55 +00:00
jaknapper
b43150c8bb Remove backlash correction from basic stack, as this is handled by move rel 2026-03-12 14:53:55 +00:00
Julian Stirling
0527990282 Use backlash compensation in smart scan and autofocus 2026-03-02 14:40:25 +00:00
Julian Stirling
2ae4f832bf Simplify setting model validation 2026-02-25 19:15:59 +00:00
Joe Knapper
63338f8ea0 From feedback 2026-02-25 19:15:59 +00:00
jaknapper
b211cfd4c5 Validate and test stack inputs
Update picamera hardware test
2026-02-25 19:15:56 +00:00
jaknapper
565204da59 Remove unneeded moves from basic stack
Update tests with better comments

Test a stack with both backlash compensation and offset
2026-02-25 19:14:15 +00:00
Joe Knapper
fb40af915a Switch to auto enumerating enums 2026-02-25 19:14:15 +00:00
Joe Knapper
331ceb705d Changes based on review, mostly enums and moved stack params 2026-02-25 19:14:15 +00:00
Joe Knapper
37e3450670 Move CaptureParams into camera from autofocus 2026-02-25 19:14:15 +00:00
Joe Knapper
e750129de2 Initial commit, splitting params into focus, capture, stack 2026-02-25 19:14:15 +00:00
Julian Stirling
19a6943d60 Use Invocation errors for expected errors. 2026-02-21 21:57:20 +00:00
Julian Stirling
2a3a54b936 Get unit tests passing with Scan Workflows 2026-01-16 09:28:15 +00:00
Julian Stirling
11ef1217e0 Docstrings and tweaks of ScanWorflow refactor 2026-01-16 09:28:15 +00:00
Julian Stirling
adab5bae24 Start smart stack parameters in scan workflow 2026-01-15 16:05:02 +00:00
Julian Stirling
c1ad445517 Fix some final type issues in Autofocus 2026-01-09 15:18:06 +00:00
Julian Stirling
7abede0db0 Fix type errors in remaining Things 2026-01-09 15:18:05 +00:00
Julian Stirling
4060c06a2b Assorted type fixes 2026-01-09 15:18:04 +00:00
Julian Stirling
e1dfceb0bd Remove one final invocation logger dep from autofocus 2025-12-17 11:20:41 +00:00
Julian Stirling
09336c9cb5 Apply suggestions from code review of branch continue-removing-deps
Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
2025-12-17 10:08:47 +00:00
Julian Stirling
189e82e8dc Remove deps from autofocus 2025-12-16 17:27:22 +00:00
Julian Stirling
5eea78cac7 update action, property, and setting syntax for labthings-fastapi 0.0.12 2025-12-14 18:23:26 +00:00
Julian Stirling
7bc4c514a6 Autofix import order 2025-12-02 16:26:15 +00:00
Julian Stirling
5017fea9d1 A couple of final edits suggested in review 2025-12-02 09:57:25 +00:00
Julian Stirling
9b58f4d59e Apply suggestions from code review of branch scanning-stability
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
2025-12-02 09:57:25 +00:00
Julian Stirling
e5d2ebbb79 Add tests for checking stack result 2025-12-02 09:57:24 +00:00
Julian Stirling
573330dede Add tests for z_stack 2025-12-02 09:57:24 +00:00
Julian Stirling
b9c58b70c9 Looping autofocus errors on failure to find focus. Test looping autofocus algorithm 2025-12-02 09:57:24 +00:00
Julian Stirling
a2a6d870e2 Make turing point check in z-stack optional 2025-12-02 09:57:24 +00:00
Julian Stirling
38b8c5baa5 Apply suggestions from code review of branch scanning-stability
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
2025-12-02 09:57:24 +00:00
Julian Stirling
cf92d4f3ac Make autofocus considerably stricter, forcing a parabolic fit, and only one turning point
Background can still pass this much stricter check
2025-12-02 09:57:24 +00:00
Julian Stirling
dabb195b08 Ensure smart stack exits and saves on failure only if check background is false 2025-12-02 09:57:24 +00:00
Joe Knapper
089beae01a Tests for coercing stack params to valid values.
Co-authored with Julian Stirling
2025-10-09 14:26:01 +01:00
Joe Knapper
fa6fdb1a67 Stack parameter coercion in create_stack_params
Co-authored with Julian Stirling
2025-10-09 14:23:47 +01:00
Joe Knapper
33ff356f76 Apply suggestions from code review of branch stack-height-sanitise
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2025-10-09 14:22:48 +01:00
Richard Bowman
c89db72d0a Don't coerce or log from validators.
Passing a logger in to the Model is hard: I've changed the
StackParams model so that it only validates, and raises a
ValueError if it's not correct.

Pydantic will turn the ValueError into a ValidationError.
2025-10-09 14:22:45 +01:00
Joe Knapper
05e0394485 StackParams as pydantic basemodel with validators 2025-10-09 14:22:42 +01:00
Joe Knapper
f90e716d8e Stack limits as globals 2025-10-09 14:22:40 +01:00
jaknapper
18e49ba50c Test stack params at start of scan main loop 2025-10-09 14:22:37 +01:00
Julian Stirling
528c6a2b63 Add PyLint ruff checks 2025-09-18 16:21:45 +01:00
Julian Stirling
65f172d650 Stop using print statments or root level loggers 2025-09-18 16:21:45 +01:00
Julian Stirling
2ce49088e7 Add return typehints to magic methods 2025-08-27 18:56:09 +01:00
Julian Stirling
4c46330959 Add ANN20X rules to ruff 2025-08-27 18:56:08 +01:00
Julian Stirling
d673196671 Add ANN002, and ANN003 rules 2025-08-27 18:54:16 +01:00
Julian Stirling
24233412af Start adding ANN ruff rules 2025-08-27 18:54:15 +01:00
Julian Stirling
dade26cde1 Tweak a few error types. 2025-08-21 16:11:30 +01:00