Beispiel #1
0
def get_pipettes(sess: SessionManager):
    if not feature_flags.use_protocol_api_v2():
        attached_pipettes = sess.adapter.get_attached_pipettes()
        left_pipette = None
        right_pipette = None
        left = attached_pipettes.get('left')
        right = attached_pipettes.get('right')
        if left['model'] in pipette_config.config_models:
            left_pipette = instruments.pipette_by_name('left', left['name'])
        if right['model'] in pipette_config.config_models:
            right_pipette = instruments.pipette_by_name('right', right['name'])
    else:
        attached_pipettes = sess.adapter.attached_instruments
        left_pipette = attached_pipettes.get(Mount.LEFT)
        right_pipette = attached_pipettes.get(Mount.RIGHT)
    return right_pipette, left_pipette
Beispiel #2
0
def load_pipettes(protocol_data):
    pipettes = protocol_data.get('pipettes', {})
    pipettes_by_id = {}

    for pipette_id, props in pipettes.items():
        mount = props.get('mount')
        name = props.get('name')
        pipette = instruments.pipette_by_name(mount, name)
        pipettes_by_id[pipette_id] = pipette

    return pipettes_by_id
Beispiel #3
0
def load_pipettes(protocol_data):
    pipettes = protocol_data.get('pipettes', {})
    pipettes_by_id = {}

    for pipette_id, props in pipettes.items():
        model = props.get('model')
        mount = props.get('mount')

        # TODO: Ian 2018-11-06 remove this fallback to 'model' when
        # backwards-compatability for JSON protocols with versioned
        # pipettes is dropped (next JSON protocol schema major bump)
        name = props.get('name')
        if not name:
            name = model.split('_v')[0]
        pipette = instruments.pipette_by_name(mount, name)

        pipettes_by_id[pipette_id] = pipette

    return pipettes_by_id