Exemplo n.º 1
0
    def tip_probe(self, instrument):
        inst = instrument._instrument
        log.info('Probing tip with {}'.format(instrument.name))
        self._set_state('probing')

        if ff.use_protocol_api_v2():
            mount = Mount[instrument._instrument.mount.upper()]
            assert instrument.tip_racks,\
                'No known tipracks for {}'.format(instrument)
            tip_length = inst._tip_length_for(
                instrument.tip_racks[0]._container)
            # TODO (tm, 2019-04-22): This warns "coroutine not awaited" in
            # TODO: test. The test fixture probably needs to be modified to get
            # TODO: a synchronous adapter instead of a raw hardware_control API
            measured_center = self._hardware.locate_tip_probe_center(
                mount, tip_length)
        else:
            measured_center = calibration_functions.probe_instrument(
                instrument=inst, robot=inst.robot)

        log.info('Measured probe top center: {0}'.format(measured_center))

        if ff.use_protocol_api_v2():
            self._hardware.update_instrument_offset(
                Mount[instrument._instrument.mount.upper()],
                from_tip_probe=measured_center)
            config = self._hardware.config
        else:
            config = calibration_functions.update_instrument_config(
                instrument=inst, measured_center=measured_center)

        log.info('New config: {0}'.format(config))

        self.move_to_front(instrument)
        self._set_state('ready')
Exemplo n.º 2
0
def probe(tip_length: float) -> str:
    robot.reset()

    pipette = instruments.Pipette(mount='right', channels=1)
    probe_center = tuple(probe_instrument(
        pipette, robot, tip_length=tip_length))
    log.debug("Setting probe center to {}".format(probe_center))
    robot.config = robot.config._replace(
        probe_center=probe_center
    )
    return 'Tip probe'
Exemplo n.º 3
0
 def probe(self, move_after) -> str:
     hw = self.hardware
     mount = self._current_mount
     if not feature_flags.use_protocol_api_v2():
         probe_center = tuple(probe_instrument(self._pipettes[mount], hw))
     else:
         probe_center = hw.locate_tip_probe_center(mount)
         _, _, cz = position(mount, hw, CriticalPoint.TIP)
         # work around to prevent pipette tip crashing into tip box
         # when moving from tip box -> other point on the deck
         pt = types.Point(x=move_after[0], y=move_after[1], z=cz)
         hw.move_to(mount, pt)
     log.debug("Setting probe center to {}".format(probe_center))
     hw.update_config(tip_probe=hw.config.tip_probe._replace(
         center=probe_center))
     return 'Tip probe'
Exemplo n.º 4
0
    def tip_probe(self, instrument):
        inst = instrument._instrument
        log.info('Probing tip with {}'.format(instrument.name))
        self._set_state('probing')

        measured_center = calibration_functions.probe_instrument(
            instrument=inst, robot=inst.robot)

        log.debug('Measured probe top center: {0}'.format(measured_center))

        config = calibration_functions.update_instrument_config(
            instrument=inst, measured_center=measured_center)

        log.info('New config: {0}'.format(config))

        calibration_functions.move_instrument_for_probing_prep(
            inst, inst.robot)

        self._set_state('ready')