Commit graph

1150 commits

Author SHA1 Message Date
Julian Stirling
08e58a3c1d Fix docstrings 2026-06-05 16:58:35 +01:00
Julian Stirling
fa21224eaa reinstate capture_to_memory and save_from_memory as actions 2026-06-05 16:58:35 +01:00
Julian Stirling
9dbdad4f8c Fix robust capture logic to break on success 2026-06-05 16:58:35 +01:00
Julian Stirling
29518e9cb9 Update hardware tests and fix PNG saving with picamera 2026-06-05 16:58:35 +01:00
Julian Stirling
cdab10ae46 Tweak types and fix mock persistence between tests 2026-06-05 16:58:35 +01:00
Julian Stirling
2c215b9f81 Add unit tests for RelativeDataPath and save_from_memory 2026-06-05 16:58:35 +01:00
Julian Stirling
c1915759b4 Update unit tests for capture mode. 2026-06-05 16:58:35 +01:00
Julian Stirling
9ed488e37d Complete first pass of capture mode implementation 2026-06-05 16:58:35 +01:00
Julian Stirling
83ceb82ea8 Use a path object that supports setting a Thing for the data directory.
This allows us to ensure that arbitrary paths are not selected via the API.
2026-06-05 16:58:35 +01:00
Julian Stirling
c18d43a3a5 Start to move rest of python onto refactored camera API 2026-06-05 16:58:35 +01:00
Julian Stirling
e3361ebec8 Update cameras inline with base camera rebase 2026-06-05 16:58:35 +01:00
Julian Stirling
feea7135b1 First pass at rebasing for camera modes 2026-06-05 16:58:35 +01:00
Julian Stirling
8367c40b90 rename unvalidated paths from unsafe to unvalidated 2026-06-05 11:32:25 +01:00
Julian Stirling
ef497b8fdd Add comments about PurePath usage 2026-06-05 10:26:20 +00:00
Chish36
8d7f26d23c Changed docstring for capture modes 2026-07-01 13:37:01 +01:00
Julian Stirling
0cb37abffe Path checking: Ensure windows outputs original path when warning 2026-06-02 15:02:56 +01:00
Julian Stirling
fe409ccefb Allow dots within filepaths if not trailing. 2026-06-02 14:43:03 +01:00
Julian Stirling
aff860a086 Refactor camera streaming into modes 2026-05-27 08:43:10 +01:00
Joe Knapper
4e58d613d0 Merge branch 'stitch-all-logging' into 'v3'
Log during stitch all and handle errors

Closes #710

See merge request openflexure/openflexure-microscope-server!593
2026-05-15 16:36:15 +00:00
jaknapper
0f842c622b Test stitch all with mocking 2026-05-15 17:07:10 +01:00
Joe Knapper
bea1e35d61 Merge branch 'sharpness-monitor-none' into 'v3'
Sharpness monitor accepting 0 as None

Closes #776

See merge request openflexure/openflexure-microscope-server!592
2026-05-15 15:27:52 +00:00
Joe Knapper
336e052fce Merge branch 'verify-ui-elements' into 'v3'
Verify properties and actions exist before making controls and buttons.

Closes #640

See merge request openflexure/openflexure-microscope-server!556
2026-05-15 15:11:52 +00:00
jaknapper
a278b700ef Change check for record 2026-05-15 15:45:04 +01:00
jaknapper
bd796f98a1 Log during stitch all and handle errors 2026-05-15 15:40:15 +01:00
Julian Stirling
49ae6fcd70 Merge branch 'save-rom-data' into 'v3'
Save useful ROM data to data directory

See merge request openflexure/openflexure-microscope-server!590
2026-05-15 14:16:04 +00:00
Julian Stirling
c0158a7a6c Provide feeback to user on broken UI components. 2026-05-15 15:03:20 +01:00
Julian Stirling
050c2b7672 Verify properties and actions exist before making controls and buttons. 2026-05-15 15:03:20 +01:00
Julian Stirling
40a9e25e02 Merge branch 'v3-labthings-rename-api-prefix' into 'v3'
Update code to use public `api_prefix` property

See merge request openflexure/openflexure-microscope-server!587
2026-05-15 13:56:19 +00:00
Julian Stirling
94a3fead9c Apply suggestions from code review of branch save-rom-data 2026-05-15 14:49:40 +01:00
jaknapper
78c01de6d5 Sharpness monitor accepting 0 as None 2026-05-15 14:43:23 +01:00
Richard Bowman
a66428b1b2 Fix a typo when calling _save_capture
I renamed `jpeg_path` to `path` as it's no longer just used for jpegs.
2026-05-15 13:14:28 +01:00
Richard Bowman
ee6911f4a7 PNG Capture
This adds an additional action to BaseCamera to capture and return a PNG Blob. It makes the PNG using Pillow, in a very similar way to `capture_jpeg`.

I have parametrized the test for `capture_jpeg` so it now tests both jpeg and png with the same code.
2026-05-15 13:14:27 +01:00
Julian Stirling
714435f2d4 Fix unit tests for stage_measrue as an OFMThing 2026-05-14 16:49:29 +01:00
Chish36
5c128c1467 Removed settings, fixed saving issue and refactored 2026-05-14 15:58:26 +01:00
Chish36
03dc0a065f Save useful ROM data to data directory 2026-05-14 14:24:48 +01:00
jaknapper
cbfbd84fa9 Changes from review 2026-05-14 10:52:33 +01:00
jaknapper
5be8b0ecab Update tests, including picamera 2026-05-13 18:07:29 +01:00
jaknapper
1ea308a42d Move analysis and saving out of async 2026-05-13 17:54:36 +01:00
Joe Knapper
3bbea44eaf Move saving data out of async, save as json 2026-05-13 17:54:29 +01:00
jaknapper
ab25705edc Move framerate to basecamera, using data_dir 2026-05-13 17:54:29 +01:00
jaknapper
800aea21dc Move to async monitoring 2026-05-13 17:54:29 +01:00
jaknapper
44300eafd6 Measure framerate in non-blocking way 2026-05-13 17:54:29 +01:00
Joe Knapper
7450a0e47c Merge branch 'fom-af' into 'v3'
Record fom as other sharpness metric

Closes #615

See merge request openflexure/openflexure-microscope-server!578
2026-05-13 16:53:28 +00:00
Joe Knapper
07caa1f05f Looser typing of stage positions in autofocus 2026-05-13 17:14:42 +01:00
Joe Knapper
b1791833e2 Clean up data_to_array to not use get attr 2026-05-13 17:14:42 +01:00
jaknapper
563bfcf7be Update move_and_measure, add unit tests 2026-05-13 17:14:42 +01:00
jaknapper
e93d9777a2 Type checking help for libcamera requests 2026-05-13 17:14:37 +01:00
jaknapper
0e1d9cca18 Improvements to properties and docstrings 2026-05-13 17:14:37 +01:00
Joe Knapper
1f5adbb1a5 Ruff 2026-05-13 17:14:37 +01:00
jaknapper
bea7447f26 Clean up from suggestions 2026-05-13 17:14:37 +01:00