Ejemplo n.º 1
0
    def setUp(self):
        Robot.reset_for_tests()
        self.robot = Robot.get_instance()

        self.robot.reset()
        self.robot.connect()
        self.robot.home(enqueue=False)
    def setUp(self):
        Robot.reset_for_tests()
        self.robot = Robot.get_instance()

        self.robot.reset()
        self.robot.connect()
        self.robot.home(enqueue=False)
Ejemplo n.º 3
0
    def setUp(self):
        Robot.reset_for_tests()
        self.robot = Robot.get_instance()

        self.smoothie_version = 'edge-1c222d9NOMSD'

        self.robot.reset()
        self.robot.connect(options={'firmware': self.smoothie_version})
        self.robot.home(enqueue=False)
Ejemplo n.º 4
0
    def __init__(self, name=None, mosfet=0, container=None):
        self.axis = 'M{}'.format(mosfet)

        self.robot = Robot.get_instance()
        self.robot.add_instrument(self.axis, self)
        self.motor = self.robot.get_mosfet(mosfet)

        if not name:
            name = self.__class__.__name__
        self.name = name

        self.persisted_data = []

        self.calibration_key = "{axis}:{instrument_name}".format(
            axis=self.axis, instrument_name=self.name)

        # a reference to the placeable set ontop the magbead module
        self.container = container

        self.engaged = False

        persisted_key = '{axis}:{name}'.format(axis=self.axis, name=self.name)
        self.init_calibrations(key=persisted_key)
        self.load_persisted_data()
Ejemplo n.º 5
0
    def __init__(self,
                 axis,
                 name=None,
                 channels=1,
                 min_volume=0,
                 max_volume=None,
                 trash_container=None,
                 tip_racks=[],
                 aspirate_speed=300,
                 dispense_speed=500):

        self.axis = axis
        self.channels = channels

        if not name:
            name = self.__class__.__name__
        self.name = name

        self.trash_container = trash_container
        self.tip_racks = tip_racks

        # default mm above tip to execute drop-tip
        # this gives room for the drop-tip mechanism to work
        self._drop_tip_offset = 15

        self.reset_tip_tracking()

        self.robot = Robot.get_instance()
        self.robot.add_instrument(self.axis, self)
        self.motor = self.robot.get_motor(self.axis)

        self.placeables = []
        self.previous_placeable = None
        self.current_volume = 0

        self.speeds = {'aspirate': aspirate_speed, 'dispense': dispense_speed}

        self.min_volume = min_volume
        self.max_volume = max_volume or (min_volume + 1)

        self.positions = {
            'top': None,
            'bottom': None,
            'blow_out': None,
            'drop_tip': None
        }
        self.calibrated_positions = copy.deepcopy(self.positions)

        self.calibration_data = {}

        # Pipette properties to persist between sessions
        persisted_attributes = ['calibration_data', 'positions', 'max_volume']
        persisted_key = '{axis}:{name}'.format(axis=self.axis, name=self.name)

        self.init_calibrations(key=persisted_key,
                               attributes=persisted_attributes)
        self.load_persisted_data()

        self.calibrator = Calibrator(self.robot._deck, self.calibration_data)

        # if the user passed an initialization value,
        # overwrite the loaded persisted data with it
        if isinstance(max_volume, (int, float, complex)) and max_volume > 0:
            self.max_volume = max_volume
            self.update_calibrations()