diff --git a/pioreactor/actions/self_test.py b/pioreactor/actions/self_test.py index b1034a4b..9f3c9384 100644 --- a/pioreactor/actions/self_test.py +++ b/pioreactor/actions/self_test.py @@ -269,7 +269,7 @@ def test_REF_is_lower_than_0_dot_256_volts( assert ( 0.05 < readings[reference_channel] < 0.256 - ), f"Recorded {readings[reference_channel]} in REF, should ideally be between 0.05 and 0.256." + ), f"Recorded {readings[reference_channel]} in REF, should ideally be between 0.05 and 0.256. Current IR LED: {ir_intensity}%." def test_detect_heating_pcb(client: Client, logger: Logger, unit: str, experiment: str) -> None: diff --git a/pioreactor/background_jobs/od_reading.py b/pioreactor/background_jobs/od_reading.py index 9643b2e1..fdc8494b 100644 --- a/pioreactor/background_jobs/od_reading.py +++ b/pioreactor/background_jobs/od_reading.py @@ -637,10 +637,6 @@ def __init__(self) -> None: self.logger.debug("Not using any calibration.") -def noop(x): - return x - - class CachedCalibrationTransformer(CalibrationTransformer): def __init__(self, channel_angle_map: dict[pt.PdChannel, pt.PdAngle]) -> None: super().__init__() @@ -650,7 +646,7 @@ def __init__(self, channel_angle_map: dict[pt.PdChannel, pt.PdAngle]) -> None: except Exception as e: self.logger.debug(e, exc_info=True) self.logger.error("Unable to load calibration models", exc_info=True) - self.models = {"1": noop, "2": noop} + raise e def get_models_from_disk( self, channel_angle_map: dict[pt.PdChannel, pt.PdAngle] @@ -1173,7 +1169,7 @@ def start_od_reading( else: ir_led_reference_tracker = NullIrLedReferenceTracker() # type: ignore - # use OD600 calibration? + # use an OD calibration? if use_calibration: calibration_transformer = CachedCalibrationTransformer(channel_angle_map) else: