Commit graph

4253 commits

Author SHA1 Message Date
Joel Collins
cb122e5ef6 Moved static methods to functions 2019-01-31 13:27:35 +00:00
Joel Collins
323c48858d Updated to use api_microscope.rc.asdict(), and minor formatting changes 2019-01-31 13:26:56 +00:00
Joel Collins
36b0cb0be0 Save config on server shutdown 2019-01-30 18:23:58 +00:00
Joel Collins
7a63451063 Added docstring 2019-01-30 18:23:48 +00:00
Joel Collins
92ac947982 Demoted missing attribute warning to debug 2019-01-30 18:23:40 +00:00
Joel Collins
cd1e450a2b Fixed massive bug in config contraction 2019-01-30 18:23:26 +00:00
Joel Collins
e0c09b2845 Fixed plugin path 2019-01-30 18:22:54 +00:00
Joel Collins
f2a3261b03 Overhauled config loader to allow split configs 2019-01-30 17:45:11 +00:00
Joel Collins
f720e67700 Updated path to new autofocus plugin 2019-01-30 13:59:39 +00:00
Joel Collins
57537fe49f Updated to new API routes 2019-01-30 13:58:32 +00:00
Joel Collins
4450ee132e Moved autofocus plugin to its own module 2019-01-30 13:51:20 +00:00
Joel Collins
a6791d55ac Plugin routes are now fully qualified 2019-01-30 13:51:09 +00:00
Joel Collins
0c156128fc Minor formatting changes 2019-01-30 12:02:35 +00:00
Joel Collins
7ad1e7507f Use a sensible error handler 2019-01-30 12:02:27 +00:00
Joel Collins
e6ddeaeb3a Create lock even when stage is disconnected 2019-01-30 12:00:30 +00:00
Joel Collins
73eda19acc Merge branch 'recalibration_plugin' into 'master'
A plugin to allow recalibration via the web API

See merge request openflexure/openflexure-microscope-server!4
2019-01-30 09:47:25 +00:00
Richard Bowman
416b74cb4a A plugin to allow recalibration via the web API
This adds a plugin with a single endpoint, "recalibrate".
The recalibrate methods are deliberately simple and not aware
of the StreamingCamera because I want to share the maximum
amount of code with non-microscope projects that also want
to flatten the lens shading.

The plugin is microscope-specific, and therefore handles
shutting down the stream and managing the resolution of
the camera, to allow the calibration to run without
restarting the microscope server.

Currently it **DOES NOT SAVE SETTINGS**.

TODO: save the settings after recalibration.

Arguably this isn't a job for this plugin, what we would
need is:
* A method to sync the StreamingCamera's settings with the
  underlying PiCamera object
* A method to save the StreamingCamera's settings to disk.
I think it would be neatest to provide the first of these as
a method of the StreamingCamera class, and call it from the
plugin.  Saving the settings to disk (e.g. to the microscope
rc file, or to somewhere else) should be a separate endpoint
(although most interfaces will probably call it immediately
after recalibration).
2019-01-30 09:10:33 +00:00
Joel Collins
0aae79a2ad Clarified the use of task IDs 2019-01-29 14:53:17 +00:00
Joel Collins
54106e845f Rearranged self.plugin documentation 2019-01-29 14:49:04 +00:00
Joel Collins
397395f05f Added responses to API route documentation 2019-01-29 14:43:39 +00:00
Joel Collins
6743882bf1 Corrected the abort code for missing resource 2019-01-29 14:43:22 +00:00
Joel Collins
36af9f84b5 Added scipy to requirements (used in autofocus) 2019-01-29 14:03:30 +00:00
Joel Collins
d7e19c40e2 Included Richards autofocus plugin in defaults 2019-01-29 13:54:47 +00:00
Joel Collins
cc36aa7593 Fixed a bug where malformed JSON payloads prevented default param values from returning 2019-01-29 13:54:32 +00:00
Joel Collins
bda946bcc9 Errors in plugins no longer caught as if the module just didn't exist 2019-01-29 13:42:32 +00:00
Joel Collins
485ebe9fb1 Added string representation of LocError 2019-01-29 13:41:46 +00:00
Joel Collins
b4d9840ed0 Added set_properties context manager 2019-01-29 13:41:35 +00:00
Joel Collins
e420252b37 Fixed recalibration stream stop/restart 2019-01-29 13:20:55 +00:00
Joel Collins
a11d2145d9 Fixed broken error handling for long-running tasks 2019-01-28 17:49:44 +00:00
Joel Collins
fdcc0d5275 Added wrapper class and heading 2019-01-28 16:43:33 +00:00
Joel Collins
0f7891b40c Better error handling in getConfig 2019-01-28 16:43:22 +00:00
Joel Collins
0808f3708f Used v-bind for text input updates 2019-01-28 16:43:08 +00:00
Joel Collins
4b935a5855 Input for port 2019-01-28 15:48:40 +00:00
Joel Collins
001edce47c Actually gets config from API (with loading spinner!) 2019-01-28 12:04:58 +00:00
Joel Collins
859ffc2496 Initial vue commit 2019-01-28 09:53:22 +00:00
Joel Collins
e3a27b024a Iterated version numbers 2019-01-24 16:27:21 +00:00
Joel Collins
52583ad4ae Iterated version number 2019-01-24 16:26:57 +00:00
Joel Collins
ea141ab0fc Updated documentation 2019-01-24 16:24:22 +00:00
Joel Collins
465ed647d3 Fixed docstrings 2019-01-24 16:24:14 +00:00
Joel Collins
80cc74bd3d Fixed plugin blueprint method name clashing 2019-01-24 14:14:25 +00:00
Joel Collins
e5fca6c8a0 Fixed broken type hint 2019-01-24 14:09:54 +00:00
Joel Collins
9860ace394 Fixed broken legacy import 2019-01-24 14:09:47 +00:00
Joel Collins
363094170e Added/updated docs 2019-01-24 14:05:57 +00:00
Joel Collins
cb441201c6 Explicitally acquire camera lock 2019-01-24 14:05:45 +00:00
Joel Collins
5c86c7f350 Updated to use CompositeLock 2019-01-24 14:05:25 +00:00
Joel Collins
27043240f3 Added explicit lock ecquisition 2019-01-24 14:05:05 +00:00
Joel Collins
fb26bcb7f3 Added CompositeLock 2019-01-24 14:04:41 +00:00
Joel Collins
25aeae0233 Updated LockError location and added docs 2019-01-24 14:04:30 +00:00
Joel Collins
488b94eee6 Updated LockError location 2019-01-24 14:04:12 +00:00
Joel Collins
59b634498b Moved LockError into exceptions.py 2019-01-24 14:03:55 +00:00