Beispiel #1
0
    def calibrate_container_with_instrument(self, container: Container,
                                            instrument, save: bool):
        '''Calibrates a container using the top or bottom of the first well'''
        well = container[0]

        # Get the relative position of well with respect to instrument
        delta = pose_tracker.change_base(self.poses, src=instrument, dst=well)

        if fflags.calibrate_to_bottom():

            delta_x = delta[0]
            delta_y = delta[1]
            if 'tiprack' in container.get_type():
                delta_z = delta[2]
            else:
                delta_z = delta[2] + well.z_size()
        else:
            delta_x = delta[0]
            delta_y = delta[1]
            delta_z = delta[2]

        self.poses = self._calibrate_container_with_delta(
            self.poses, container, delta_x, delta_y, delta_z, save)

        self.max_deck_height.cache_clear()
Beispiel #2
0
 def update_container_offset(self, container, instrument):
     inst = instrument._instrument
     log.info('Updating {} in {}'.format(container.name, container.slot))
     if instrument._context:
         if 'centerMultichannelOnWells' in container._container.quirks:
             cp = CriticalPoint.XY_CENTER
         else:
             cp = None
         here = self._hardware.gantry_position(Mount[inst.mount.upper()],
                                               critical_point=cp)
         # Reset calibration so we don’t actually calibrate the offset
         # relative to the old calibration
         container._container.set_calibration(Point(0, 0, 0))
         if ff.calibrate_to_bottom() and not (
                 container._container.is_tiprack):
             orig = _well0(container._container)._bottom().point
         else:
             orig = _well0(container._container)._top().point
         delta = here - orig
         labware.save_calibration(container._container, delta)
     else:
         inst.robot.calibrate_container_with_instrument(
             container=container._container,
             instrument=inst,
             save=True
         )
Beispiel #3
0
    def calibrate_container_with_instrument(self, container: Container,
                                            instrument, save: bool):
        '''Calibrates a container using the bottom of the first well'''
        well = container[0]

        # Get the relative position of well with respect to instrument
        delta = pose_tracker.change_base(self.poses, src=instrument, dst=well)

        if fflags.calibrate_to_bottom():

            delta_x = delta[0]
            delta_y = delta[1]
            if 'tiprack' in container.get_type():
                delta_z = delta[2]
            else:
                delta_z = delta[2] + well.z_size()
        else:
            delta_x = delta[0]
            delta_y = delta[1]
            delta_z = delta[2]

        if 'trough' in container.get_type():
            # Rather than calibrating troughs to the center of the well, we
            # calibrate such that a multi-channel would be centered in the
            # well. We don't differentiate between single- and multi-channel
            # pipettes here, and we track the tip of a multi-channel pipette
            # that would go into well A1 of an 8xN plate rather than the axial
            # center, but the axial center of a well is what we track for
            # calibration, so we add Y_OFFSET_MULTI in the calibration `move`
            # command, and then back that value off of the pipette position
            # here (Y_OFFSET_MULTI is the y-distance from the axial center of
            # the pipette to the A1 tip).
            delta_y = delta_y - Y_OFFSET_MULTI

        self.poses = calib.calibrate_container_with_delta(
            self.poses, container, delta_x, delta_y, delta_z, save)

        self.max_deck_height.cache_clear()