Commit graph

2495 commits

Author SHA1 Message Date
Richard Bowman
3ca469cca6 Install dev dependencies
We now install with --dev to make sure development dependencies
are included.  I've also removed "poetry run"
from the "poe" commands, as we are
already in an active virtual environment, so
it's unnecessary (and also broken).

Finally, I added a tarball of the vue app to
the output distribution.
2021-03-29 14:57:18 +01:00
Richard Bowman
faa08f3aef Switch CI to use poetry 2021-03-29 11:26:38 +01:00
Richard Bowman
4c70562687 Updated readme with new install instructions 2021-03-26 21:13:16 +00:00
Richard Bowman
af7ef08f63 Move away from poetry
More or less everything is now done by setup.py
Pipfile simply installs the module in editable mode, which
recursively resolves dependencies as defined in setup.py.
2021-03-26 21:11:22 +00:00
Richard
9d81a80bbb Fixed infinite loop in pollUntilComplete 2021-03-24 13:25:54 +00:00
Richard
024f2566f0 Working stage positioning
NB there is a server bug that means absolute moves fail -
this should be fixed in a separate branch.
2021-03-24 13:23:20 +00:00
Richard Bowman
a373afd955 swap print for logging in old function 2021-03-16 11:01:57 +00:00
Richard Bowman
cd30872d62 Split out action polling to separate function. 2021-03-09 21:56:06 +00:00
Richard Bowman
2b0b548307 Removed some TODOs because we did them! 2021-03-09 12:16:36 +00:00
Richard Bowman
0165f0a798 Populated snapImage and getImage
Co-authored-by: Kaspar Emanuel <kaspar@monostable.co.uk>
2021-03-09 12:12:28 +00:00
Richard Bowman
03a4f36556 Remove spurious GPU preview event 2021-03-01 12:20:04 +00:00
Richard Bowman
8624e45df4 Axios version bump and vuex-map-fields
vuex-map-fields cleans up code when mapping
store state to local computed properties.
2021-02-23 17:36:58 +00:00
Richard Bowman
a7bb0f9423 Reset tour button and URL origin
Reset tour button resets the local storage used to mark the tour
as done.

Overriding the origin can now be done with a query string.
This will load the store with the new origin from the start,
so might be better for testing some things.
I'm not worried about unexpected bugs, as it is quite obvious
from the URL what's going on.
2021-02-23 15:56:15 +00:00
Richard Bowman
1f3ba2bff1 Allow origin to be overridden by query
Specifying overrideOrigin in the URL now
sets up the store with the modified origin.
This is intended for development, and makes it
much less annoying to develop with a Vue dev server.
2021-02-23 15:54:28 +00:00
Richard Bowman
621b99eb9b Switch tab when opening with ImJoy 2021-02-23 12:27:58 +00:00
Richard Bowman
9b52865f95 Added an implementation of snapImage() to API
Co-authored-by: Kaspar Emanuel <kaspar@monostable.co.uk>
2021-02-23 12:08:20 +00:00
Richard Bowman
bc0995d0cf Added poe serve
To save some typing ``poe serve`` now runs a debug server.
2021-02-18 18:03:42 +00:00
Richard Bowman
3b435ab2ee Deleted obsolete functions 2021-02-18 15:56:11 +00:00
Richard Bowman
414fd55c5b Upgrade numpy
numpy/scipy were mismatched in version, which led to a confusing
import error.  I've removed the numpy version specification entirely
and left it to scipy to ensure numpy
is installed.  This could do with
review in the future...
2021-02-18 14:33:07 +00:00
Richard Bowman
20001e4946 Force installation only from piwheels
Forcing the use of piwheels avoids trying
to install numpy/scipy from source,
which is the Right Answer.

Unfortunately, sometimes packages fail on piwheels, but poetry still
tries to install them.  I've had to fix
pyyaml at 5.4.0 for that reason.
2021-02-18 13:29:02 +00:00
Richard Bowman
1e45640195 Added control to reset LST
You can now recalibrate the LST without running auto-gain.
2021-02-15 20:19:39 +00:00
Richard Bowman
b06dd187ec Fixed args in endpoints 2021-02-15 20:18:34 +00:00
Richard Bowman
069d27bf15 Lock access to picamera
The picamera object isn't thread safe; I have now wrapped all access
in context managers that acquire the BaseCamera.lock

I also added an endpoint to reset the LST without auto-gain.
2021-02-15 20:15:55 +00:00
Richard Bowman
a9709b14ea Added locking to recalibrate functions
When testing the UI I noticed that the different recalibrate routines
don't use locks properly, so they try to run
concurrently.

