Skip to content

Commit

Permalink
allow unstable measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
andySigler committed Mar 18, 2024
1 parent 451b49d commit 904fc0d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions hardware-testing/hardware_testing/gravimetric/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions hardware-testing/hardware_testing/gravimetric/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
1 change: 1 addition & 0 deletions hardware-testing/hardware_testing/gravimetric/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
5 changes: 3 additions & 2 deletions hardware-testing/hardware_testing/gravimetric/trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]] = {}
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 904fc0d

Please sign in to comment.