diff --git a/hardware-testing/hardware_testing/gravimetric/__main__.py b/hardware-testing/hardware_testing/gravimetric/__main__.py index cb0fb717032..83b22bf6bf6 100644 --- a/hardware-testing/hardware_testing/gravimetric/__main__.py +++ b/hardware-testing/hardware_testing/gravimetric/__main__.py @@ -366,6 +366,7 @@ def build_gravimetric_cfg( user_volumes: bool, gantry_speed: int, scale_delay: int, + allow_unstable: bool, isolate_channels: List[int], isolate_volumes: List[float], extra: bool, @@ -394,6 +395,7 @@ def build_gravimetric_cfg( user_volumes=user_volumes, gantry_speed=gantry_speed, scale_delay=scale_delay, + allow_unstable=allow_unstable, isolate_channels=isolate_channels, isolate_volumes=isolate_volumes, kind=ConfigType.gravimetric, @@ -492,6 +494,7 @@ def _main( args.user_volumes, args.gantry_speed, args.scale_delay, + args.allow_unstable, args.isolate_channels if args.isolate_channels else [], args.isolate_volumes if args.isolate_volumes else [], args.extra, @@ -551,6 +554,7 @@ def _main( parser.add_argument("--user-volumes", action="store_true") parser.add_argument("--gantry-speed", type=int, default=GANTRY_MAX_SPEED) parser.add_argument("--scale-delay", type=int, default=DELAY_FOR_MEASUREMENT) + parser.add_argument("--allow-unstable", action="store_true") parser.add_argument("--photometric", action="store_true") parser.add_argument("--touch-tip", action="store_true") parser.add_argument("--refill", action="store_true") diff --git a/hardware-testing/hardware_testing/gravimetric/config.py b/hardware-testing/hardware_testing/gravimetric/config.py index c3265d1e16a..302196838ef 100644 --- a/hardware-testing/hardware_testing/gravimetric/config.py +++ b/hardware-testing/hardware_testing/gravimetric/config.py @@ -47,6 +47,7 @@ class GravimetricConfig(VolumetricConfig): blank: bool gantry_speed: int scale_delay: int + allow_unstable: bool isolate_channels: List[int] isolate_volumes: List[float] diff --git a/hardware-testing/hardware_testing/gravimetric/execute.py b/hardware-testing/hardware_testing/gravimetric/execute.py index d1a72f4e4c9..9579d7f8be8 100644 --- a/hardware-testing/hardware_testing/gravimetric/execute.py +++ b/hardware-testing/hardware_testing/gravimetric/execute.py @@ -654,6 +654,7 @@ def run(cfg: config.GravimetricConfig, resources: TestResources) -> None: # noq liquid_tracker, False, resources.env_sensor, + stable=not cfg.allow_unstable, ) for volume in trials.keys(): actual_asp_list_all = [] diff --git a/hardware-testing/hardware_testing/gravimetric/trial.py b/hardware-testing/hardware_testing/gravimetric/trial.py index 3ec980c7972..9cfa39bcd7a 100644 --- a/hardware-testing/hardware_testing/gravimetric/trial.py +++ b/hardware-testing/hardware_testing/gravimetric/trial.py @@ -89,6 +89,7 @@ def build_gravimetric_trials( liquid_tracker: LiquidTracker, blank: bool, env_sensor: asair_sensor.AsairSensorBase, + stable: bool = True, ) -> Dict[float, Dict[int, List[GravimetricTrial]]]: """Build a list of all the trials that will be run.""" trial_list: Dict[float, Dict[int, List[GravimetricTrial]]] = {} @@ -115,7 +116,7 @@ def build_gravimetric_trials( liquid_tracker=liquid_tracker, blank=blank, mix=cfg.mix, - stable=True, + stable=False, # NOTE: evaporation rate may be faster than scale's internal stability tracking scale_delay=cfg.scale_delay, acceptable_cv=None, acceptable_d=None, @@ -168,7 +169,7 @@ def build_gravimetric_trials( liquid_tracker=liquid_tracker, blank=blank, mix=cfg.mix, - stable=True, + stable=stable, scale_delay=cfg.scale_delay, acceptable_cv=cv, acceptable_d=d,