Commit graph

3195 commits

Author SHA1 Message Date
Julian Stirling
3aa9b9100a Add a number of tests for scan directories and fix bugs 2025-06-27 21:06:16 +01:00
Julian Stirling
1267d881b9 Start writing tests for smart scan
Focusing on methods that don't start the whole scan.
2025-06-27 21:06:16 +01:00
Julian Stirling
32f78a4cff Trying to make a distinction between file directory operations for scans and scanning code
This started as a small change and spiralled out of control it needs good unit tests and testing
before considering to merge
2025-06-27 21:06:16 +01:00
Julian Stirling
0d2f324324 Split creation of scan directory information into class with small testable methods 2025-06-27 21:06:16 +01:00
Julian Stirling
3e0264bcbc Merge branch 'fast-stack' into 'v3'
A stack that tests whether the sharpest image is towards the middle

See merge request openflexure/openflexure-microscope-server!271
2025-06-27 20:02:36 +00: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
e90ff73499 Move smart stack specific scan planning logic to SmartSpiral 2025-06-27 01:08:55 +01:00
Julian Stirling
2ce2f998fa add tests for helper classes defined by fast stack 2025-06-27 00:34:51 +01:00
Julian Stirling
05af5e7548 Write unit teasts for CameraMemoryBuffer and fix minor issues found 2025-06-26 22:49:09 +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
Joe Knapper
b49aecb802 Apply suggestions from code review of branch jpeg-capture-in-stacking 2025-06-25 17:32:05 +00:00
Julian Stirling
761957d7fb Clarify exposure variables in docstring 2025-06-25 17:53:43 +01:00
Julian Stirling
0389ab760a Apply suggestions from code review of branch jpeg-capture-in-stacking
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
2025-06-25 16:52:23 +00:00
Julian Stirling
ee8c58c99f Docstrings, typehints, and clarifications in PiCamera and its utils 2025-06-25 17:36:11 +01:00
Julian Stirling
83e0e08ccc Apply suggestions from code review of branch jpeg-capture-in-stacking
Co-authored-by: Beth Probert <beth_probert@outlook.com>
2025-06-25 15:12:28 +00:00
Julian Stirling
0751457ed3 Remove rednundant if __main__ from hardware tests 2025-06-25 16:01:59 +01:00
Julian Stirling
ce5b5b781c Add typehints and docstrings as suggested in review 2025-06-25 15:55:48 +01: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
2d49bf2061 Remove duplicate exposure property from picamera thing 2025-06-25 10:21:54 +01:00
Julian Stirling
59d15fb186 Add further comment to picamera tests 2025-06-25 10:18:43 +01:00
Julian Stirling
8a4ad49c03 Apply suggestions from code review of branch jpeg-capture-in-stacking
Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
2025-06-25 09:17:32 +00:00
Julian Stirling
4e78f3d104 Fix exposure time adjusting when setting the same value and add test
Closes #433
2025-06-24 17:01:16 +01:00
jaknapper
9966cb0fbb Longer wait in exposure time test with fewer loops and lower exposure time 2025-06-24 15:55:19 +01:00
jaknapper
83832bf375 Update import name of recalibrate_utils 2025-06-24 15:53:57 +01:00
Julian Stirling
a43a82213d Improve docs for hardware specific tests 2025-06-24 14:07:58 +01:00
Julian Stirling
16dfe9073f Merge branch 'do-not-overwrite-globals' into 'v3'
Remove the overwriting of internal globals, requires removing future annoations

Closes #347

See merge request openflexure/openflexure-microscope-server!303
2025-06-24 10:55:43 +00:00
Julian Stirling
be07966631 Remove the overwriting of internal globals, requires removing future annoations 2025-06-24 10:18:30 +01:00
jaknapper
11c8f47e20 Rename central image to sharpest 2025-06-23 18:13:46 +01:00
jaknapper
7c3a9ad01f Copy sharpest image from stack, not the most average sharpness! 2025-06-23 18:08:27 +01:00
Julian Stirling
febb0d2690 Clarify white balance code. 2025-06-23 17:49:35 +01:00
Julian Stirling
cdae90013a Modify comment for clarity in the function that copies the lens shading algorithm 2025-06-23 16:24:40 +00:00
Julian Stirling
afea1e3658 Create function for flattening and rounding array and converting to a list 2025-06-23 17:22:28 +01:00
Joe Knapper
7435d15b65 Merge branch 'Bug-template-typo' into 'v3'
Correct spelling of Sangaboard

See merge request openflexure/openflexure-microscope-server!302
2025-06-23 16:12:25 +00:00
Joe Knapper
c6682f539d Correct spelling of Sangaboard 2025-06-23 15:37:16 +00:00
jaknapper
62a07622fa If not provided, find resize from image size when stitching 2025-06-23 15:09:18 +01:00
jaknapper
8ba40832e0 Neighbour cutoff moved from autofocus.py to scan_planners.py 2025-06-23 14:13:08 +01:00
jaknapper
2a0de9122b computed_field pydantic decorators 2025-06-23 14:04:30 +01:00
jaknapper
ee128ad91f Rename to StackParams, move undershoots into Params 2025-06-23 13:47:14 +01:00
Julian Stirling
c659ba8f5e Minor tidying to Picamera Thing 2025-06-23 13:07:26 +01:00
jaknapper
7cff0f8f44 StackInfo dataclass 2025-06-23 12:56:31 +01:00
Julian Stirling
dd63d74651 Removing mjpeg bitrate setter from UI and Python as it wasn't implemented fully and isn't a setting that should need changing 2025-06-23 12:39:41 +01:00