Commit graph

889 commits

Author SHA1 Message Date
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
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
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
Joe Knapper
cab960fe2c Apply suggestions from code review of branch fom-af
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2026-05-13 17:14:36 +01:00
jaknapper
664bb00c12 Allow users to specify method for autofocus 2026-05-13 17:14:36 +01:00
jaknapper
881970ce34 Record fom as other sharpness metric 2026-05-13 17:14:36 +01:00
Richard Bowman
a47a569868 Update usage of hold_global_lock
The argument to `ThingServerInterface.hold_global_lock` was changed, so that `True` is now the default behaviour.
This commit updates that in the one place where it's used.
2026-05-13 12:58:50 +01:00
Richard Bowman
b6f4c9972e Exempt stitching and downloading scans from the global lock. 2026-05-13 12:58:50 +01:00
Richard Bowman
608f4ec0d5 Enable global locking.
This commit:
* switches to the LabThings branch
* enables locking when config files are loaded
* Updates jogging so jog moves aren't subject to the lock, but the jog loop is.
2026-05-13 12:58:50 +01:00
Richard Bowman
b00f90aada Remove settings from SmartStackMixin
As properties now take validation settings from the final class, we no
longer need to redefine settings here, so I've removed them.
2026-05-13 11:34:22 +01:00
Richard Bowman
622fa17634 Enable validation for all Things and pick correct branch
This commit updates the branch to use Thing._class_settings instead of FEATURE_FLAGS for a safer way to implement new features.
2026-05-13 11:34:21 +01:00
Richard Bowman
05f92b9b33 Specify the feature branch of LabThings and enable the feature flag.
I've put the feature flag in `openflexure_microscope_server.things.__init__` so that we only need it once, rather than next to every Thing definition.

I decided it was better here than, for example, in the server or cli modules because this way we still get the feature flags even if the Things are served from a different LabThings server.
2026-05-13 11:33:47 +01:00
Joe Knapper
04b7d0d4fa Merge branch 'v3-default-factory-for-dictionaries' into 'v3'
Use a default_factory for dict default values

Closes #750 and #751

See merge request openflexure/openflexure-microscope-server!561
2026-05-13 08:03:52 +00:00
Joe Knapper
31210be9ac Merge branch 'objective-sim' into 'v3'
Scale blur in simulator based on objective

Closes #745

See merge request openflexure/openflexure-microscope-server!567
2026-05-13 08:02:44 +00:00
Richard Bowman
cb9270c9e8 Use a default_factory for dict default values
`backlash_steps` and `axis_inverted` were `lt.setting`s with default values that were dictionaries. This means they had mutable default values, which caused crosstalk in the test suite.

This commit swaps them to default factory functions. This should isolate instances from each other and stop the offending behaviour.
2026-05-13 08:26:52 +01:00
Julian Stirling
92619e2131 Merge branch 'calibration_thing' into 'v3'
Calibrate settling times after moves

See merge request openflexure/openflexure-microscope-server!207
2026-05-11 12:32:30 +00:00
jaknapper
c171e5bdde Remove hold from sharpness monitor 2026-05-11 12:49:20 +01:00
jaknapper
ffa023dfa9 Correct data types in sharpness monitors 2026-05-11 11:04:55 +00:00
jaknapper
500e08555c Measure settling time action and hold in sharpness monitor 2026-05-11 11:04:55 +00:00
Julian Stirling
b6efb73cba Fix data directory save location and mount path 2026-05-11 11:07:38 +01:00
Joe Knapper
906b8be82c Merge branch 'start-gallery-thing' into 'v3'
Start implementing GalleryThing

See merge request openflexure/openflexure-microscope-server!576
2026-05-07 09:51:47 +00:00
Julian Stirling
c7bb3e3c11 Improve some attribute/method names 2026-05-07 09:48:49 +01:00
Julian Stirling
aeb337f9d1 Merge branch 'choose_int_downsample' into 'v3'
Choose a correlation resize factor rounded to an int

See merge request openflexure/openflexure-microscope-server!541
2026-05-07 08:14:41 +00:00
Julian Stirling
a16d47ed61 ScanList gets scans from GalleryThing, no ongoing scans shown. 2026-05-06 16:01:09 +01:00
Julian Stirling
4583151345 Add runtime checkable protocol for checking gallery compatibility. 2026-05-06 14:42:44 +01:00