This commit isn't tested yet...
2021-02-15 19:21:27 +00:00
Richard Bowman
36284c10be UI Improvements
I've added buttons to perform the separate calibrations (gain, AWB)
under the full recalibrate link.
It would be really nice to have a modal dialog though.
2021-02-15 19:17:20 +00:00
Richard Bowman
2f6049610f Added controls for AWB gains,
I also increased the precision of the numbers, which makes the step
buttons annoyingly useless but allows floating point
values without validation errors.
2021-02-15 17:50:39 +00:00
Richard Bowman
0f1a400979 Fixed type hint 2021-02-15 17:04:44 +00:00
Richard Bowman
e6bfc9342b Merge branch 'support-imagej' into 'imjoy-support'
Support open in ImageJ.JS plugin

See merge request rwb27/openflexure-microscope-server!1
2021-02-15 13:49:59 +00:00
oeway
1c8ebfce32 Add todo note 2021-02-14 22:45:18 +01:00
oeway
52c40791a9 Support Engine 2021-02-14 22:40:37 +01:00
oeway
6436034ccb Fix time 2021-02-14 22:21:01 +01:00
oeway
f80500fbb5 Improve showStatus/Message/Progress 2021-02-14 22:20:00 +01:00
oeway
e460c0faff Add template for microscope api and script editor 2021-02-14 21:17:15 +01:00
oeway
3b002d59a5 Add ImageJ.JS and Kaibu to the plugin menu 2021-02-14 20:04:59 +01:00
oeway
a692b90ede Load ITK VTK viewer 2021-02-14 18:16:50 +01:00
oeway
61c49e520f Support ImageJ.JS 2021-02-14 17:40:39 +01:00
Richard Bowman
ff322decfc updated poetry lockfile 2021-02-11 19:37:40 +00:00
Richard Bowman
4c27d88b37 Fixed description and linted 2021-02-11 15:54:58 +00:00
Richard Bowman
5527c4eb7b Fix auto-exposure and AWB
The previous "auto calibrate" button for the camera relied on a
combination of the built-in autoexposure/AWB and
some JPEG-based tweaks to get the exposure settings right.
This often led to confusing results, e.g. oscillating between green and
 pink images.

 I have rewritten the auto-exposure code to adjust gain and shutter
 speed based on the raw image.  This seems to be
 very reliable, at the expense of being quite slow.  That's a price I'm
 happy to pay.

 I have replaced both the camera's auto white balance and my
 JPEG-based AWB hack with a single-shot AWB method that
 looks at the raw image.
2021-02-11 14:30:20 +00:00
Richard Bowman
cfa5297a23 Added an "open in kaibu" link 2021-02-09 12:45:48 +00:00
Richard Bowman
0a0687cdd6 Added imjoy support
We now have an imjoy tab and the ability to load plugins
2021-02-09 11:46:29 +00:00
Richard Bowman
fc86745006 Fix whitespace 2021-02-09 10:19:56 +00:00
Richard Bowman
864e4c9c41 Merge branch 'improve-local-development' into 'master'
Persistent API override setting.

See merge request openflexure/openflexure-microscope-server!116
2021-02-09 10:13:54 +00:00
Richard Bowman
2b3c0a9bac Make the origin override persistent
The dev tools pane now remembers the last address you entered in
"override origin" to save a few clicks  when doing local Vue development
2021-02-09 09:46:52 +00:00
Richard Bowman
792e782968 Validate scan shape on the server
The scan API view now uses a schema with validation
constraints to enforce a minimum size of 1 in any dimension.
This requires better error handling in the app, which I've added.
It also needs a fix in LabThings so the error propagates correctly
2021-02-09 09:21:56 +00:00
Richard Bowman
df5d0dab68 Add minimum scan dimension
It doesn't make sense to allow fewer than 1 image in any dimension
of a scan.  Currently, supplying 0 gives a division by zero error.
I've added min="1" to each control.
2021-02-08 20:26:16 +00:00
Richard Bowman
f4e3f1f277 Merge branch 'update-readme' into 'master'
Update build instructions

See merge request openflexure/openflexure-microscope-server!115
2021-02-08 09:32:12 +00:00
Richard Bowman
d72240ef03 Update build instructions 2021-02-08 09:19:46 +00:00
Richard Bowman
a9ef605c33 Merge branch 'fix-tour-placement' into 'master'
Fix tour placement

Closes #199

See merge request openflexure/openflexure-microscope-server!114
2021-02-06 15:32:27 +00:00
Richard Bowman
afbb71607d Fix placement of tour messages for icons
The tour pop-ups were getting stuck in the tab icon container.
Explicitly specifying that they could overflow said container,
and setting them to show to the right, seems to have fixed this issue.
2021-02-06 15:32:27 +00:00