Fixed linter errors
This commit is contained in:
parent
8c50f73b34
commit
88de3089ea
2 changed files with 4 additions and 5 deletions
|
|
@ -205,7 +205,7 @@ class AutoExposureFromRawView(ActionView):
|
|||
}
|
||||
|
||||
def post(self, args):
|
||||
with find_picamera() as (picamera, scamera, microscope):
|
||||
with find_picamera() as (picamera, _, _):
|
||||
adjust_shutter_and_gain_from_raw(picamera, **args)
|
||||
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ class AutoWhiteBalanceFromRawView(ActionView):
|
|||
}
|
||||
|
||||
def post(self, args):
|
||||
with find_picamera() as (picamera, scamera, microscope):
|
||||
with find_picamera() as (picamera, _, _):
|
||||
adjust_white_balance_from_raw(picamera, **args)
|
||||
|
||||
|
||||
|
|
@ -238,5 +238,5 @@ class GetRawChannelPercentilesView(ActionView):
|
|||
schema = fields.List(fields.Integer)
|
||||
|
||||
def post(self, args):
|
||||
with find_picamera() as (picamera, scamera, microscope):
|
||||
with find_picamera() as (picamera, _, _):
|
||||
return get_channel_percentiles(picamera, args["percentile"])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import logging
|
||||
import time
|
||||
from fractions import Fraction
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
import numpy as np
|
||||
|
|
@ -40,7 +39,7 @@ def flat_lens_shading_table(camera: PiCamera) -> np.ndarray:
|
|||
|
||||
def adjust_exposure_to_setpoint(camera: PiCamera, setpoint: int):
|
||||
"""Adjust the camera's exposure time until the maximum pixel value is <setpoint>."""
|
||||
logging.info("Adjusting shutter speed to hit setpoint {}".format(setpoint))
|
||||
logging.info(f"Adjusting shutter speed to hit setpoint {setpoint}")
|
||||
for _ in range(3):
|
||||
camera.shutter_speed = int(
|
||||
camera.shutter_speed * setpoint / np.max(rgb_image(camera))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue