Skip to content

Commit

Permalink
make plunger-pos adjustments automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
andySigler committed Sep 12, 2023
1 parent 82114d4 commit 70c94a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
12 changes: 0 additions & 12 deletions hardware-testing/hardware_testing/gravimetric/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,6 @@ def build_run_args(cls, args: argparse.Namespace) -> "RunArgs":
pipette_tag = helpers._get_tag_from_pipette(
pipette, args.increment, args.user_volumes
)
if args.plunger_bottom != 0.0:
hw_api = _ctx._core.get_hardware()
hw_mount = OT3Mount.LEFT if pipette.mount == "left" else OT3Mount.RIGHT
hw_pipette = hw_api.hardware_pipettes[hw_mount.to_mount()]
old_positions = hw_pipette.plunger_positions
assert (
args.plunger_bottom < old_positions.blow_out
and args.plunger_bottom > 0.0
)
old_positions.bottom = args.plunger_bottom
hw_pipette._set_plunger_positions(old_positions)

recorder: Optional[GravimetricRecorder] = None
kind = ConfigType.photometric if args.photometric else ConfigType.gravimetric
Expand Down Expand Up @@ -524,7 +513,6 @@ 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("--plunger-bottom", type=float, default=0.0)
args = parser.parse_args()
run_args = RunArgs.build_run_args(args)
if not run_args.ctx.is_simulating():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ def _blow_out_remaining_air() -> None:
max_blow_out_ul = (blow_out - bottom) * blow_out_ul_per_mm
hw_api.blow_out(hw_mount, max_blow_out_ul)

def _set_plunger_bottom() -> None:
# FIXME: this should be deleted immediately once low-volume mode is working
old_positions = hw_pipette.plunger_positions
if (aspirate and aspirate < 5) or (dispense and dispense < 5):
old_positions.bottom = 61.5
else:
old_positions.bottom = 71.5
hw_pipette._set_plunger_positions(old_positions)

# ASPIRATE/DISPENSE SEQUENCE HAS THREE PHASES:
# 1. APPROACH
# 2. SUBMERGE
Expand Down Expand Up @@ -225,6 +234,7 @@ def _blow_out_remaining_air() -> None:

# CREATE CALLBACKS FOR EACH PHASE
def _aspirate_on_approach() -> None:
_set_plunger_bottom()
hw_api.prepare_for_aspirate(hw_mount)
if liquid_class.aspirate.leading_air_gap > 0:
pipette.aspirate(liquid_class.aspirate.leading_air_gap)
Expand Down

0 comments on commit 70c94a4

Please sign in to comment.