Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hardware-testing): Adds hacky low-volume feature; Updates accuracy functions #13542

Merged
merged 7 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion hardware-testing/hardware_testing/gravimetric/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from .tips import get_tips
from hardware_testing.drivers import asair_sensor
from opentrons.protocol_api import InstrumentContext
from opentrons.hardware_control.types import OT3Mount

# FIXME: bump to v2.15 to utilize protocol engine
API_LEVEL = "2.13"
Expand Down Expand Up @@ -213,6 +212,7 @@ def build_run_args(cls, args: argparse.Namespace) -> "RunArgs":
kind,
False, # set extra to false so we always do the normal tests first
args.channels,
mode=args.mode, # NOTE: only needed for increment test
)
if len(vls) > 0:
volumes.append(
Expand Down Expand Up @@ -334,6 +334,7 @@ def build_gravimetric_cfg(
jog: bool,
same_tip: bool,
ignore_fail: bool,
mode: str,
run_args: RunArgs,
) -> GravimetricConfig:
"""Build."""
Expand Down Expand Up @@ -361,6 +362,7 @@ def build_gravimetric_cfg(
jog=jog,
same_tip=same_tip,
ignore_fail=ignore_fail,
mode=mode,
)


Expand All @@ -379,6 +381,7 @@ def build_photometric_cfg(
pipette_channels: int,
photoplate_column_offset: int,
dye_well_column_offset: int,
mode: str,
run_args: RunArgs,
) -> PhotometricConfig:
"""Run."""
Expand Down Expand Up @@ -408,6 +411,7 @@ def build_photometric_cfg(
ignore_fail=ignore_fail,
photoplate_column_offset=photoplate_column_offset,
dye_well_column_offset=dye_well_column_offset,
mode=mode,
)


Expand All @@ -434,6 +438,7 @@ def _main(
args.channels,
args.photoplate_col_offset,
args.dye_well_col_offset,
args.mode,
run_args,
)
union_cfg = cfg_pm
Expand All @@ -453,6 +458,7 @@ def _main(
args.jog,
args.same_tip,
args.ignore_fail,
args.mode,
run_args,
)

Expand Down Expand Up @@ -513,6 +519,9 @@ def _main(
parser.add_argument("--ignore-fail", action="store_true")
parser.add_argument("--photoplate-col-offset", type=int, default=1)
parser.add_argument("--dye-well-col-offset", type=int, default=1)
parser.add_argument(
"--mode", type=str, choices=["", "default", "lowVolumeDefault"], default=""
)
args = parser.parse_args()
run_args = RunArgs.build_run_args(args)
if not run_args.ctx.is_simulating():
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 @@ -35,6 +35,7 @@ class VolumetricConfig:
jog: bool
same_tip: bool
ignore_fail: bool
mode: str


@dataclass
Expand Down
3 changes: 3 additions & 0 deletions hardware-testing/hardware_testing/gravimetric/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def _record_measurement_and_store(m_type: MeasurementType) -> MeasurementData:
trial.liquid_tracker,
callbacks=pipetting_callbacks,
blank=trial.blank,
mode="",
)
else:
# center channel over well
Expand Down Expand Up @@ -350,6 +351,7 @@ def _record_measurement_and_store(m_type: MeasurementType) -> MeasurementData:
trial.liquid_tracker,
callbacks=pipetting_callbacks,
blank=trial.blank,
mode="",
)
trial.ctx._core.get_hardware().retract(mnt) # retract to top of gantry

Expand All @@ -370,6 +372,7 @@ def _record_measurement_and_store(m_type: MeasurementType) -> MeasurementData:
trial.liquid_tracker,
callbacks=pipetting_callbacks,
blank=trial.blank,
mode="",
)
trial.ctx._core.get_hardware().retract(mnt) # retract to top of gantry
_take_photos(trial, "dispense")
Expand Down
6 changes: 2 additions & 4 deletions hardware-testing/hardware_testing/gravimetric/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,22 +296,20 @@ def _get_volumes(
kind: config.ConfigType,
extra: bool,
channels: int,
mode: str = "",
) -> List[float]:
if increment:
print("if")
test_volumes = get_volume_increments(
pipette_channels, pipette_volume, tip_volume
pipette_channels, pipette_volume, tip_volume, mode=mode
)
elif user_volumes and not ctx.is_simulating():
print("elif")
_inp = input(
f'Enter desired volumes for tip{tip_volume}, comma separated (eg: "10,100,1000") :'
)
test_volumes = [
float(vol_str) for vol_str in _inp.strip().split(",") if vol_str
]
else:
print("else")
test_volumes = get_test_volumes(
kind, channels, pipette_volume, tip_volume, extra
)
Expand Down
Loading
Loading