Commit graph

113 commits

Author SHA1 Message Date
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
Joe Knapper
c2980dc988 Merge branch 'typehint-autofocus' into 'v3'
Typehints and better variable names for autofocus

Closes #271

See merge request openflexure/openflexure-microscope-server!367
2025-08-15 10:30:36 +00:00
Joe Knapper
f383365cf7 Apply suggestions from code review of branch typehint-autofocus
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2025-08-15 10:30:29 +00:00
Joe Knapper
bd115e0023 Change all CameraDeps to CameraClients 2025-08-15 10:16:36 +00:00
Joe Knapper
504b81fef6 Typehints and better variable names for autofocus 2025-08-14 14:51:03 +01:00
Joe Knapper
c00c027ab1 Apply suggestions from code review of branch img-name
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2025-07-31 14:52:21 +00:00
jaknapper
df918bf286 Prepend images with img_ 2025-07-31 13:53:57 +01:00
Julian Stirling
f91582c9eb Apply suggestions from code review of branch better-docstrings
Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
2025-07-10 23:31:34 +00:00
Julian Stirling
7e6017f648 Get codespell passing and add it as a CI job. 2025-07-11 00:16:25 +01:00
Julian Stirling
e33fecaef0 Documentation of python magic class methods 2025-07-10 16:46:10 +01:00
Julian Stirling
1bbbfeef0f Add docstrings to public methods 2025-07-10 14:04:48 +01:00
Julian Stirling
a30b726b91 Class docstrings 2025-07-10 13:27:41 +01:00
Julian Stirling
11a1fd7f85 Move ThingSetting and ThingProperty docstrings under the definition. 2025-07-10 10:43:05 +01:00
Julian Stirling
80beeea07b Add punctuation to docstrings 2025-07-10 09:24:50 +01:00
Julian Stirling
4dc41bb008 Single line summaries of docstrings 2025-07-10 09:24:49 +01:00
Julian Stirling
35d47fe3ed Starting docstring on the same lines as the quotations 2025-07-10 09:24:49 +01:00
Julian Stirling
a84a916719 Restructured text fixes so that pydoctor would return without an error 2025-07-09 23:59:08 +01:00
Julian Stirling
52a80ef66b And adjust for new as lt import 2025-07-07 15:25:14 +01:00
Julian Stirling
840ed7f20e Update Thing Settings to use the new format provided by PR #110 of Labthings FastAPI 2025-07-07 15:24:30 +01:00
Julian Stirling
8002600fcf Apply suggestions from code review of branch fast-stack
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
2025-06-27 16:40:18 +00:00
Julian Stirling
9a92fd478a Final docstring and testing updates based on code review 2025-06-27 16:54:28 +01:00
Julian Stirling
46f3d21632 Apply suggestions from code review of branch fast-stack
Co-authored-by: Beth Probert <beth_probert@outlook.com>
2025-06-27 11:52:53 +01:00
Julian Stirling
fc6c13f40e Apply suggestions from code review of branch fast-stack
Co-authored-by: Beth Probert <beth_probert@outlook.com>
2025-06-27 10:41:53 +00:00
Julian Stirling
73e54b802b Stop smart stack infinietly looping 2025-06-27 01:29:26 +01:00
Julian Stirling
2ce2f998fa add tests for helper classes defined by fast stack 2025-06-27 00:34:51 +01:00
Julian Stirling
2aea6a2569 Docstrings and stop using Pydantic for ScanParameters 2025-06-26 19:46:25 +01:00
Julian Stirling
43d5f2fdfe Change capture_resolution to save resolution, because it is used for saving not capture 2025-06-26 19:00:52 +01:00
Julian Stirling
6a87805b47 Fixing a number of issues from the merge and refactor. 2025-06-26 18:29:12 +01:00
Julian Stirling
61dd5e4958 Compete first (untested) pass of trying to make fast stack compatible with new memory captures 2025-06-26 17:43:11 +01:00
Julian Stirling
fda0a6e1ab Merge branch 'v3' into fast-stack, with conflict resolution but not fully
working yet
2025-06-26 11:50:24 +01:00
Joe Knapper
378998d230 Merge branch 'jpeg-capture-in-stacking' into 'v3'
2MP from 8MP capturing

Closes #364, #413, #298, #303, #288, #358, and #433

See merge request openflexure/openflexure-microscope-server!251
2025-06-25 17:57:51 +00:00
Julian Stirling
0933ece63a Apply suggestions from code review of branch jpeg-capture-in-stacking
Co-authored-by: Beth Probert <beth_probert@outlook.com>
2025-06-25 15:39:36 +01:00
Julian Stirling
be07966631 Remove the overwriting of internal globals, requires removing future annoations 2025-06-24 10:18:30 +01:00