adjust_shutter_and_gain_from_raw now uses a simpler algorithm.
The code is longer overall but hides some details in fuctions.
I've also split the loop into one for shutter speed and one for gain.
This isn't the algorithm that I originally wrote, but it seems to
work and is more readable.
I've changed the default values in MoveStageAPI
so that it correctly handles absolute moves with missing axes.
I've also simplified it so it isn't using axes_to_array as that
resulted in a confusing code path.
I don't know why these didn't fail before - possibly because of
incomplete type information from old numpy...
I removed a few annotations because they were failing (e.g.
np.sum can return a scalar or an array), but I don't think
this should be a problem - the function inputs and return values
are still typed.
numpy 1.20 deprecates np.float, which was only ever an alias for
``float``. I've replaced all occurrences of np.float with float, as
recommended. There should be no change in functionality.
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.
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.
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...
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.
I also increased the precision of the numbers, which makes the step
buttons annoyingly useless but allows floating point
values without validation errors.
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.
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.