diff --git a/.gitignore b/.gitignore index 2d8b2ff20cb5..9e3f45a218ee 100755 --- a/.gitignore +++ b/.gitignore @@ -164,4 +164,9 @@ mock_dir .npm-cache/ .eslintcache +# include archived API docs +!api/docs/dist/ +api/docs/dist/hardware/ +api/docs/dist/v2/ + package-testing/results diff --git a/api/Makefile b/api/Makefile index 28f7c7ff79ef..90e3282b01f9 100755 --- a/api/Makefile +++ b/api/Makefile @@ -155,11 +155,11 @@ docs/dist/%: docs/root/% $(SHX) cp -R docs/root/* docs/dist/ .PHONY: docs -docs: docs/dist/index.html docs/dist/v1 docs/dist/v2 docs/dist/ot1 docs/dist/hardware +docs: docs/dist/v2 docs/dist/hardware .PHONY: docs-clean docs-clean: - $(SHX) rm -rf docs/dist docs/build + $(SHX) rm -rf docs/dist/v2 docs/dist/hardware docs/build .PHONY: dev dev: diff --git a/api/docs/dist/index.html b/api/docs/dist/index.html new file mode 100644 index 000000000000..29b14356e39e --- /dev/null +++ b/api/docs/dist/index.html @@ -0,0 +1,26 @@ + + + + + + + + Welcome to the OT-2 Python Protocol API Docs — Opentrons OT-2 Python Protocol API Documentation + + + + + +

Your browser should automatically redirect you from this page.

+ But if it does not, click one of the following links to go to the docs: + + + diff --git a/api/docs/dist/ot1/.nojekyll b/api/docs/dist/ot1/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/api/docs/dist/ot1/_images/384-plate.png b/api/docs/dist/ot1/_images/384-plate.png new file mode 100644 index 000000000000..8c4bf2130467 Binary files /dev/null and b/api/docs/dist/ot1/_images/384-plate.png differ diff --git a/api/docs/dist/ot1/_images/96-Deep-Well.png b/api/docs/dist/ot1/_images/96-Deep-Well.png new file mode 100644 index 000000000000..84e8343bec5f Binary files /dev/null and b/api/docs/dist/ot1/_images/96-Deep-Well.png differ diff --git a/api/docs/dist/ot1/_images/96-PCR-Flatt.png b/api/docs/dist/ot1/_images/96-PCR-Flatt.png new file mode 100644 index 000000000000..b90e7ab6f08f Binary files /dev/null and b/api/docs/dist/ot1/_images/96-PCR-Flatt.png differ diff --git a/api/docs/dist/ot1/_images/96-PCR-Strip.png b/api/docs/dist/ot1/_images/96-PCR-Strip.png new file mode 100644 index 000000000000..5657b407cb5d Binary files /dev/null and b/api/docs/dist/ot1/_images/96-PCR-Strip.png differ diff --git a/api/docs/dist/ot1/_images/96-PCR-Tall.png b/api/docs/dist/ot1/_images/96-PCR-Tall.png new file mode 100644 index 000000000000..687f28988ba4 Binary files /dev/null and b/api/docs/dist/ot1/_images/96-PCR-Tall.png differ diff --git a/api/docs/dist/ot1/_images/SelectConfigFile.png b/api/docs/dist/ot1/_images/SelectConfigFile.png new file mode 100644 index 000000000000..ed8341945474 Binary files /dev/null and b/api/docs/dist/ot1/_images/SelectConfigFile.png differ diff --git a/api/docs/dist/ot1/_images/Tiprack-1000.png b/api/docs/dist/ot1/_images/Tiprack-1000.png new file mode 100644 index 000000000000..f82c49211332 Binary files /dev/null and b/api/docs/dist/ot1/_images/Tiprack-1000.png differ diff --git a/api/docs/dist/ot1/_images/Tiprack-1000ul-chem.png b/api/docs/dist/ot1/_images/Tiprack-1000ul-chem.png new file mode 100644 index 000000000000..72c666afdc93 Binary files /dev/null and b/api/docs/dist/ot1/_images/Tiprack-1000ul-chem.png differ diff --git a/api/docs/dist/ot1/_images/Tiprack-10ul-H.png b/api/docs/dist/ot1/_images/Tiprack-10ul-H.png new file mode 100644 index 000000000000..cb013f0449dc Binary files /dev/null and b/api/docs/dist/ot1/_images/Tiprack-10ul-H.png differ diff --git a/api/docs/dist/ot1/_images/Tiprack-10ul.png b/api/docs/dist/ot1/_images/Tiprack-10ul.png new file mode 100644 index 000000000000..757a207f8f7c Binary files /dev/null and b/api/docs/dist/ot1/_images/Tiprack-10ul.png differ diff --git a/api/docs/dist/ot1/_images/Tiprack-200ul.png b/api/docs/dist/ot1/_images/Tiprack-200ul.png new file mode 100644 index 000000000000..c0f73d1026dc Binary files /dev/null and b/api/docs/dist/ot1/_images/Tiprack-200ul.png differ diff --git a/api/docs/dist/ot1/_images/Trough-12row.png b/api/docs/dist/ot1/_images/Trough-12row.png new file mode 100644 index 000000000000..e4d8fe13ae7a Binary files /dev/null and b/api/docs/dist/ot1/_images/Trough-12row.png differ diff --git a/api/docs/dist/ot1/_images/Tuberack-075ml.png b/api/docs/dist/ot1/_images/Tuberack-075ml.png new file mode 100644 index 000000000000..3db2083ac9e9 Binary files /dev/null and b/api/docs/dist/ot1/_images/Tuberack-075ml.png differ diff --git a/api/docs/dist/ot1/_images/Tuberack-15-50ml.png b/api/docs/dist/ot1/_images/Tuberack-15-50ml.png new file mode 100644 index 000000000000..6406fb7a8cb4 Binary files /dev/null and b/api/docs/dist/ot1/_images/Tuberack-15-50ml.png differ diff --git a/api/docs/dist/ot1/_images/Tuberack-2ml.png b/api/docs/dist/ot1/_images/Tuberack-2ml.png new file mode 100644 index 000000000000..cd5b3903f47e Binary files /dev/null and b/api/docs/dist/ot1/_images/Tuberack-2ml.png differ diff --git a/api/docs/dist/ot1/_images/Well_Iteration.png b/api/docs/dist/ot1/_images/Well_Iteration.png new file mode 100644 index 000000000000..90bba0f10a99 Binary files /dev/null and b/api/docs/dist/ot1/_images/Well_Iteration.png differ diff --git a/api/docs/dist/ot1/_images/connected.png b/api/docs/dist/ot1/_images/connected.png new file mode 100644 index 000000000000..feb0dd059303 Binary files /dev/null and b/api/docs/dist/ot1/_images/connected.png differ diff --git a/api/docs/dist/ot1/_images/container-calibration.png b/api/docs/dist/ot1/_images/container-calibration.png new file mode 100644 index 000000000000..a393bca7f432 Binary files /dev/null and b/api/docs/dist/ot1/_images/container-calibration.png differ diff --git a/api/docs/dist/ot1/_images/container-list.png b/api/docs/dist/ot1/_images/container-list.png new file mode 100644 index 000000000000..f0c1bbe1da32 Binary files /dev/null and b/api/docs/dist/ot1/_images/container-list.png differ diff --git a/api/docs/dist/ot1/_images/dragFirmwareBin.png b/api/docs/dist/ot1/_images/dragFirmwareBin.png new file mode 100644 index 000000000000..d9be9ca892fa Binary files /dev/null and b/api/docs/dist/ot1/_images/dragFirmwareBin.png differ diff --git a/api/docs/dist/ot1/_images/firmware_files.png b/api/docs/dist/ot1/_images/firmware_files.png new file mode 100644 index 000000000000..6e75b2033d3a Binary files /dev/null and b/api/docs/dist/ot1/_images/firmware_files.png differ diff --git a/api/docs/dist/ot1/_images/move-to-slot.png b/api/docs/dist/ot1/_images/move-to-slot.png new file mode 100644 index 000000000000..13fcee51952d Binary files /dev/null and b/api/docs/dist/ot1/_images/move-to-slot.png differ diff --git a/api/docs/dist/ot1/_images/pipette-calibration.png b/api/docs/dist/ot1/_images/pipette-calibration.png new file mode 100644 index 000000000000..713e8ff4895d Binary files /dev/null and b/api/docs/dist/ot1/_images/pipette-calibration.png differ diff --git a/api/docs/dist/ot1/_images/pipette-jog.png b/api/docs/dist/ot1/_images/pipette-jog.png new file mode 100644 index 000000000000..a65b0f6e0bd4 Binary files /dev/null and b/api/docs/dist/ot1/_images/pipette-jog.png differ diff --git a/api/docs/dist/ot1/_images/ports.png b/api/docs/dist/ot1/_images/ports.png new file mode 100644 index 000000000000..4b0f0af4b441 Binary files /dev/null and b/api/docs/dist/ot1/_images/ports.png differ diff --git a/api/docs/dist/ot1/_images/replaceConfig.png b/api/docs/dist/ot1/_images/replaceConfig.png new file mode 100644 index 000000000000..4b1dca9b5230 Binary files /dev/null and b/api/docs/dist/ot1/_images/replaceConfig.png differ diff --git a/api/docs/dist/ot1/_images/running-protocol.png b/api/docs/dist/ot1/_images/running-protocol.png new file mode 100644 index 000000000000..7c20b5aafa85 Binary files /dev/null and b/api/docs/dist/ot1/_images/running-protocol.png differ diff --git a/api/docs/dist/ot1/_sources/api.txt b/api/docs/dist/ot1/_sources/api.txt new file mode 100644 index 000000000000..3329624f3086 --- /dev/null +++ b/api/docs/dist/ot1/_sources/api.txt @@ -0,0 +1,24 @@ +.. _api: + +API Reference +=============== + +.. module:: opentrons + +If you are reading this, you are probably looking for an in-depth explanation of API classes and methods to fully master your protocol development skills. + +Robot +----- + +All protocols are set up, simulated and executed using a Robot class. + +.. autoclass:: Robot + :members: connect, home, reset, commands, move_to, containers, actions, disconnect, head_speed, pause, resume, stop, diagnostics, get_warnings, add_instrument, get_mosfet, get_motor + +Pipette +----------------- + +.. module:: opentrons.instruments + +.. autoclass:: Pipette + :members: aspirate, dispense, mix, delay, drop_tip, blow_out, touch_tip, pick_up_tip, return_tip, calibrate, calibrate_position, move_to, home, set_speed diff --git a/api/docs/dist/ot1/_sources/calibration.txt b/api/docs/dist/ot1/_sources/calibration.txt new file mode 100644 index 000000000000..c3b0c4e17ca8 --- /dev/null +++ b/api/docs/dist/ot1/_sources/calibration.txt @@ -0,0 +1,127 @@ +.. _calibration: + +================ +How to Calibrate +================ + +Download App +-------------------- + +You can download the latest version of the app from `our website`_. + +.. _our website: https://opentrons.com/getting-started/download-app + + +Connect to Robot +-------------------- + +Make sure your robot is turned on, and your laptop is connected via USB cable. + +Go to the select port drop down, and refresh if no ports are shown. Once the port shows up, click it and the robot will jog up and down. + +.. screenshot button with port drop down + +.. image:: img/app/ports.png +.. image:: img/app/connected.png + +.. important:: + + Every time you connect to the robot, you need to home all axes before doing anything else. + +.. note:: + + Linux users will need to get permission to open the robot's serial port. This requires `sudo` privileges. + In a terminal window, run the following command + + .. code-block:: bash + + sudo usermod -a -G dialout USER_NAME_HERE + + Where USER_NAME_HERE is the name of account that will be running the App. + + Finally, logout and log back in as the user to activate the change. + +Upload Protocol +-------------------- + +Your ``.py`` protocol file can load into the App, through either clicking the "Upload" button, or drag-and-drop the ``.py`` file over that same button. + +.. note:: + + Make sure that when saving a protocol file, it ends with the ``.py`` file extension. This will ensure the App and other programs are able to properly read it. + + For example, ``my_protocol_file.py`` + +If successfully loaded, your Python protocol will be simulated in the background to detect any errors. While this is happening, you will see the word "Upload" replaced by the word "Processing". Once finished, the App will fill the calibration section of the App with your containers and pipettes. + + +Jogging +-------------------- + +XYZ +^^^^^^^^^^^^^^^^^^^^ + +Move in the X, Y and Z by selecting your desired increment, and then clicking an arrow button. + +.. image:: img/app/pipette-jog.png + +Slot Button +^^^^^^^^^^^^^^^^^^^^ + +The slot button moves exactly one slot over in either X or Y, depending on which arrow you choose. This is particularly useful when calibrating multiple containers of the same type (eg an entire deck of 96 well plates). There is no slot Z, the robot will just move 1 mm. + +AB Plungers +^^^^^^^^^^^^^^^^^^^^ + +Use the plunger jog to move the plunger up and down. If you have selected a container or the pipette for the B axis, then the B axis will move, and if you have selected a container or the pipette for the A axis, it will move. + +.. screenshot plunger jog + +The app automatically toggles between pipettes (unlike 1.2) + +Move to Slot +^^^^^^^^^^^^^^^^^^^^ + +Jump to any slot on the deck with the Move to Slot buttons. The deck will automatically react and change between a 3x5 layout and a 2x5 layout based on which robot you are connected to (Hood vs. Pro/Standard) + +.. image:: img/app/move-to-slot.png + + +Calibrate +-------------------- + +Once each container or pipette is calibrated, a check mark will appear next to it in the container list. + +.. image:: img/app/container-list.png + +Tipracks +^^^^^^^^^^^^^^^^^^^^ + +Jog the pipette down into the first tip in the tip rack. It should be firmly pushed into the tip, and the pick up tip button can be used to test its seating. + +Calling the pick up tip button from anywhere on the deck will direct the robot back to the tiprack to pick up a tip. Drop tip will send the tip to the trash. + +.. image:: img/app/container-calibration.png + +Containers +^^^^^^^^^^^^^^^^^^^^ + +With a tip on the pipette, calibrate to the bottom of the first well or tube in the container. Use the diagrams in the app to guide calibration. + +Pipettes +^^^^^^^^^^^^^^^^^^^^ + +Four calibrations positions need to be set for each pipette: Top, Bottom, Blow Out and Drop Tip. Make sure your pipette is manually set to its highest volume (or ~5 uL higher) for accurate calibration. + +.. image:: img/app/pipette-calibration.png + +Once these positions are all saved, you can test your calibrations. This is most easily done gravimetrically using a small scale. Use the aspirate and dispense buttons to pick up liquid and eject it onto the scale. If this volume isn't exactly what you expect, maybe 203 uL instead of 200, no big deal! You can go input the value into the max volume box. The robot will adjust its calculations accordingly and will then be able to dispense the correct volumes during experiments. + +The drop tip screw may need to be adjusted up or down if you cannot accurately calibrate Bottom. + +Run Protocol +-------------------- + +Once all your positions are saved, you can run your protocol. A progress will keep track of what percentage of your protocol has been done. Protocols can be paused, or they can be stopped entirely. We recommend homing after all protocols have been completed or stopped. + +.. image:: img/app/running-protocol.png diff --git a/api/docs/dist/ot1/_sources/containers.txt b/api/docs/dist/ot1/_sources/containers.txt new file mode 100644 index 000000000000..3f7e52d3d5be --- /dev/null +++ b/api/docs/dist/ot1/_sources/containers.txt @@ -0,0 +1,722 @@ +.. _containers: + +###################### +Containers +###################### + +We spend a fair amount of time organizing and counting wells when writing Python protocols. This section describes the different ways we can access wells and groups of wells. + +************************************ + +****************** +Labware Library +****************** + +The Opentrons API comes with many common labware containers built in. These containers can be loaded into you Python protocol using the ``containers.load()`` method, and the specific name of the labware you need. + +`Check out this webpage`__ to see a visualization of all the API's current built-in containers. + +__ https://andysigler.github.io/ot-api-containerviz/ + +Below are a list of some of the most commonly used containers in the API, as well as images for how they look. + +If you are interested in using your own container that is not included in the API, please take a look at how to create custom containers using ``containers.create()``, or contact Opentrons Support. + +.. note:: + + All names are case-sensitive, copying and pasting from this list into the protocol editor will ensure no errors are made. + +********************** + +Point +===== + +Use ``point`` when there is only one position per container, such as the trash or a scale. + +.. code-block:: python + + container.load('point', slot) + +You can access the point position as ``container.wells('A1')`` or ``container.wells(0)``. + +********************** + +Tipracks +========== + +tiprack-10ul +------------- + +Tip rack for a 10 uL pipette (single or 8-channel) + +.. code-block:: python + + container.load('tiprack-10ul', slot) + +**Accessing Tips:** *single channel* ``['A1']-['H12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/Tiprack-10ul.png + +tiprack-10ul-H +-------------- + +Tip rack for a single channel 10 uL pipette when the pipette is in the center position. Set initial position to H1, and the pipette will use all the tips on the right hand side (E-H, 1-12) + +.. code-block:: python + + container.load('tiprack-10ul-H', slot) + +**Accessing Tips:** *single channel* ``['E-H, 1-12']`` + +.. image:: img/labware_lib/Tiprack-10ul-H.png + +tiprack-200ul +------------- + +Tip rack for a 200 or 300 uL pipette (single or 8-channel) + +.. code-block:: python + + container.load('tiprack-200ul', slot) + +**Accessing Tips:** *single channel* ``['A1']-['H12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/Tiprack-200ul.png + +tiprack-1000ul +-------------- + +Tip rack for a 1000 uL pipette (single or 8-channel) + +.. code-block:: python + + container.load('tiprack-1000ul', slot) + +**Accessing Tips:** *single channel* ``['A1']-['H12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/Tiprack-1000.png + +tiprack-1000ul-chem +------------------- + +Tip rack for 1000ul chem (10x10) + +.. code-block:: python + + container.load('tiprack-1000ul-chem', slot) + +**Accessing Tips:** *single channel* ``[0]-[99]`` + +.. image:: img/labware_lib/Tiprack-1000ul-chem.png + +********************** + +Troughs +======== + +trough-12row +------------- + +12 row reservoir + +.. code-block:: python + + container.load('trough-12row', slot) + +**Accessing Rows:** *single channel* ``['A1']-['A12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/Trough-12row.png + +********************** + +Tube Racks +========== + +tube-rack-.75ml +------------- + +4x6 rack that holds .75 mL microcentrifuge tubes +(A1, A1-D6) + +.. code-block:: python + + container.load('tube-rack-.75ml', slot) + +**Accessing Tubes:** *single channel* ``['A1']-['D6']`` + +.. image:: img/labware_lib/Tuberack-075ml.png + +tube-rack-2ml +------------- + +4x6 rack that holds 1.5 mL microcentrifuge tubes and 2 mL microcentrifuge tubes + +.. code-block:: python + + container.load('tube-rack-2ml', slot) + +**Accessing Tubes:** *single channel* ``['A1']-['D6']`` + +.. image:: img/labware_lib/Tuberack-2ml.png + +tube-rack-15_50ml +------------------ + +rack that holds 6 15 mL tubes and 4 50 mL tubes + +.. code-block:: python + + container.load('tube-rack-15_50ml', slot) + +**Accessing Tubes:** *single channel* ``['A1']-['A3'], ['B1']-['B3'], ['C1']-['C2'], ['D1']-['D2']`` + +.. image:: img/labware_lib/Tuberack-15-50ml.png + + +Plates +======= + +96-deep-well +------------- + +See dimensions in diagram below. + +.. code-block:: python + + container.load('96-deep-well', slot) + +**Accessing Wells:** *single channel* ``['A1']-['H12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/96-Deep-Well.png + +96-PCR-tall +------------- + +See dimensions in diagram below. + +.. code-block:: python + + container.load('96-PCR-tall', slot) + +**Accessing Wells:** *single channel* ``['A1']-['H12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/96-PCR-Tall.png + +96-PCR-flat +------------- + +See dimensions in diagram below. + +.. code-block:: python + + container.load('96-PCR-flat', slot) + +**Accessing Wells:** *single channel* ``['A1']-['H12']``, *8-channel* ``['A1']-['A12']`` + +.. image:: img/labware_lib/96-PCR-Flatt.png + +PCR-strip-tall +---------------- + +See dimensions in diagram below. + +.. code-block:: python + + container.load('PCR-strip-tall', slot) + +**Accessing Wells:** *single channel* ``['A1']-['A8']``, *8-channel* ``['A1']`` + +.. image:: img/labware_lib/96-PCR-Strip.png + +384-plate +---------- + +See dimensions in diagram below. + +.. code-block:: python + + container.load('384-plate', slot) + +**Accessing Wells:** *single channel* ``['A1']-['P24']``, *multi-channel* ``['A1']-['A24]`` + +.. image:: img/labware_lib/384-plate.png + + +********************** + +.. testsetup:: containers + + from opentrons import containers, robot + robot.reset() + +************** +Containers +************** + +The containers module allows you to load common labware into your protocol. `Go here`__ to see a visualization of all built-in containers. + +__ https://andysigler.github.io/ot-api-containerviz/ + +.. testcode:: containers + + ''' + Examples in this section require the following + ''' + from opentrons import containers + +List +==== + +Once the container module is loaded, you can see a list of all containers currently inside the API by calling ``containers.list()`` + +.. testcode:: containers + + containers.list() + +Load +==== + +Labware is loaded with two arguments: 1) the container type, and 2) the deck slot it will be placed in on the robot. + +.. testcode:: containers + + p = containers.load('96-flat', 'B1') + +A third optional argument can be used to give a container a unique name. + +.. testcode:: containers + + p = containers.load('96-flat', 'B1', 'any-name-you-want') + +Unique names are useful in a few scenarios. First, they allow the container to have independant calibration data from other containers in the same slot. In the example above, the container named 'any-name-you-want' will assume different calibration data from the unnamed plate, even though they are the same type and in the same slot. + +.. note:: + + Calibration data refers to the saved positions for each container on deck, and is a part of the `Opentrons App calibration procedure`__. + +__ https://opentrons.com/getting-started/calibrate-deck + +Names can also be used to place multiple containers in the same slot all at once. For example, the flasks below are all placed in slot D1. So in order for the Opentrons API to tell them apart, we have given them each a unique name. + +.. testcode:: containers + + fa = containers.load('T25-flask', 'D1', 'flask_a') + fb = containers.load('T25-flask', 'D1', 'flask_b') + fc = containers.load('T25-flask', 'D1', 'flask_c') + +Create +====== + +In addition to the default containers that come with the Opentrons API, you can create your own custom containers. + +Through the API's call containers.create(), you can create simple grid containers, which consist of circular wells arranged in columns and rows. + +.. testcode:: containers + + containers.create( + '3x6_plate', # name of you container + grid=(3, 6), # specify amount of (columns, rows) + spacing=(12, 12), # distances (mm) between each (column, row) + diameter=5, # diameter (mm) of each well on the plate + depth=10) # depth (mm) of each well on the plate + +When you create your custom container, then it will be saved for later use under the name you've given it. This means you can use containers.load() to use the custom container you've created in this and any future protocol. + +.. testcode:: containers + + custom_plate = containers.load('3x6_plate', 'D1') + + for well in custom_plate.wells(): + print(well) + +will print out... + +.. testoutput:: containers + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + + + + + + + + + + + + + + + +.. testsetup:: pipettes + + from opentrons import instruments, robot + robot.reset() + +********************** + +.. testsetup:: individualwells + + from opentrons import containers, robot + + robot.reset() + plate = containers.load('96-flat', 'A1') + +****************** +Accessing Wells +****************** + +********************** + +Individual Wells +================ + +When writing a protocol using the API, you will be spending most of your time selecting which wells to transfer liquids to and from. + +The OT-One deck and containers are all set up with the same coordinate system - numbered rows and lettered columns. + +.. image:: img/well_iteration/Well_Iteration.png + +.. testcode:: individualwells + + ''' + Examples in this section expect the following + ''' + from opentrons import containers + + plate = containers.load('96-flat', 'A1') + +Wells by Name +------------- + +Once a container is loaded into your protocol, you can easily access the many wells within it using ``wells()`` method. ``wells()`` takes the name of the well as an argument, and will return the well at that location. + +.. testcode:: individualwells + + plate.wells('A1') + plate.wells('H12') + +Wells by Index +-------------- + +Wells can be referenced by their "string" name, as demonstrated above. However, they can also be referenced with zero-indexing, with the first well in a container being at position 0. + +.. testcode:: individualwells + + plate.wells(0) # well A1 + plate.wells(95) # well H12 + plate.wells(-1) # well H12 (Python let's you do this) + +Columns and Rows +---------------- + +A container's wells are organized within a series of columns and rows, which are also labelled on standard labware. In the API, columns are given letter names (``'A'`` through ``'H'`` for example) and go left to right, while rows are given numbered names (``'1'`` through ``'8'`` for example) and go from front to back. +You can access a specific row or column by using the ``rows()`` and ``cols()`` methods on a container. These will return all wells within that row or column. + +.. testcode:: individualwells + + column = plate.cols('A') + row = plate.rows('1') + + print('Column "A" has', len(column), 'wells') + print('Row "1" has', len(row), 'wells') + +will print out... + +.. testoutput:: individualwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Column "A" has 12 wells + Row "1" has 8 wells + +The ``rows()`` or ``cols()`` methods can be used in combination with the ``wells()`` method to access wells within that row or column. In the example below, both lines refer to well ``'A1'``. + +.. testcode:: individualwells + + plate.cols('A').wells('1') + plate.rows('1').wells('A') + +********************** + +.. testsetup:: multiwells + + from opentrons import containers, robot + + robot.reset() + plate = containers.load('96-flat', 'A1') + + +Multiple Wells +============== + +If we had to reference each well one at a time, our protocols could get very very long. + +When describing a liquid transfer, we can point to groups of wells for the liquid's source and/or destination. Or, we can get a group of wells that we want to loop through. + +.. testcode:: multiwells + + ''' + Examples in this section expect the following + ''' + from opentrons import containers + + plate = containers.load('96-flat', 'B1') + +Wells +----- + +The ``wells()`` method can return a single well, or it can return a list of wells when multiple arguments are passed. + +Here is an example or accessing a list of wells, each specified by name: + +.. testcode:: multiwells + + w = plate.wells('A1', 'B2', 'C3', 'H12') + + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + > + +Multiple wells can be treated just like a normal Python list, and can be iterated through: + +.. testcode:: multiwells + + for w in plate.wells('A1', 'B2', 'C3', 'H12'): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + +Wells To +-------- + +Instead of having to list the name of every well, we can also create a range of wells with a start and end point. The first argument is the starting well, and the ``to=`` argument is the last well. + +.. testcode:: multiwells + + for w in plate.wells('A1', to='H1'): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + + + + + +Not only can we get every well between the start and end positions, but we can also set the ``step=`` size. The example below will access every 2nd well between ``'A1'`` and ``'H'``: + +.. testcode:: multiwells + + for w in plate.wells('A1', to='H1', step=2): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + +These lists of wells can also move in the reverse direction along your container. For example, setting the ``to=`` argument to a well that comes before the starting position is allowed: + +.. testcode:: multiwells + + for w in plate.wells('H1', to='A1', step=2): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + +Wells Length +------------ + +Another way you can create a list of wells is by specifying the length= of the well list you need, in addition to the starting point. The example below will return eight wells, starting at well ``'A1'``: + +.. testcode:: multiwells + + for w in plate.wells('A1', length=8): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + + + + + +And just like before, we can also set the ``step=`` argument. Except this time the example will be accessing every 3rd well, until a total of eight wells have been found: + +.. testcode:: multiwells + + for w in plate.wells('A1', length=8, step=3): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + + + + + +You can set the step= value to a negative number to move in the reverse direction along the container: + +.. testcode:: multiwells + + for w in plate.wells('H11', length=8, step=-1): + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + + + + + +Columns and Rows +---------------- + +Columns and Rows +The same arguments described above can be used with ``rows()`` and ``cols()`` to create lists of rows or columns. + +Here is an example of iterating through rows: + +.. testcode:: multiwells + + for r in plate.rows('2', length=3, step=-2): + print(r) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + > + > + > + +And here is an example of iterating through columns: + +.. testcode:: multiwells + + for c in plate.cols('B', to='F', step=2): + print(c) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + > + > + > + + +Slices +------ + +Containers can also be treating similarly to Python lists, and can therefore handle slices. + +.. testcode:: multiwells + + for w in plate[0:8:2]: + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + +The API's containers are also prepared to take string values for the slice's ``start`` and ``stop`` positions. + +.. testcode:: multiwells + + for w in plate['A1':'A2':2]: + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + +.. testcode:: multiwells + + for w in plate.cols['B']['1'::2]: + print(w) + +will print out... + +.. testoutput:: multiwells + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + + + + + + diff --git a/api/docs/dist/ot1/_sources/examples.txt b/api/docs/dist/ot1/_sources/examples.txt new file mode 100644 index 000000000000..48346fd0d10f --- /dev/null +++ b/api/docs/dist/ot1/_sources/examples.txt @@ -0,0 +1,222 @@ +.. _examples: + +######## +Examples +######## + +.. testsetup:: examples + + from opentrons import robot, containers, instruments + + plate = containers.load('96-flat', 'B1') + trough = containers.load('trough-12row', 'C1') + + tiprack_1 = containers.load('tiprack-200ul', 'A1') + tiprack_2 = containers.load('tiprack-200ul', 'A2') + + p200 = instruments.Pipette( + axis="b", + max_volume=200, + tip_racks=[tiprack_2]) + +All examples on this page assume the following containers and pipette: + +.. testcode:: examples + + from opentrons import robot, containers, instruments + + plate = containers.load('96-flat', 'B1') + trough = containers.load('trough-12row', 'C1') + + tiprack_1 = containers.load('tiprack-200ul', 'A1') + tiprack_2 = containers.load('tiprack-200ul', 'A2') + + p200 = instruments.Pipette( + axis="b", + max_volume=200, + tip_racks=[tiprack_2]) + +****************************** + +*************** +Basic Transfer +*************** + +Moving 100uL from one well to another: + +.. testcode:: examples + + p200.transfer(100, plate.wells('A1'), plate.wells('B1')) + +If you prefer to not use the ``.transfer()`` command, the following pipette commands will create the some results: + +.. testcode:: examples + + p200.pick_up_tip() + p200.aspirate(100, plate.wells('A1')) + p200.dispense(100, plate.wells('A1')) + p200.return_tip() + +****************************** + +***** +Loops +***** + +Loops in Python allows your protocol to perform many actions, or act upon many wells, all within just a few lines. The below example loops through the numbers ``0`` to ``11``, and uses that loop's current value to transfer from all wells in a trough to each row of a plate: + +.. testcode:: examples + + # distribute 20uL from trough:A1 -> plate:row:1 + # distribute 20uL from trough:A2 -> plate:row:2 + # etc... + + # ranges() starts at 0 and stops at 12, creating a range of 0-11 + for i in range(12): + p200.distribute(20, trough.wells(i), plate.rows(i)) + +****************************** + +******************* +Multiple Air Gaps +******************* + +The Opentrons liquid handler can do some things that a human cannot do with a pipette, like accurately alternate between aspirating and creating air gaps within the same tip. The below example will aspirate from five wells in the trough, while creating a air gap between each sample. + +.. testcode:: examples + + p200.pick_up_tip() + + for well in trough.wells(): + p200.aspirate(5, well).air_gap(10) + + p200.dispense(plate.wells('A1')) + + p200.return_tip() + +****************************** + +*************** +Dilution +*************** + +This example first spreads a dilutent to all wells of a plate. It then dilutes 8 samples from the trough across the 8 columns of the plate. + +.. testcode:: examples + + p200.distribute(50, trough.wells('A12'), plate.wells()) # dilutent + + # loop through each column + for i in range(8): + + # save the source well and destination column to variables + source = trough.wells(i) + column = plate.cols(i) + + # transfer 10uL of source to first well in column + p200.transfer(10, source, column.wells('1')) + + # dilute the sample down the column + p200.transfer( + 10, column.wells('1', to='11'), column.wells('2', to='12'), + mix_after=(3, 25)) + +****************************** + +*************** +Plate Mapping +*************** + +Deposit various volumes of liquids into the same plate of wells, and automatically refill the tip volume when it runs out. + +.. testcode:: examples + + # these uL values were created randomly for this example + water_volumes = [ + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96 + ] + + p200.distribute(water_volumes, trough.wells('A12'), plate) + +The final volumes can also be read from a CSV, and opened by your protocol. + +.. code-block:: python + + ''' + This example uses a CSV file saved on the same computer, formatted as follows, + where the columns in the file represent the 8 columns of the plate, + and the rows in the file represent the 12 rows of the plate, + and the values represent the uL that must end up at that location + + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, + + ''' + + # open file with absolute path (will be different depending on operating system) + # file paths on Windows look more like 'C:\\path\\to\\your\\csv_file.csv' + with open('/path/to/your/csv_file.csv') as my_file: + + # save all volumes from CSV file into a list + volumes = [] + + # loop through each line (the plate's columns) + for l in my_file.read().splitlines(): + # loop through each comma-separated value (the plate's rows) + for v in l.split(','): + volumes.append(float(v)) # save the volume + + # distribute those volumes to the plate + p200.distribute(volumes, trough.wells('A1'), plate.wells()) + + + +****************************** + +******************* +Precision Pipetting +******************* + +This example shows how to deposit liquid around the edge of a well. + +.. testcode:: examples + + p200.pick_up_tip() + + # rotate around the edge of the well, dropping 10ul at a time + theta = 0.0 + while p200.current_volume > 0: + # we can move around a circle with radius (r) and theta (degrees) + well_edge = plate.wells('B1').from_center(r=1.0, theta=theta, h=0.9) + + # combine a Well with a Vector in a tuple + destination = (plate.wells('B1'), well_edge) + p200.move_to(destination, strategy='direct') # move straight there + p200.dispense(10) + + theta += 0.314 + + p200.drop_tip() + +****************************** diff --git a/api/docs/dist/ot1/_sources/firmware.txt b/api/docs/dist/ot1/_sources/firmware.txt new file mode 100644 index 000000000000..c614009d0580 --- /dev/null +++ b/api/docs/dist/ot1/_sources/firmware.txt @@ -0,0 +1,54 @@ +.. _firmware: + +================ +Firmware Updates +================ + +The motorcontroller inside all Opentrons liquid handlers (called Smoothieboard or just Smoothie) will need it's firmware updated if you are planning to use the Opentrons API and accompanying 2.0 app. The process is simple, and can be done from your computer in under a minute. + +To summarize, there are two files on your Smoothie that must be replaced; ``FIRMWARE.CUR`` and ``config``. + +Download Files +---------------------- + +Download the zipped files from here: + +https://github.com/OpenTrons/smoothie-config/archive/2.0.0.zip + +After downloading, unpack the zip file to view its contents. The latest firmware files are found in folder "v2.0.0". + +Open the Smoothie's MicroSD Card +--------------------------------- + +Power OFF and unplug your Opentrons liquid handler's USB cable. Remove the microSD card from Smoothieboard (just above the USB connector on the robot), and connect it to your personal computer or laptop. It will show up as a storage device on your computer. + +.. image:: img/update-firmware/firmware_files.png + +Open the microSD storage device to see it's ``FIRMWARE.CUR`` and ``config`` files. There might be other files there, but the two you need to worry about are ``FIRMWARE.CUR`` and ``config``, because these are what we will be replacing. + +Select Your Model's Config +---------------------------------- + +Opentrons `come in three models`__, the Standard, Pro, and Hood. Each model requires a unique ``config`` and ``firmware.bin`` file to go along with it. Find the files that matches your robot (the folders are named after each model). + +__ https://opentrons.com/robots + +** Note: We have release a "Plus" version of our robots, which have faster motors. If you received a robot after April 2017, and if your robot's Z motor is all black (no silver on the outside) than you have a "Plus" model. + +.. image:: img/update-firmware/SelectConfigFile.png + +Copy Over Files +--------------------------------- + +Drag both the ``config`` file and ``firmware.bin`` from the correct folder onto the microSD card. You will be overwriting the old ``config`` file, so your computer may ask if you would like to proceed with replacing it. + +.. image:: img/update-firmware/replaceConfig.png + +The contents of the microSD card should now look like this: + +.. image:: img/update-firmware/dragFirmwareBin.png + +Restart +--------------- + +Unmount the Smoothie's microSD card from your computer, and connect it back to your powered OFF robot. When the robot powers on, it will read the ``firmware.bin`` file, then save it as ``FIRMWARE.CUR``. It will then read the new ``config`` file, and your liquid handler now has updated firmware. diff --git a/api/docs/dist/ot1/_sources/index.txt b/api/docs/dist/ot1/_sources/index.txt new file mode 100644 index 000000000000..ca2374983991 --- /dev/null +++ b/api/docs/dist/ot1/_sources/index.txt @@ -0,0 +1,148 @@ +.. Opentrons API documentation master file, created by + sphinx-quickstart on Thu Oct 27 12:10:26 2016. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +=============== +Opentrons API +=============== + +The Opentrons API is a simple framework designed to make writing automated biology lab protocols easy. + +We’ve designed it in a way we hope is accessible to anyone with basic computer and wetlab skills. As a bench scientist, you should be able to code your automated protocols in a way that reads like a lab notebook. + +`View source code on GitHub`__ + +__ https://github.com/opentrons/opentrons-api + +********************** + +.. testsetup:: helloworld + + from opentrons import containers, instruments, robot + + robot.reset() + + tiprack = containers.load('tiprack-200ul', 'A1') + plate = containers.load('96-flat', 'B1') + + pipette = instruments.Pipette(axis='b', max_volume=200) + +How it Looks +--------------- + +The design goal of the Opentrons API is to make code readable and easy to understand. For example, below is a short set of instruction to transfer from well ``'A1'`` to well ``'B1'`` that even a computer could understand: + +.. code-block:: none + + Use the Opentrons API's containers and instruments + + Add a 96 well plate, and place it in slot 'B1' + Add a 200uL tip rack, and place it in slot 'A1' + + Add a 200uL pipette to axis 'b', and tell it to use that tip rack + + Transfer 100uL from the plate's 'A1' well to its 'A2' well + +If we were to rewrite this with the Opentrons API, it would look like the following: + +.. testcode:: helloworld + + # imports + from opentrons import containers, instruments + + # containers + plate = containers.load('96-flat', 'B1') + tiprack = containers.load('tiprack-200ul', 'A1') + + # pipettes + pipette = instruments.Pipette(axis='b', max_volume=200, tip_racks=[tiprack]) + + # commands + pipette.transfer(100, plate.wells('A1'), plate.wells('A2')) + +********************** + +How it's Organized +------------------ + +When writing protocols using the Opentrons API, there are generally three sections: + +1) Imports +2) Containers +3) Pipettes +4) Commands + +Imports +^^^^^^^ + +When writing in Python, you must always include the Opentrons API within your file. We most commonly use the ``containers`` and ``instruments`` sections of the API. + +From the example above, the "imports" section looked like: + +.. code-block:: python + + from opentrons import containers, instruments + + +Containers +^^^^^^^^^^ + +While the imports section is usually the same across protocols, the containers section is different depending on the tip racks, well plates, troughs, or tubes you're using on the robot. + +Each container is given a type (ex: ``'96-flat'``), and the slot on the robot it will be placed (ex: ``'B1'``). + +From the example above, the "containers" section looked like: + +.. code-block:: python + + plate = containers.load('96-flat', 'B1') + tiprack = containers.load('tiprack-200ul', 'A1') + +Pipettes +^^^^^^^^ + +Next, pipettes are created and attached to a specific axis on the OT-One (``'a'`` or ``'b'``). Axis ``'a'`` is on the center of the head, while axis ``'b'`` is on the left. + +There are other parameters for pipettes, but the most important are the ``max_volume`` to set it's size, and the tip rack(s) it will use during the protocol. + +From the example above, the "pipettes" section looked like: + +.. code-block:: python + + pipette = instruments.Pipette(axis='b', max_volume=200, tip_racks=[tiprack]) + +Commands +^^^^^^^^ + +And finally, the most fun section, the actual protocol commands! The most common commands are ``transfer()``, ``aspirate()``, ``dispense()``, ``pick_up_tip()``, ``drop_tip()``, and much more. + +This section can tend to get long, relative to the complexity of your protocol. However, with a better understanding of Python you can learn to compress and simplify even the most complex-seeming protocols. + +From the example above, the "commands" section looked like: + +.. code-block:: python + + pipette.transfer(100, plate.wells('A1'), plate.wells('B1')) + + +Table of Contents +----------------- + +.. toctree:: + :maxdepth: 3 + + writing + containers + pipettes + transfer + robot + modules + examples + api + calibration + firmware + +.. |br| raw:: html + +
diff --git a/api/docs/dist/ot1/_sources/modules.txt b/api/docs/dist/ot1/_sources/modules.txt new file mode 100644 index 000000000000..d7141c156291 --- /dev/null +++ b/api/docs/dist/ot1/_sources/modules.txt @@ -0,0 +1,94 @@ +.. _modules: + +################ +Hardware Modules +################ + +********************** + +********** +Heat Deck +********** + +The heat deck runs off the opensource platform Arduino, which is how you can control it's temperature. Our heat decks come automatically set to reach a temperature of 55 deg Celsius, but you can edit this value by editing the Arduino file. + +Find our Heat Deck source code `on GitHub here`__, and download. + +__ https://github.com/OpenTrons/opentrons-modules + +Also download and install the `Arduino IDE`__. + +__ https://www.arduino.cc/en/main/software + +Open the file, and you will see detailed instruction for how to update the temperature. The overiew is that you simply set the number for what temperature you want, then upload that code to the Heat Deck. + +********************** + +********** +Magbead +********** + +Setting up Hardware +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use your included DIY Mag Bead kit to configure the motor control board (see kit instructions). + + +Initializing Module in API +============================ + +Just like a pipette, you need to set up and name your module. + +**instruments.Magbead** (*mofset, name*) + + * **mosfet -** integer 0-5 (defaults to 0) + * **name -** the name you want to call your module + +.. testsetup:: main + + from opentrons import instruments + from opentrons.instruments import Pipette + p200 = instruments.Pipette(axis="b", max_volume=200) + +.. testcode:: main + + mag_deck = instruments.Magbead(name='mag_deck') + +Activate and Deactivate Magnets +================================ + +To activate the magnets and raise the module's platform, run ``.engage()``: + +**module.engage** () + +.. testcode:: main + + mag_deck.engage() + +To deactivate the magnets and lower the module's platform, run ``.disengage()``: + +**module.disengage** () + +.. testcode:: main + + mag_deck.disengage() + +Chain Other Commands +============================ + +Just like ``aspirate()`` and ``dispense()`` can be chained, you can chain ``engage()`` and ``disengage()``, as well as the ``delay()`` if you don't want to do anything between engaging and disengaging the magnets. + +.. testcode:: main + + mag_deck.engage() + mag_deck.delay(60) + mag_deck.disengage() + + mag_deck.engage().delay(60).disengage() + +You can call ``delay()`` with a ``Pipette`` or a ``Magbead`` module. + +.. testcode:: main + + p200.delay(10) + mag_deck.delay(10) diff --git a/api/docs/dist/ot1/_sources/pipettes.txt b/api/docs/dist/ot1/_sources/pipettes.txt new file mode 100644 index 000000000000..35f23561aba5 --- /dev/null +++ b/api/docs/dist/ot1/_sources/pipettes.txt @@ -0,0 +1,483 @@ +.. _pipettes: + +######################## +Liquid Handling +######################## + +The ``instruments`` module gives your protocol access to the ``Pipette``, which is what you will be primarily using to create protocol commands. + +************************ + +****************** +Creating a Pipette +****************** + +.. testcode:: pipettes + + ''' + Examples in this section require the following + ''' + from opentrons import instruments + +Axis and Max Volume +=================== + +To create a ``Pipette``, you must give it an axis and a max_volume. The axis can be either ``'a'`` or ``'b'``, and the volume is whatever your hand pipette is calibrated for. In this example, we are using a 200uL pipette. + +.. testcode:: pipettes + + pipette = instruments.Pipette( + axis='b', + name='my-p200', + max_volume=200) + +Minimum Volume +============== + +The minimum allowed volume can be set for each pipette. If your protocol attempts to aspirate or dispense a volume below this volume, the API will give you a warning. + +.. testcode:: pipettes + + pipette = instruments.Pipette( + axis='b', + name='my-p200', + max_volume=200, + min_volume=20) + +Channels +======== + +Pipettes can also be assigned a number of channels, either ``channel=1`` or ``channel=8``. If you do not specify, it will default to ``channel=1`` channel. + +.. testcode:: pipettes + + pipette = instruments.Pipette( + axis='b', + name='my-p200-multichannel', + max_volume=200, + min_volume=20, + channels=8) + +Plunger Speeds +============== + +The speeds at which the pipette will aspirate and dispense can be set through ``aspirate_speed`` and ``dispense_speed``. The values are in millimeters/minute, and default to ``aspirate_speed=300`` and ``dispense_speed=500``. + +.. testcode:: pipettes + + pipeipette = instruments.Pipette( + axis='b', + name='my-p200-multichannel', + max_volume=200, + min_volume=20, + channels=8, + aspirate_speed=200, + dispense_speed=600) + +.. testsetup:: robot + + from opentrons import robot, containers, instruments + + robot.reset() + + plate = containers.load('96-flat', 'B1', 'my-plate') + tiprack = containers.load('tiprack-200ul', 'A1', 'my-rack') + + pipette = instruments.Pipette(axis='b', max_volume=200, name='my-pipette') + + +********************** + +************** +Tip Handling +************** + +When we handle liquids with a pipette, we are constantly exchanging old, used tips for new ones to prevent cross-contamination between our wells. To help with this constant need, we describe in this section a few methods for getting new tips, and removing tips from a pipette. + +********************** + +.. testsetup:: tips + + from opentrons import containers, instruments, robot + + robot.reset() + + trash = containers.load('point', 'D2') + tiprack = containers.load('tiprack-200ul', 'B1') + + pipette = instruments.Pipette(axis='a') + +This section demonstrates the options available for controlling tips + +.. testcode:: tips + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments + + trash = containers.load('point', 'D2') + tiprack = containers.load('tiprack-200ul', 'B1') + + pipette = instruments.Pipette(axis='a') + +Pick Up Tip +=========== + +Before any liquid handling can be done, your pipette must have a tip on it. The command ``pick_up_tip()`` will move the pipette over to the specified tip, the press down into it to create a vacuum seal. The below example picks up the tip at location ``'A1'``. + +.. testcode:: tips + + pipette.pick_up_tip(tiprack.wells('A1')) + +Drop Tip +=========== + +Once finished with a tip, the pipette will autonomously remove the tip when we call ``drop_tip()``. We can specify where to drop the tip by passing in a location. The below example drops the tip back at its originating location on the tip rack. + +.. testcode:: tips + + pipette.drop_tip(tiprack.wells('A1')) + +Instead of returning a tip to the tip rack, we can also drop it in a trash container. + +.. testcode:: tips + + pipette.pick_up_tip(tiprack.wells('A2')) + pipette.drop_tip(trash) + +Return Tip +=========== + +When we need to return the tip to its originating location on the tip rack, we can simply call ``return_tip()``. The example below will automatically return the tip to ``'A3'`` on the tip rack. + +.. testcode:: tips + + pipette.pick_up_tip(tiprack.wells('A3')) + pipette.return_tip() + +********************** + +.. testsetup:: tipsiterating + + from opentrons import containers, instruments, robot + + robot.reset() + + trash = containers.load('point', 'D2') + tip_rack_1 = containers.load('tiprack-200ul', 'B1') + tip_rack_2 = containers.load('tiprack-200ul', 'B2') + + pipette = instruments.Pipette( + axis='b', + tip_racks=[tip_rack_1, tip_rack_2], + trash_container=trash + ) + +Tips Iterating +============== + +Automatically iterate through tips and drop tip in trash by attaching containers to a pipette + +.. testcode:: tipsiterating + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments + + trash = containers.load('point', 'D2') + tip_rack_1 = containers.load('tiprack-200ul', 'B1') + tip_rack_2 = containers.load('tiprack-200ul', 'B2') + +Attach Tip Rack to Pipette +-------------------------- + +Tip racks and trash containers can be "attached" to a pipette when the pipette is created. This give the pipette the ability to automatically iterate through tips, and to automatically send the tip to the trash container. + +Trash containers can be attached with the option ``trash_container=TRASH_CONTAINER``. + +Multiple tip racks are can be attached with the option ``tip_racks=[RACK_1, RACK_2, etc... ]``. + +.. testcode:: tipsiterating + + pipette = instruments.Pipette( + axis='b', + tip_racks=[tip_rack_1, tip_rack_2], + trash_container=trash + ) + +.. note:: + + The ``tip_racks=`` option expects us to give it a Python list, containing each tip rack we want to attach. If we are only attaching one tip rack, then the list will have a length of one, like the following: + + ``tip_racks=[tiprack]`` + + +Iterating Through Tips +---------------------- + +Now that we have two tip racks attached to the pipette, we can automatically step through each tip whenever we call ``pick_up_tip()``. We then have the option to either ``return_tip()`` to the tip rack, or we can ``drop_tip()`` to remove the tip in the attached trash container. + +.. testcode:: tipsiterating + + pipette.pick_up_tip() # picks up tip_rack_1:A1 + pipette.return_tip() + pipette.pick_up_tip() # picks up tip_rack_1:A2 + pipette.drop_tip() # automatically drops in trash + + # use loop to pick up tips tip_rack_1:A3 through tip_rack_2:H12 + for i in range(94 + 96): + pipette.pick_up_tip() + pipette.return_tip() + +If we try to ``pick_up_tip()`` again when all the tips have been used, the Opentrons API will show you an error. + +.. note:: + + If you run the cell above, and then uncomment and run the cell below, you will get an error because the pipette is out of tips. + +.. testcode:: tipsiterating + + # this will raise an exception if run after the previous code block + # pipette.pick_up_tip() + + +Select Starting Tip +------------------- + +Calls to ``pick_up_tip()`` will by default start at the attached tip rack's ``'A1'`` location. If you however want to start automatic tip iterating at a different tip, you can use ``start_at_tip()``. + +.. testcode:: tipsiterating + + pipette.reset() + + pipette.start_at_tip(tip_rack_1['C3']) + pipette.pick_up_tip() # pick up C3 from "tip_rack_1" + pipette.return_tip() + +Get Current Tip +--------------- + +Get the source location of the pipette's current tip by calling ``current_tip()``. If the tip was from the ``'A1'`` position on our tip rack, ``current_tip()`` will return that position. + +.. testcode:: tipsiterating + + print(pipette.current_tip()) # is holding no tip + + pipette.pick_up_tip() + print(pipette.current_tip()) # is holding the next available tip + + pipette.return_tip() + print(pipette.current_tip()) # is holding no tip + +will print out... + +.. testoutput:: tipsiterating + + None + + None + +********************** + +**************** +Liquid Control +**************** + +This is the fun section, where we get to move things around and pipette! This section describes the ``Pipette`` object's many liquid-handling commands, as well as how to move the ``robot``. + +********************** + +.. testsetup:: liquid + + from opentrons import containers, instruments, robot + + robot.reset() + + plate = containers.load('96-flat', 'B1') + pipette = instruments.Pipette(axis='b', max_volume=200) + +.. testcode:: liquid + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments + + plate = containers.load('96-flat', 'B1') + pipette = instruments.Pipette(axis='b', max_volume=200) + + +Aspirate +======== + +To aspirate is to pull liquid up into the pipette's tip. When calling aspirate on a pipette, we can specify how many micoliters, and at which location, to draw liquid from: + +.. testcode:: liquid + + pipette.aspirate(50, plate.wells('A1')) # aspirate 50uL from plate:A1 + +Now our pipette's tip is holding 50uL. + +We can also simply specify how many microliters to aspirate, and not mention a location. The pipette in this circumstance will aspirate from it's current location (which we previously set as ``plate.wells('A1'))``. + +.. testcode:: liquid + + pipette.aspirate(50) # aspirate 50uL from current position + +Now our pipette's tip is holding 100uL. + +We can also specify only the location to aspirate from. If we do not tell the pipette how many micoliters to aspirate, it will by default fill up the remaining volume in it's tip. In this example, since we already have 100uL in the tip, the pipette will aspirate another 100uL + +.. testcode:: liquid + + pipette.aspirate(plate.wells('A2')) # aspirate until pipette fills from plate:A2 + + +Dispense +======== + +To dispense is to push out liquid from the pipette's tip. It's usage in the Opentrons API is nearly identical to ``aspirate()``, in that you can specify microliters and location, only microliters, or only a location: + +.. testcode:: liquid + + pipette.dispense(50, plate.wells('B1')) # dispense 50uL to plate:B1 + pipette.dispense(50) # dispense 50uL to current position + pipette.dispense(plate.wells('B2')) # dispense until pipette empties to plate:B2 + +That final dispense without specifying a micoliter amount will dispense all remaining liquids in the tip to ``plate.wells('B2')``, and now our pipette is empty. + +Blow Out +======== + +To blow out is to push an extra amount of air through the pipette's tip, so as to make sure that any remaining droplets are expelled. + +When calling ``blow_out()`` on a pipette, we have the option to specify a location to blow out the remaining liquid. If no location is specified, the pipette will blow out from it's current position. + +.. testcode:: liquid + + pipette.blow_out() # blow out over current location + pipette.blow_out(plate.wells('B3')) # blow out over current plate:B3 + + +Touch Tip +========= + +To touch tip is to move the pipette's currently attached tip to the edges of a well, for the purpose of knocking off any droplets that might be hanging from the tip. + +When calling ``touch_tip()`` on a pipette, we have the option to specify a location where the tip will touch the inner walls. If no location is specified, the pipette will touch tip inside it's current location. + +.. testcode:: liquid + + pipette.touch_tip() # touch tip within current location + pipette.touch_tip(-2) # touch tip 2mm below the top of the current location + pipette.touch_tip(plate.wells('B1')) # touch tip within plate:B1 + + +Mix +=== + +Mixing is simply performing a series of ``aspirate()`` and ``dispense()`` commands in a row on a single location. However, instead of having to write those commands out every time, the Opentrons API allows you to simply say ``mix()``. + +The mix command takes three arguments: ``mix(repetitions, volume, location)`` + +.. testcode:: liquid + + pipette.mix(4, 100, plate.wells('A2')) # mix 4 times, 100uL, in plate:A2 + pipette.mix(3, 50) # mix 3 times, 50uL, in current location + pipette.mix(2) # mix 2 times, pipette's max volume, in current location + + +Air Gap +======= + +Some liquids need an extra amount of air in the pipette's tip to prevent it from sliding out. A call to ``air_gap()`` with a microliter amount will aspirate that much air into the tip. + +.. testcode:: liquid + + pipette.aspirate(100, plate.wells('B4')) + pipette.air_gap(20) + +********************** + +.. testsetup:: moving + + from opentrons import robot, containers, instruments + + robot.reset() + + tiprack = containers.load('tiprack-200ul', 'A1') + plate = containers.load('96-flat', 'B1') + + pipette = instruments.Pipette(axis='b') + +****** +Moving +****** + +Demonstrates the different ways to control the movement of the Opentrons liquid handler during a protocol run. + +.. testcode:: moving + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments, robot + + tiprack = containers.load('tiprack-200ul', 'A1') + plate = containers.load('96-flat', 'B1') + + pipette = instruments.Pipette(axis='b') + +Move To +======= + +Pipette's are able to ``move_to()`` any location on the deck. + +For example, we can move to the first tip in our tip rack: + +.. testcode:: moving + + pipette.move_to(tiprack.wells('A1')) + +You can also specify at what height you would like the robot to move to inside of a location using ``top()`` and ``bottom()`` methods on that location. + +.. testcode:: moving + + pipette.move_to(plate.wells('A1').bottom()) # move to the bottom of well A1 + pipette.move_to(plate.wells('A1').top()) # move to the top of well A1 + pipette.move_to(plate.wells('A1').bottom(2)) # move to 2mm above the bottom of well A1 + pipette.move_to(plate.wells('A1').top(-2)) # move to 2mm below the top of well A1 + +The above commands will cause the robot's head to first move upwards, then over to above the target location, then finally downwards until the target location is reached. If instead you would like the robot to mive in a straight line to the target location, you can set the movement strategy to ``'direct'``. + +.. testcode:: moving + + pipette.move_to(plate.wells('A1'), strategy='direct') + +.. note:: + + Moving with ``strategy='direct'`` will run the risk of colliding with things on your deck. Be very careful when using the option. + +Usually the ``strategy='direct'`` option is useful when moving inside of a well. Take a look at the below sequence of movements, which first move the head to a well, and use 'direct' movements inside that well, then finally move on to a different well. + +.. testcode:: moving + + pipette.move_to(plate.wells('A1')) + pipette.move_to(plate.wells('A1').bottom(1), strategy='direct') + pipette.move_to(plate.wells('A1').top(-2), strategy='direct') + pipette.move_to(plate.wells('A1')) + +Delay +===== + +To have your protocol pause for any given number of minutes or seconds, simply call ``delay()`` on your pipette. The value passed into ``delay()`` is the number of minutes or seconds the robot will wait until moving on to the next commands. + +.. testcode:: moving + + pipette.delay(seconds=2) # pause for 2 seconds + pipette.delay(minutes=5) # pause for 5 minutes + pipette.delay(minutes=5, seconds=2) # pause for 5 minutes and 2 seconds + + diff --git a/api/docs/dist/ot1/_sources/robot.txt b/api/docs/dist/ot1/_sources/robot.txt new file mode 100644 index 000000000000..53c9e4806100 --- /dev/null +++ b/api/docs/dist/ot1/_sources/robot.txt @@ -0,0 +1,193 @@ +.. _robot: + +.. testsetup:: robot + + from opentrons import containers, instruments, robot + from opentrons.instruments import pipette as _pipette + + robot.reset() + + plate = robot.add_container('96-flat', 'B1', 'my-plate') + + tiprack = robot.add_container('tiprack-200ul', 'A1', 'my-rack') + + pipette = _pipette.Pipette(robot, axis='b', max_volume=200, name='my-pipette') + +################### +Advanced Control +################### + +.. note:: + + The below features are designed for advanced users who wish to use the Opentrons API in their own Python environment (ie Jupyter). This page is not relevant for users only using the Opentrons App, because the features described below will not be accessible. + +The robot module can be thought of as the parent for all aspects of the Opentrons API. All containers, instruments, and protocol commands are added to and controlled by robot. + +.. testcode:: robot + + ''' + Examples in this section require the following + ''' + from opentrons import robot, containers, instruments + + plate = containers.load('96-flat', 'B1', 'my-plate') + tiprack = containers.load('tiprack-200ul', 'A1', 'my-rack') + + pipette = instruments.Pipette(axis='b', max_volume=200, name='my-pipette') + +Head Speed +========== + +The maximum speed of the robot's head can be set using ``robot.head_speed()``. The value we set the speed to is in millimeters-per-second (mm/sec). + +.. testcode:: robot + + robot.head_speed(5000) + +.. note:: + + Setting the head speed to above ``6000 mm/sec`` may cause your robot to "skip", which means the motors will lose their grip and make a loud vibrating noise. We recommend you try out different speed values on your robot, and see what works and what doesn't. + +Homing +====== + +You can `home` the robot by calling ``home()``. You can also specify axes. The robot will home immdediately when this call is made. + +.. testcode:: robot + + robot.home() # home the robot on all axis + robot.home('z') # home the Z axis only + +Commands +======== + +When commands are called on a pipette, they are recorded on the ``robot`` in the order they are called. You can see all past executed commands by calling ``robot.commands()``, which returns a `Python list`__. + +__ https://docs.python.org/3.5/tutorial/datastructures.html#more-on-lists + +.. testcode:: robot + + pipette.pick_up_tip(tiprack.wells('A1')) + pipette.drop_tip(tiprack.wells('A1')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: robot + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Drop_tip at + +Clear Commands +============== + +We can erase the robot command history by calling ``robot.clear_commands()``. Any previously created instruments and containers will still be inside robot, but the commands history is erased. + +.. testcode:: robot + + robot.clear_commands() + pipette.pick_up_tip(tiprack['A1']) + print('There is', len(robot.commands()), 'command') + + robot.clear_commands() + print('There are now', len(robot.commands()), 'commands') + +will print out... + +.. testoutput:: robot + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + There is 1 command + There are now 0 commands + +Comment +======= + +You can add a custom message to the list of command descriptions you see when running ``robot.commands()``. This command is ``robot.comment()``, and it allows you to print out any information you want at the point in your protocol + +.. testcode:: robot + + robot.clear_commands() + + pipette.pick_up_tip(tiprack['A1']) + robot.comment("Hello, just picked up tip A1") + + pipette.pick_up_tip(tiprack['A1']) + robot.comment("Goodbye, just dropped tip A1") + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: robot + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Hello, just picked up tip A1 + Picking up tip from + Goodbye, just dropped tip A1 + +Get Containers +============== + +When containers are loaded, they are automatically added to the ``robot``. You can see all currently held containers by calling ``robot.get_containers()``, which returns a `Python list`__. + +__ https://docs.python.org/3.5/tutorial/datastructures.html#more-on-lists + +.. testcode:: robot + + for name, container in robot.get_containers(): + print(name, container.get_type()) + +will print out... + +.. testoutput:: robot + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + my-plate 96-flat + my-rack tiprack-200ul + +Get Instruments +=============== + +When instruments are created, they are automatically added to the ``robot``. You can see all currently held instruments by calling ``robot.get_instruments()``, which returns a `Python list`__. + +__ https://docs.python.org/3.5/tutorial/datastructures.html#more-on-lists + +.. testcode:: robot + + for axis, pipette in robot.get_instruments(): + print(pipette.name, axis) + +will print out... + +.. testoutput:: robot + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + my-pipette B + +Reset +===== + +Calling ``robot.reset()`` will remove everything from the robot. Any previously added containers, pipettes, or commands will be erased. + +.. testcode:: robot + + robot.reset() + print(robot.get_containers()) + print(robot.get_instruments()) + print(robot.commands()) + +will print out... + +.. testoutput:: robot + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + [] + [] + [] + diff --git a/api/docs/dist/ot1/_sources/transfer.txt b/api/docs/dist/ot1/_sources/transfer.txt new file mode 100644 index 000000000000..27522ff4eb25 --- /dev/null +++ b/api/docs/dist/ot1/_sources/transfer.txt @@ -0,0 +1,1137 @@ +.. _transfer: + +.. testsetup:: transfer + + from opentrons import robot, Robot, containers, instruments + from opentrons.instruments import pipette as _pipette + + robot.reset() + robot.clear_commands() + + robot = Robot() + + plate = robot.add_container('96-flat', 'B1') + + tiprack = robot.add_container('tiprack-200ul', 'A1') + trash = robot.add_container('point', 'D2') + + pipette = _pipette.Pipette( + robot, + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +####################### +Transfer Shortcuts +####################### + +The Transfer command is a nice way to wrap up the most common liquid-handling actions we take. Instead of having to write ``loop`` and ``if`` statements, we can simply use the ``transfer()`` command, making Python protocol both easier to write and read! + +********************** + +Transfer +======== + +Most of time, a protocol is really just looping over some wells, aspirating, and then dispensing. Even though they are simple in nature, these loops take up a lot of space. The ``pipette.transfer()`` command takes care of those common loops. It will combine aspirates and dispenses automatically, making your protocol easier to read and edit. + +.. testcode:: transfer + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +Basic +----- + +The example below will transfer 100 uL from well ``'A1'`` to well ``'B1'``, automatically picking up a new tip and then dropping it when finished. + +.. testsetup:: transfer + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer + + pipette.transfer(100, plate.wells('A1'), plate.wells('B1')) + +Transfer commands will automatically create entire series of ``aspirate()``, ``dispense()``, and other ``Pipette`` commands. We can print out all commands to see what it did in the previous example: + +.. testcode:: transfer + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + +Large Volumes +------------- + +Volumes larger than the pipette's ``max_volume`` will automatically divide into smaller transfers. + +.. testsetup:: transfer_1 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer_1 + + pipette.transfer(700, plate.wells('A2'), plate.wells('B2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer_1 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 200.0 at + Dispensing 200.0 at + Aspirating 200.0 at + Dispensing 200.0 at + Aspirating 150.0 at + Dispensing 150.0 at + Aspirating 150.0 at + Dispensing 150.0 at + Drop_tip at + +Multiple Wells +-------------- + +Transfer commands are most useful when moving liquid between multiple wells. + +.. testsetup:: transfer_2 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer_2 + + pipette.transfer(100, plate.cols('A'), plate.cols('B')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer_2 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + +One to Many +------------- + +You can transfer from a single source to multiple destinations, and the other way around (many sources to one destination). + +.. testsetup:: transfer_3 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer_3 + + pipette.transfer(100, plate.wells('A1'), plate.rows('2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer_3 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + +Few to Many +------------- + +What happens if, for example, you tell your pipette to transfer from 4 source wells to 2 destination wells? The transfer command will attempt to divide the wells evenly, or raise an error if the number of wells aren't divisible. + +.. testsetup:: transfer_4 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer_4 + + pipette.transfer( + 100, + plate.wells('A1', 'A2', 'A3', 'A4'), + plate.wells('B1', 'B2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer_4 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + +List of Volumes +--------------- + +Instead of applying a single volume amount to all source/destination wells, you can instead pass a list of volumes. + +.. testsetup:: transfer_5 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer_5 + + pipette.transfer( + [20, 40, 60], + plate.wells('A1'), + plate.wells('B1', 'B2', 'B3')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer_5 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 20.0 at + Dispensing 20.0 at + Aspirating 40.0 at + Dispensing 40.0 at + Aspirating 60.0 at + Dispensing 60.0 at + Drop_tip at + +Volume Gradient +--------------- + +Create a linear gradient between a start and ending volume (uL). The start and ending volumes must be the first and second elements of a tuple. + +.. testsetup:: transfer_6 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: transfer_6 + + pipette.transfer( + (100, 30), + plate.wells('A1'), + plate.rows('2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: transfer_6 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 90.0 at + Dispensing 90.0 at + Aspirating 80.0 at + Dispensing 80.0 at + Aspirating 70.0 at + Dispensing 70.0 at + Aspirating 60.0 at + Dispensing 60.0 at + Aspirating 50.0 at + Dispensing 50.0 at + Aspirating 40.0 at + Dispensing 40.0 at + Aspirating 30.0 at + Dispensing 30.0 at + Drop_tip at + +********************** + +.. testsetup:: distributeconsolidate + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +Distribute and Consolidate +========================== + +Save time and tips with the ``distribute()`` and ``consolidate()`` commands. These are nearly identical to ``transfer()``, except that they will combine multiple transfer's into a single tip. + +.. testcode:: distributeconsolidate + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +Consolidate +----------- + +Volumes going to the same destination well are combined within the same tip, so that multiple aspirates can be combined to a single dispense. + +.. testsetup:: distributeconsolidate_1 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: distributeconsolidate_1 + + pipette.consolidate(30, plate.rows('2'), plate.wells('A1')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: distributeconsolidate_1 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Dispensing 180.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Dispensing 60.0 at + Drop_tip at + +If there are multiple destination wells, the pipette will never combine their volumes into the same tip. + +.. testsetup:: distributeconsolidate_2 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: distributeconsolidate_2 + + pipette.consolidate(30, plate.rows('2'), plate.wells('A1', 'A2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: distributeconsolidate_2 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Dispensing 120.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Aspirating 30.0 at + Dispensing 120.0 at + Drop_tip at + +Distribute +----------- + +Volumes from the same source well are combined within the same tip, so that one aspirate can provide for multiple dispenses. + +.. testsetup:: distributeconsolidate_3 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: distributeconsolidate_3 + + pipette.distribute(55, plate.wells('A1'), plate.rows('2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: distributeconsolidate_3 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 165.0 at + Dispensing 55.0 at + Dispensing 55.0 at + Dispensing 55.0 at + Aspirating 165.0 at + Dispensing 55.0 at + Dispensing 55.0 at + Dispensing 55.0 at + Aspirating 110.0 at + Dispensing 55.0 at + Dispensing 55.0 at + Drop_tip at + +If there are multiple source wells, the pipette will never combine their volumes into the same tip. + +.. testsetup:: distributeconsolidate_4 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: distributeconsolidate_4 + + pipette.distribute(30, plate.wells('A1', 'A2'), plate.rows('2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: distributeconsolidate_4 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 120.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Aspirating 120.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Drop_tip at + +Disposal Volume +--------------- + +When dispensing multiple times from the same tip, it is recommended to aspirate an extra amount of liquid to be disposed of after distributing. This added ``disposal_vol`` can be set as an optional argument. + +.. testsetup:: distributeconsolidate_5 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: distributeconsolidate_5 + + pipette.distribute( + 30, + plate.wells('A1', 'A2'), + plate.rows('2'), + disposal_vol=10) # include extra liquid to make dispenses more accurate + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: distributeconsolidate_5 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 130.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Blowing out at + Aspirating 130.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Blowing out at + Drop_tip at + +.. note:: + + If you do not specify a ``disposal_vol``, the pipette will by default use a ``disposal_vol`` equal to it's ``min_volume``. This tutorial has not given the pipette any ``min_volume``, so below is an example of allowing the pipette's ``min_volume`` to be used as a default for ``disposal_vol``. + +.. testsetup:: distributeconsolidate_6 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: distributeconsolidate_6 + + pipette.min_volume = 20 # `min_volume` is used as default to `disposal_vol` + + pipette.distribute( + 30, + plate.wells('A1', 'A2'), + plate.rows('2')) + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: distributeconsolidate_6 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 140.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Blowing out at + Aspirating 140.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Dispensing 30.0 at + Blowing out at + Drop_tip at + +********************** + +.. testsetup:: options + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +Transfer Options +================ + +There are other options for customizing your transfer command: + +.. testcode:: options + + ''' + Examples in this section expect the following + ''' + from opentrons import containers, instruments + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +Always Get a New Tip +------------------------ + +Transfer commands will by default use the same one tip for each well, then finally drop it in the trash once finished. + +The pipette can optionally get a new tip at the beginning of each aspirate, to help avoid cross contamination. + +.. testsetup:: options_1 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_1 + + pipette.transfer( + 100, + plate.wells('A1', 'A2', 'A3'), + plate.wells('B1', 'B2', 'B3'), + new_tip='always') # always pick up a new tip + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_1 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Drop_tip at + +Never Get a New Tip +------------------------ + +For scenarios where you instead are calling ``pick_up_tip()`` and ``drop_tip()`` elsewhere in your protocol, the transfer command can ignore picking up or dropping tips. + +.. testsetup:: options_2 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_2 + + pipette.transfer( + 100, + plate.wells('A1', 'A2', 'A3'), + plate.wells('B1', 'B2', 'B3'), + new_tip='never') # never pick up or drop a tip + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_2 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + Aspirating 100.0 at + Dispensing 100.0 at + +Trash or Return Tip +------------------------ + +By default, the transfer command will drop the pipette's tips in the trash container. However, if you wish to instead return the tip to it's tip rack, you can set ``trash=False``. + +.. testsetup:: options_3 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_3 + + pipette.transfer( + 100, + plate.wells('A1'), + plate.wells('B1'), + trash=False) # do not trash tip + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_3 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Returning tip + Drop_tip at + +Touch Tip +--------- + +A touch-tip can be performed after every aspirate and dispense by setting ``touch_tip=True``. + +.. testsetup:: options_4 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_4 + + pipette.transfer( + 100, + plate.wells('A1'), + plate.wells('A2'), + touch_tip=True) # touch tip to each well's edge + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_4 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Touching tip + Dispensing 100.0 at + Touching tip + Drop_tip at + +Blow Out +-------- + +A blow-out can be performed after every dispense that leaves the tip empty by setting ``blow_out=True``. + +.. testsetup:: options_5 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_5 + + pipette.transfer( + 100, + plate.wells('A1'), + plate.wells('A2'), + blow_out=True) # blow out droplets when tip is empty + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_5 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Dispensing 100.0 at + Blowing out + Drop_tip at + +Mix Before/After +---------------- + +A mix can be performed before every aspirate by setting ``mix_before=``. The value of ``mix_before=`` must be a tuple, the 1st value is the number of repetitions, the 2nd value is the amount of liquid to mix. + +.. testsetup:: options_6 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_6 + + pipette.transfer( + 100, + plate.wells('A1'), + plate.wells('A2'), + mix_before=(2, 50), # mix 2 times with 50uL before aspirating + mix_after=(3, 75)) # mix 3 times with 75uL after dispensing + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_6 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Mixing 2 times with a volume of 50ul + Aspirating 50 at + Dispensing 50 + Aspirating 50 + Dispensing 50 + Aspirating 100.0 at + Dispensing 100.0 at + Mixing 3 times with a volume of 75ul + Aspirating 75 at + Dispensing 75.0 + Aspirating 75 + Dispensing 75.0 + Aspirating 75 + Dispensing 75.0 + Drop_tip at + +Air Gap +------- + +An air gap can be performed after every aspirate by setting ``air_gap=int``, where the value is the volume of air in microliters to aspirate after aspirating the liquid. + +.. testsetup:: options_7 + + from opentrons import robot, containers, instruments + + robot.reset() + robot.clear_commands() + + plate = containers.load('96-flat', 'B1') + + tiprack = containers.load('tiprack-200ul', 'A1') + trash = containers.load('point', 'D2') + + pipette = instruments.Pipette( + axis='b', + max_volume=200, + tip_racks=[tiprack], + trash_container=trash) + +.. testcode:: options_7 + + pipette.transfer( + 100, + plate.wells('A1'), + plate.wells('A2'), + air_gap=20) # add 20uL of air after each aspirate + + for c in robot.commands(): + print(c) + +will print out... + +.. testoutput:: options_7 + :options: -ELLIPSIS, +NORMALIZE_WHITESPACE + + Picking up tip from + Aspirating 100.0 at + Air gap + Aspirating 20 + Dispensing 20 at + Dispensing 100.0 at + Drop_tip at + + + diff --git a/api/docs/dist/ot1/_sources/writing.txt b/api/docs/dist/ot1/_sources/writing.txt new file mode 100644 index 000000000000..b9fe10102ef8 --- /dev/null +++ b/api/docs/dist/ot1/_sources/writing.txt @@ -0,0 +1,72 @@ +.. _writing: + +#################### +Design with Python +#################### + +Writing protocols in Python requires some up-front design before seeing your liquid handling automation in action. At a high-level, writing protocols with the Opentrons API looks like: + +1) Write a Python protocol +2) Test the code for errors +3) Repeat steps 1 & 2 +4) Calibrate labware on robot +5) Run your protocol + +These sets of documents aim to help you get the most out of steps 1 & 2, the "design" stage. + +******************************* + +******************** +Python for Beginners +******************** + +If Python is new to you, we suggest going through a few simple tutorials to acquire a base understanding to build upon. The following tutorials are a great starting point for working with the Opentrons API (from `learnpython.org `_): + +1) `Hello World `_ +2) `Variables and Types `_ +3) `Lists `_ +4) `Basic Operators `_ +5) `Conditions `_ +6) `Loops `_ +7) `Functions `_ +8) `Dictionaries `_ + +After going through the above tutorials, you should have enough of an understanding of Python to work with the Opentrons API and start designing your experiments! + +******************************* + +******************* +Working with Python +******************* + +Currently, we recommend writing your protocols in one of two ways: + +Text Editor +=========== + +Using a popular and free code editor, like `Sublime Text 3`__, is a common method for writing Python protocols. Download onto your computer, and you can now write and save Python scripts. + +__ https://www.sublimetext.com/3 + +.. note:: + + Make sure that when saving a protocol file, it ends with the ``.py`` file extension. This will ensure the App and other programs are able to properly read it. + + For example, ``my_protocol_file.py`` + +Jupyter Notebook +================ + +For a more interactive environment to write and debug using some of our API tools, we recommend using Jupyter Notebook. To begin, just install `Anaconda`__, which comes with Jupyter Notebook. + +__ https://www.continuum.io/downloads + +Once installed, launch Jupyter Notebook, and install the Opentrons API by doing the following: + +1) Create a new Python notebook +2) Run the command ``!pip install --upgrade opentrons`` in a cell +3) Restart your notebook's Kernel, and API will be installed + +.. note:: + + Be sure to download the **Python 3.7 version** if Anaconda, and Python 2.7 will not work with the Opentrons API. diff --git a/api/docs/dist/ot1/_static/Akko-Pro-All.js b/api/docs/dist/ot1/_static/Akko-Pro-All.js new file mode 100644 index 000000000000..dbaea734e1ab --- /dev/null +++ b/api/docs/dist/ot1/_static/Akko-Pro-All.js @@ -0,0 +1,65 @@ +/* + + MyFonts Webfont Build ID 3275970, 2016-08-29T14:31:34-0400 + + The fonts listed in this notice are subject to the End User License + Agreement(s) entered into by the website owner. All other parties are + explicitly restricted from using the Licensed Webfonts(s). + + You may obtain a valid license at the URLs below. + + Webfont: AkkoPro-MediumItalic by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-medium-italic/ + + Webfont: AkkoPro-BlackItalic by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-black-italic/ + + Webfont: AkkoPro-ThinItalic by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-thin-italic/ + + Webfont: AkkoPro-Light by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-light/ + + Webfont: AkkoPro-LightItalic by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-light-italic/ + + Webfont: AkkoPro-Bold by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-bold/ + + Webfont: AkkoPro-BoldItalic by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-bold-italic/ + + Webfont: AkkoPro-Black by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-black/ + + Webfont: AkkoPro-Thin by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-thin/ + + Webfont: AkkoPro-Regular by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-regular/ + + Webfont: AkkoPro-Italic by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-italic/ + + Webfont: AkkoPro-Medium by Linotype + URL: http://www.myfonts.com/fonts/linotype/akko/pro-medium/ + + + License: http://www.myfonts.com/viewlicense?type=web&buildid=3275970 + Licensed pageviews: 1,250,000 + Webfonts copyright: Copyright © 2011 Linotype Corp., www.linotype.com. All rights reserved. This font software may not be reproduced, modified, disclosed or transferred without the express written approval of Linotype Corp. Akko is a trademark of Linotype Corp. and ma + + ? 2016 MyFonts Inc +*/ +var protocol=document.location.protocol;"https:"!=protocol&&(protocol="http:");var count=document.createElement("script");count.type="text/javascript";count.async=!0;count.src=protocol+"//hello.myfonts.net/count/31fcc2";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(count,s);var browserName,browserVersion,webfontType;if("undefined"==typeof woffEnabled)var woffEnabled=!0;var svgEnabled=0,woff2Enabled=0; +if("undefined"!=typeof customPath)var path=customPath;else{var scripts=document.getElementsByTagName("SCRIPT"),script=scripts[scripts.length-1].src;script.match("://")||"/"==script.charAt(0)||(script="./"+script);path=script.replace(/\\/g,"/").replace(/\/[^\/]*\/?$/,"")} +var wfpath="https://s3.amazonaws.com/opentrons-landing-img/fonts/",browsers=[{regex:"MSIE (\\d+\\.\\d+)",versionRegex:"new Number(RegExp.$1)",type:[{version:9,type:"woff"},{version:5,type:"eot"}]},{regex:"Trident/(\\d+\\.\\d+); (.+)?rv:(\\d+\\.\\d+)",versionRegex:"new Number(RegExp.$3)",type:[{version:11,type:"woff"}]},{regex:"Firefox[/s](\\d+\\.\\d+)",versionRegex:"new Number(RegExp.$1)",type:[{version:3.6,type:"woff"},{version:3.5,type:"ttf"}]},{regex:"Edge/(\\d+\\.\\d+)",versionRegex:"new Number(RegExp.$1)",type:[{version:12,type:"woff"}]}, +{regex:"Chrome/(\\d+\\.\\d+)",versionRegex:"new Number(RegExp.$1)",type:[{version:36,type:"woff2"},{version:6,type:"woff"},{version:4,type:"ttf"}]},{regex:"Mozilla.*Android (\\d+\\.\\d+).*AppleWebKit.*Safari",versionRegex:"new Number(RegExp.$1)",type:[{version:4.1,type:"woff"},{version:3.1,type:"svg#wf"},{version:2.2,type:"ttf"}]},{regex:"Mozilla.*(iPhone|iPad).* OS (\\d+)_(\\d+).* AppleWebKit.*Safari",versionRegex:"new Number(RegExp.$2) + (new Number(RegExp.$3) / 10)",unhinted:!0,type:[{version:5, +type:"woff"},{version:4.2,type:"ttf"},{version:1,type:"svg#wf"}]},{regex:"Mozilla.*(iPhone|iPad|BlackBerry).*AppleWebKit.*Safari",versionRegex:"1.0",type:[{version:1,type:"svg#wf"}]},{regex:"Version/(\\d+\\.\\d+)(\\.\\d+)? Safari/(\\d+\\.\\d+)",versionRegex:"new Number(RegExp.$1)",type:[{version:5.1,type:"woff"},{version:3.1,type:"ttf"}]},{regex:"Opera/(\\d+\\.\\d+)(.+)Version/(\\d+\\.\\d+)(\\.\\d+)?",versionRegex:"new Number(RegExp.$3)",type:[{version:24,type:"woff2"},{version:11.1,type:"woff"}, +{version:10.1,type:"ttf"}]}],browLen=browsers.length,suffix="",i=0; +a:for(;i=browsers[i].type[j].version&&(1==browsers[i].unhinted&&(suffix="_unhinted"),webfontType=browsers[i].type[j].type,"woff"!=webfontType||woffEnabled)&&("woff2"!=webfontType||woff2Enabled)&&("svg#wf"!=webfontType||svgEnabled))break a}else webfontType="woff"} +/(Macintosh|Android)/.test(navigator.userAgent)&&"svg#wf"!=webfontType&&(suffix="_unhinted");var head=document.getElementsByTagName("head")[0],stylesheet=document.createElement("style");stylesheet.setAttribute("type","text/css");head.appendChild(stylesheet); +var fonts=[{fontFamily:"AkkoPro-MediumItalic",url:wfpath+"31FCC2_0"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-BlackItalic",url:wfpath+"31FCC2_1"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-ThinItalic",url:wfpath+"31FCC2_2"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-Light",url:wfpath+"31FCC2_3"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-LightItalic",url:wfpath+"31FCC2_4"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-Bold",url:wfpath+"31FCC2_5"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-BoldItalic", +url:wfpath+"31FCC2_6"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-Black",url:wfpath+"31FCC2_7"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-Thin",url:wfpath+"31FCC2_8"+suffix+"_0."+webfontType},{fontFamily:"AkkoPro-Italic",url:wfpath+"31FCC2_A"+suffix+"_0."+webfontType}],len=fonts.length,data_fn; +"ttf"==webfontType?data_fn="_unhinted"==suffix?"31FCC2_data_unhintedttf.css":"31FCC2_datattf.css":"woff"==webfontType&&(data_fn="_unhinted"==suffix?"31FCC2_data_unhintedwoff.css":"31FCC2_datawoff.css");var link=document.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("type","text/css");link.setAttribute("href",wfpath+data_fn);head.appendChild(link); +for(var css="",i=0;i .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #DDDDDD; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #DDDDDD; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: 'AkkoPro-Regular', 'Open Sans'; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #05C1B3; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: 'Open Sans', sans-serif; + font-size: 1em; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #006FFF; + text-decoration: underline; +} + +a:hover { + color: #05C1B3; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'AkkoPro-Regular', 'Open Sans'; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: 'AkkoPro-Regular', 'Open Sans'; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #006FFF; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #05C1B3; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #006FFF; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #05C1B3; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Make nested-list/multi-paragraph items look better in Releases changelog + * pages. Without this, docutils' magical list fuckery causes inconsistent + * formatting between different release sub-lists. + */ +div#changelog > div.section > ul > li > p:only-child { + margin-bottom: 0; +} + +/* Hide fugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} diff --git a/api/docs/dist/ot1/_static/banners.css b/api/docs/dist/ot1/_static/banners.css new file mode 100644 index 000000000000..b8d9ba333254 --- /dev/null +++ b/api/docs/dist/ot1/_static/banners.css @@ -0,0 +1,45 @@ +.banner_wrapper { + border: 1px solid #d8d8d8; + padding: 1rem; + margin-bottom: 1rem; + width: auto; +} + +.banner_wrapper a { + text-decoration: none; +} + +.banner_v1 { + display: flex; + justify-content: space-between; + align-items:center; +} + +@media only screen and (min-width: 1024px) { + .banner_wrapper { + width: 105%; + } +} + +#heading_2 { + color: black; + font-weight: 600; + font-size: 18px; + margin: 0 0 0.25rem; +} + +#heading_4 { + color: black; + font-size: 14px; + margin: 0; +} + +#heading_v2 { + color: black; + font-size: 24px; + margin: 0 0 0.25rem; +} + +.banner_list li { + margin: 0.25rem 0; +} diff --git a/api/docs/dist/ot1/_static/basic.css b/api/docs/dist/ot1/_static/basic.css new file mode 100644 index 000000000000..0b79414a16ad --- /dev/null +++ b/api/docs/dist/ot1/_static/basic.css @@ -0,0 +1,611 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text { +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +div.code-block-caption { + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +div.code-block-caption + div > div.highlight > pre { + margin-top: 0; +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + padding: 1em 1em 0; +} + +div.literal-block-wrapper div.highlight { + margin: 0; +} + +code.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +code.descclassname { + background-color: transparent; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/api/docs/dist/ot1/_static/comment-bright.png b/api/docs/dist/ot1/_static/comment-bright.png new file mode 100644 index 000000000000..551517b8c83b Binary files /dev/null and b/api/docs/dist/ot1/_static/comment-bright.png differ diff --git a/api/docs/dist/ot1/_static/comment-close.png b/api/docs/dist/ot1/_static/comment-close.png new file mode 100644 index 000000000000..09b54be46da3 Binary files /dev/null and b/api/docs/dist/ot1/_static/comment-close.png differ diff --git a/api/docs/dist/ot1/_static/comment.png b/api/docs/dist/ot1/_static/comment.png new file mode 100644 index 000000000000..92feb52b8824 Binary files /dev/null and b/api/docs/dist/ot1/_static/comment.png differ diff --git a/api/docs/dist/ot1/_static/custom.css b/api/docs/dist/ot1/_static/custom.css new file mode 100644 index 000000000000..2a924f1d6a8b --- /dev/null +++ b/api/docs/dist/ot1/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/api/docs/dist/ot1/_static/doctools.js b/api/docs/dist/ot1/_static/doctools.js new file mode 100644 index 000000000000..816349563588 --- /dev/null +++ b/api/docs/dist/ot1/_static/doctools.js @@ -0,0 +1,287 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + }, + + initOnKeyListeners: function() { + $(document).keyup(function(event) { + var activeElementType = document.activeElement.tagName; + // don't navigate when in search box or textarea + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { + switch (event.keyCode) { + case 37: // left + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; + } + case 39: // right + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; + } + } + } + }); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); \ No newline at end of file diff --git a/api/docs/dist/ot1/_static/down-pressed.png b/api/docs/dist/ot1/_static/down-pressed.png new file mode 100644 index 000000000000..7c30d004b71b Binary files /dev/null and b/api/docs/dist/ot1/_static/down-pressed.png differ diff --git a/api/docs/dist/ot1/_static/down.png b/api/docs/dist/ot1/_static/down.png new file mode 100644 index 000000000000..f48098a43b0c Binary files /dev/null and b/api/docs/dist/ot1/_static/down.png differ diff --git a/api/docs/dist/ot1/_static/file.png b/api/docs/dist/ot1/_static/file.png new file mode 100644 index 000000000000..254c60bfbe27 Binary files /dev/null and b/api/docs/dist/ot1/_static/file.png differ diff --git a/api/docs/dist/ot1/_static/jquery-1.11.1.js b/api/docs/dist/ot1/_static/jquery-1.11.1.js new file mode 100644 index 000000000000..d4b67f7e6c1a --- /dev/null +++ b/api/docs/dist/ot1/_static/jquery-1.11.1.js @@ -0,0 +1,10308 @@ +/*! + * jQuery JavaScript Library v1.11.1 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-05-01T17:42Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper window is present, + // execute the factory and get jQuery + // For environments that do not inherently posses a window with a document + // (such as Node.js), expose a jQuery-making factory as module.exports + // This accentuates the need for the creation of a real window + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var deletedIds = []; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.11.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( support.ownLast ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== strundefined && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, + doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", function() { + setDocument(); + }, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", function() { + setDocument(); + }); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { + div.innerHTML = "
"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowclip^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof rootjQuery.ready !== "undefined" ? + rootjQuery.ready( selector ) : + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.extend({ + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +jQuery.fn.extend({ + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.unique( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + + } else if ( !(--remaining) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend({ + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +}); + +/** + * Clean-up method for dom ready events + */ +function detach() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } +} + +/** + * The ready event handler and self cleanup method + */ +function completed() { + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + + +var strundefined = typeof undefined; + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownLast = i !== "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom +jQuery(function() { + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + if ( typeof div.style.zoom !== strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if ( val ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); +}); + + + + +(function() { + var div = document.createElement( "div" ); + + // Execute the test only if not already executed in another module. + if (support.deleteExpando == null) { + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +})(); + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( elem ) { + var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute("classid") === noData; +}; + + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + +function internalData( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var i, name, data, + elem = this[0], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + }; + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; +}; +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + // Minified: var a,b,c + var input = document.createElement( "input" ), + div = document.createElement( "div" ), + fragment = document.createDocumentFragment(); + + // Setup + div.innerHTML = "
a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName( "tbody" ).length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild( input ); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild( div ); + div.innerHTML = ""; + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + support.noCloneEvent = true; + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Execute the test only if not already executed in another module. + if (support.deleteExpando == null) { + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + } +})(); + + +(function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) + for ( i in { submit: true, change: true, focusin: true }) { + eventName = "on" + i; + + if ( !(support[ i + "Bubbles" ] = eventName in window) ) { + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +})(); + + +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + jQuery._removeData( doc, fix ); + } else { + jQuery._data( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + col: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!support.noCloneEvent || !support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + deletedIds.push( id ); + } + } + } + } + } +}); + +jQuery.fn.extend({ + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( " + +
+ + +
+
+
+ + +
+

API Reference

+

If you are reading this, you are probably looking for an in-depth explanation of API classes and methods to fully master your protocol development skills.

+
+

Robot

+

All protocols are set up, simulated and executed using a Robot class.

+
+
+class robot.Robot(config=None, broker=None)
+

This class is the main interface to the robot.

+

It should never be instantiated directly; instead, the global instance may +be accessed at opentrons.robot.

+
+
Through this class you can can:
+
+
+

Each Opentrons protocol is a Python script. When evaluated the script +creates an execution plan which is stored as a list of commands in +Robot’s command queue.

+
+
Here are the typical steps of writing the protocol:
    +
  • Using a Python script and the Opentrons API load your +containers and define instruments +(see Pipette).

  • +
  • Call reset() to reset the robot’s state and clear commands.

  • +
  • Write your instructions which will get converted +into an execution plan.

  • +
  • Review the list of commands generated by a protocol +commands().

  • +
  • connect() to the robot and call run() it on a real robot.

  • +
+
+
+

See Pipette for the list of supported instructions.

+
+
+add_instrument(self, mount, instrument)
+

Adds instrument to a robot.

+
+
Parameters:
+
    +
  • mount (str) – Specifies which axis the instruments is attached to. +Valid options are “left” or “right”.

  • +
  • instrument (Instrument) – An instance of a Pipette to attached to the axis.

  • +
+
+
+

Notes

+

A canonical way to add to add a Pipette to a robot is:

+
from opentrons import instruments
+m300 = instruments.P300_Multi(mount='left')
+
+
+

This will create a pipette and call add_instrument() +to attach the instrument.

+
+ +
+
+connect(self, port=None, options=None)
+

Connects the robot to a serial port.

+
+
Parameters:
+
    +
  • port (str) – OS-specific port name or 'Virtual Smoothie'

  • +
  • options (dict) – if port is set to 'Virtual Smoothie', provide +the list of options to be passed to get_virtual_device()

  • +
+
+
Return type:
+

True for success, False for failure.

+
+
+

Notes

+

If you wish to connect to the robot without using the OT App, you will +need to use this function.

+

Examples

+
>>> from opentrons import robot 
+>>> robot.connect() 
+
+
+
+ +
+
+disconnect(self)
+

Disconnects from the robot.

+
+ +
+
+get_warnings(self)
+

Get current runtime warnings.

+
+
Returns:
+

    +
  • Runtime warnings accumulated since the last run()

  • +
  • or simulate().

  • +
+

+
+
+
+ +
+
+head_speed(self, combined_speed=None, x=None, y=None, z=None, a=None, b=None, c=None)
+

Set the speeds (mm/sec) of the robot

+
+
Parameters:
+
    +
  • combined_speed (number specifying a combined-axes speed) –

  • +
  • <axis> (key/value pair, specifying the maximum speed of that axis) –

  • +
+
+
+

Examples

+
>>> from opentrons import robot 
+>>> robot.reset() 
+>>> robot.head_speed(combined_speed=400) 
+#  sets the head speed to 400 mm/sec or the axis max per axis
+>>> robot.head_speed(x=400, y=200) 
+# sets max speeds of X and Y
+
+
+
+ +
+
+home(self, \*args, \*\*kwargs)
+

Home robot’s head and plunger motors.

+
+ +
+
+move_to(self, location, instrument, strategy='arc', \*\*kwargs)
+

Move an instrument to a coordinate, container or a coordinate within +a container.

+
+
Parameters:
+
    +
  • location (one of the following:) – 1. Placeable (i.e. Container, Deck, Slot, Well) — will +move to the origin of a container. +2. Vector move to the given coordinate in Deck coordinate +system. +3. (Placeable, Vector) move to a given coordinate +within object’s coordinate system.

  • +
  • instrument – Instrument to move relative to. If None, move relative to the +center of a gantry.

  • +
  • strategy ({'arc', 'direct'}) –

    arc : move to the point using arc trajectory +avoiding obstacles.

    +

    direct : move to the point in a straight line.

    +

  • +
+
+
+
+ +
+
+pause(self, msg=None)
+

Pauses execution of the protocol. Use resume() to resume

+
+ +
+
+reset(self)
+
+
Resets the state of the robot and clears:
    +
  • Deck

  • +
  • Instruments

  • +
  • Command queue

  • +
  • Runtime warnings

  • +
+
+
+

Examples

+
>>> from opentrons import robot 
+>>> robot.reset() 
+
+
+
+ +
+
+resume(self)
+

Resume execution of the protocol after pause()

+
+ +
+
+stop(self)
+

Stops execution of the protocol. (alias for halt)

+
+ +
+ +
+
+

Pipette

+
+
+class pipette.Pipette(robot, model_offset=(0, 0, 0), mount=None, axis=None, mount_obj=None, model=None, name=None, ul_per_mm=None, channels=1, min_volume=0, max_volume=None, trash_container='', tip_racks=[], aspirate_speed=5, dispense_speed=10, blow_out_speed=60, aspirate_flow_rate=None, dispense_flow_rate=None, plunger_current=0.5, drop_tip_current=0.5, return_tip_height=None, drop_tip_speed=5, plunger_positions={'blow_out': 0, 'bottom': 2, 'drop_tip': - 3.5, 'top': 18.5}, pick_up_current=0.1, pick_up_distance=10, pick_up_increment=1, pick_up_presses=3, pick_up_speed=30, quirks=[], fallback_tip_length=51.7, blow_out_flow_rate=None, requested_as=None, pipette_id=None)
+

DIRECT USE OF THIS CLASS IS DEPRECATED – this class should not be used +directly. Its parameters, defaults, methods, and behaviors are subject to +change without a major version release. Use the model-specific constructors +available through from opentrons import instruments.

+

All model-specific instrument constructors are inheritors of this class. +With any of those instances you can can:

+ +

Here are the typical steps of using the Pipette:

+
    +
  • Instantiate a pipette with a maximum volume (uL) +and a mount (left or right)

  • +
  • Design your protocol through the pipette’s liquid-handling commands

  • +
+

Methods in this class include assertions where needed to ensure that any +action that requires a tip must be preceeded by pick_up_tip. For example: +mix, transfer, aspirate, blow_out, and drop_tip.

+
+
Parameters:
+
    +
  • mount (str) – The mount of the pipette’s actuator on the Opentrons robot +(‘left’ or ‘right’)

  • +
  • trash_container (Container) – Sets the default location drop_tip() will put tips +(Default: fixed-trash)

  • +
  • tip_racks (list) – A list of Containers for this Pipette to track tips when calling +pick_up_tip() (Default: [])

  • +
  • aspirate_flow_rate (int) – The speed (in ul/sec) the plunger will move while aspirating +(Default: See Model Type)

  • +
  • dispense_flow_rate (int) – The speed (in ul/sec) the plunger will move while dispensing +(Default: See Model Type)

  • +
+
+
Return type:
+

A new instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> tip_rack_300ul = labware.load(
+...     'GEB-tiprack-300ul', '1') 
+>>> p300 = instruments.P300_Single(mount='left',
+...     tip_racks=[tip_rack_300ul]) 
+
+
+
+
+aspirate(self, volume=None, location=None, rate=1.0)
+

Aspirate a volume of liquid (in microliters/uL) using this pipette +from the specified location

+

Notes

+

If only a volume is passed, the pipette will aspirate +from it’s current position. If only a location is passed, +aspirate will default to it’s max_volume.

+

The location may be a Well, or a specific position in relation to a +Well, such as Well.top(). If a Well is specified without calling a +a position method (such as .top or .bottom), this method will default +to the bottom of the well.

+
+
Parameters:
+
    +
  • volume (int or float) – The number of microliters to aspirate (Default: self.max_volume)

  • +
  • location (Placeable or tuple(Placeable, Vector)) – The Placeable (Well) to perform the aspirate. +Can also be a tuple with first item Placeable, +second item relative Vector

  • +
  • rate (float) – Set plunger speed for this aspirate, where +speed = rate * aspirate_speed (see set_speed())

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', '2') 
+>>> p300 = instruments.P300_Single(mount='right') 
+>>> p300.pick_up_tip() 
+# aspirate 50uL from a Well
+>>> p300.aspirate(50, plate[0]) 
+# aspirate 50uL from the center of a well
+>>> p300.aspirate(50, plate[1].bottom()) 
+>>> # aspirate 20uL in place, twice as fast
+>>> p300.aspirate(20, rate=2.0) 
+>>> # aspirate the pipette's remaining volume (80uL) from a Well
+>>> p300.aspirate(plate[2]) 
+
+
+
+ +
+
+blow_out(self, location=None)
+

Force any remaining liquid to dispense, by moving +this pipette’s plunger to the calibrated blow_out position

+

Notes

+

If no location is passed, the pipette will blow_out +from it’s current position.

+
+
Parameters:
+

location (Placeable or tuple(Placeable, Vector)) – The Placeable (Well) to perform the blow_out. +Can also be a tuple with first item Placeable, +second item relative Vector

+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, robot 
+>>> robot.reset() 
+>>> p300 = instruments.P300_Single(mount='left') 
+>>> p300.aspirate(50).dispense().blow_out() 
+
+
+
+ +
+
+consolidate(self, volume, source, dest, \*args, \*\*kwargs)
+

Consolidate will move a volume of liquid from a list of sources +to a single target location. See Transfer for details +and a full list of optional arguments.

+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', 'A3') 
+>>> p300 = instruments.P300_Single(mount='left') 
+>>> p300.consolidate(50, plate.cols[0], plate[1]) 
+
+
+
+ +
+
+delay(self, seconds=0, minutes=0)
+
+
Parameters:
+

seconds (float) – The number of seconds to freeze in place.

+
+
+
+ +
+
+dispense(self, volume=None, location=None, rate=1.0)
+

Dispense a volume of liquid (in microliters/uL) using this pipette

+

Notes

+

If only a volume is passed, the pipette will dispense +from it’s current position. If only a location is passed, +dispense will default to it’s current_volume

+

The location may be a Well, or a specific position in relation to a +Well, such as Well.top(). If a Well is specified without calling a +a position method (such as .top or .bottom), this method will default +to the bottom of the well.

+
+
Parameters:
+
    +
  • volume (int or float) – The number of microliters to dispense +(Default: self.current_volume)

  • +
  • location (Placeable or tuple(Placeable, Vector)) – The Placeable (Well) to perform the dispense. +Can also be a tuple with first item Placeable, +second item relative Vector

  • +
  • rate (float) – Set plunger speed for this dispense, where +speed = rate * dispense_speed (see set_speed())

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', '3') 
+>>> p300 = instruments.P300_Single(mount='left') 
+# fill the pipette with liquid (200uL)
+>>> p300.aspirate(plate[0]) 
+# dispense 50uL to a Well
+>>> p300.dispense(50, plate[0]) 
+# dispense 50uL to the center of a well
+>>> relative_vector = plate[1].center() 
+>>> p300.dispense(50, (plate[1], relative_vector)) 
+# dispense 20uL in place, at half the speed
+>>> p300.dispense(20, rate=0.5) 
+# dispense the pipette's remaining volume (80uL) to a Well
+>>> p300.dispense(plate[2]) 
+
+
+
+ +
+
+distribute(self, volume, source, dest, \*args, \*\*kwargs)
+

Distribute will move a volume of liquid from a single of source +to a list of target locations. See Transfer for details +and a full list of optional arguments.

+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', '3') 
+>>> p300 = instruments.P300_Single(mount='left') 
+>>> p300.distribute(50, plate[1], plate.cols[0]) 
+
+
+
+ +
+
+drop_tip(self, location=None, home_after=True)
+

Drop the pipette’s current tip

+

Notes

+

If no location is passed, the pipette defaults to its trash_container +(see Pipette)

+
+
Parameters:
+

location (Placeable or tuple(Placeable, Vector)) – The Placeable (Well) to perform the drop_tip. +Can also be a tuple with first item Placeable, +second item relative Vector

+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> tiprack = labware.load('opentrons_96_tiprack_300ul', 'C2') 
+>>> trash = labware.load('point', 'A3') 
+>>> p300 = instruments.P300_Single(mount='left') 
+>>> p300.pick_up_tip(tiprack[0]) 
+# drops the tip in the fixed trash
+>>> p300.drop_tip() 
+>>> p300.pick_up_tip(tiprack[1]) 
+# drops the tip back at its tip rack
+>>> p300.drop_tip(tiprack[1]) 
+
+
+
+ +
+
+home(self)
+

Home the pipette’s plunger axis during a protocol run

+

Notes

+

Pipette.home() homes the Robot

+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, robot 
+>>> robot.reset() 
+>>> p300 = instruments.P300_Single(mount='right') 
+>>> p300.home() 
+
+
+
+ +
+
+mix(self, repetitions=1, volume=None, location=None, rate=1.0)
+

Mix a volume of liquid (in microliters/uL) using this pipette

+

Notes

+

If no location is passed, the pipette will mix +from it’s current position. If no volume is passed, +mix will default to it’s max_volume

+
+
Parameters:
+
    +
  • repetitions (int) – How many times the pipette should mix (Default: 1)

  • +
  • volume (int or float) – The number of microliters to mix (Default: self.max_volume)

  • +
  • location (Placeable or tuple(Placeable, Vector)) – The Placeable (Well) to perform the mix. +Can also be a tuple with first item Placeable, +second item relative Vector

  • +
  • rate (float) – Set plunger speed for this mix, where +speed = rate * (aspirate_speed or dispense_speed) +(see set_speed())

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', '4') 
+>>> p300 = instruments.P300_Single(mount='left') 
+# mix 50uL in a Well, three times
+>>> p300.mix(3, 50, plate[0]) 
+# mix 3x with the pipette's max volume, from current position
+>>> p300.mix(3) 
+
+
+
+ +
+
+move_to(self, location, strategy=None)
+

Move this Pipette to a Placeable on the Deck

+

Notes

+

Until obstacle-avoidance algorithms are in place, +Robot and Pipette move_to() use either an +“arc” or “direct”

+
+
Parameters:
+
    +
  • location (Placeable or tuple(Placeable, Vector)) – The destination to arrive at

  • +
  • strategy ("arc" or "direct") – “arc” strategies (default) will pick the head up on Z axis, then +over to the XY destination, then finally down to the Z destination. +“direct” strategies will simply move in a straight line from +the current position

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+
+ +
+
+pick_up_tip(self, location=None, presses=None, increment=None)
+

Pick up a tip for the Pipette to run liquid-handling commands with

+

Notes

+

A tip can be manually set by passing a location. If no location +is passed, the Pipette will pick up the next available tip in +it’s tip_racks list (see Pipette)

+
+
Parameters:
+
    +
  • location (Placeable or tuple(Placeable, Vector)) – The Placeable (Well) to perform the pick_up_tip. +Can also be a tuple with first item Placeable, +second item relative Vector

  • +
  • presses (:any:int) – The number of times to lower and then raise the pipette when +picking up a tip, to ensure a good seal (0 [zero] will result in +the pipette hovering over the tip but not picking it up–generally +not desireable, but could be used for dry-run). Default: 3 presses

  • +
  • increment (:int) – The additional distance to travel on each successive press (e.g.: +if presses=3 and increment=1, then the first press will travel down +into the tip by 3.5mm, the second by 4.5mm, and the third by 5.5mm. +Default: 1mm

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> tiprack = labware.load('GEB-tiprack-300', '2') 
+>>> p300 = instruments.P300_Single(mount='left',
+...     tip_racks=[tiprack]) 
+>>> p300.pick_up_tip(tiprack[0]) 
+>>> p300.return_tip() 
+# `pick_up_tip` will automatically go to tiprack[1]
+>>> p300.pick_up_tip() 
+>>> p300.return_tip() 
+
+
+
+ +
+
+return_tip(self, home_after=True)
+

Drop the pipette’s current tip to it’s originating tip rack

+

Notes

+

This method requires one or more tip-rack Container +to be in this Pipette’s tip_racks list (see Pipette)

+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> tiprack = labware.load('GEB-tiprack-300', '2') 
+>>> p300 = instruments.P300_Single(mount='left',
+...     tip_racks=[tiprack, tiprack2]) 
+>>> p300.pick_up_tip() 
+>>> p300.aspirate(50, plate[0]) 
+>>> p300.dispense(plate[1]) 
+>>> p300.return_tip() 
+
+
+
+ +
+
+set_flow_rate(self, aspirate=None, dispense=None, blow_out=None)
+

Set the speed (uL/second) the Pipette plunger will move +during aspirate() and dispense(). The speed is set using +nominal max volumes for any given pipette model.

+
+
Parameters:
+
    +
  • aspirate (int) – The speed in microliters-per-second, at which the plunger will +move while performing an aspirate

  • +
  • dispense (int) – The speed in microliters-per-second, at which the plunger will +move while performing an dispense

  • +
+
+
+
+ +
+
+touch_tip(self, location=None, radius=1.0, v_offset=- 1.0, speed=60.0)
+

Touch the Pipette tip to the sides of a well, +with the intent of removing left-over droplets

+

Notes

+

If no location is passed, the pipette will touch_tip +from it’s current position.

+
+
Parameters:
+
    +
  • location (Placeable) – The Placeable (Well) to perform the touch_tip.

  • +
  • radius (float) – Radius is a floating point describing the percentage of a well’s +radius. When radius=1.0, touch_tip() will move to 100% of +the wells radius. When radius=0.5, touch_tip() will move to +50% of the wells radius. +Default: 1.0 (100%)

  • +
  • speed (float) – The speed for touch tip motion, in mm/s. +Default: 60.0 mm/s, Max: 80.0 mm/s, Min: 20.0 mm/s

  • +
  • v_offset (float) – The offset in mm from the top of the well to touch tip. +Default: -1.0 mm

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', '8') 
+>>> p300 = instruments.P300_Single(mount='left') 
+>>> p300.aspirate(50, plate[0]) 
+>>> p300.dispense(plate[1]).touch_tip() 
+
+
+
+ +
+
+transfer(self, volume, source, dest, \*\*kwargs)
+

Transfer will move a volume of liquid from a source location(s) +to a dest location(s). It is a higher-level command, incorporating +other Pipette commands, like aspirate and +dispense, designed to make protocol writing easier at the +cost of specificity.

+
+
Parameters:
+
    +
  • volumes (number, list, or tuple) – The amount of volume to remove from each sources Placeable +and add to each targets Placeable. If volumes is a list, +each volume will be used for the sources/targets at the +matching index. If volumes is a tuple with two elements, +like (20, 100), then a list of volumes will be generated with +a linear gradient between the two volumes in the tuple.

  • +
  • source (Placeable or list) – Single Placeable or list of Placeables, from where +liquid will be aspirated from.

  • +
  • dest (Placeable or list) – Single Placeable or list of Placeables, where +liquid will be dispenseed to.

  • +
  • new_tip (str) – The number of clean tips this transfer command will use. If +‘never’, no tips will be picked up nor dropped. If ‘once’, a +single tip will be used for all cmds. If ‘always’, a new tip +will be used for each transfer. Default is ‘once’.

  • +
  • trash (boolean) – If True (default behavior) and trash container has been attached +to this Pipette, then the tip will be sent to the trash +container. +If False, then tips will be returned to their associated tiprack.

  • +
  • touch_tip (boolean) – If True, a touch_tip will occur following each +aspirate and dispense. If set to False (default), +no touch_tip will occur.

  • +
  • blow_out (boolean) – If True, a blow_out will occur following each +dispense, but only if the pipette has no liquid left in it. +If set to False (default), no blow_out will occur.

  • +
  • mix_before (tuple) – Specify the number of repetitions volume to mix, and a mix +will proceed each aspirate during the transfer and dispense. +The tuple’s values is interpreted as (repetitions, volume).

  • +
  • mix_after (tuple) – Specify the number of repetitions volume to mix, and a mix +will following each dispense during the transfer or +consolidate. The tuple’s values is interpreted as +(repetitions, volume).

  • +
  • carryover (boolean) – If True (default), any volumes that exceed the maximum volume +of this Pipette will be split into multiple smaller volumes.

  • +
  • repeat (boolean) – (Only applicable to distribute and consolidate)If +True (default), sequential aspirate volumes will be +combined into one tip for the purpose of saving time. If False, +all volumes will be transferred seperately.

  • +
  • gradient (lambda) – Function for calculated the curve used for gradient volumes. +When volumes is a tuple of length 2, it’s values are used +to create a list of gradient volumes. The default curve for +this gradient is linear (lambda x: x), however a method can +be passed with the gradient keyword argument to create a +custom curve.

  • +
+
+
Return type:
+

This instance of Pipette.

+
+
+

Examples

+
>>> from opentrons import instruments, labware, robot 
+>>> robot.reset() 
+>>> plate = labware.load('96-flat', '5') 
+>>> p300 = instruments.P300_Single(mount='right') 
+>>> p300.transfer(50, plate[0], plate[1]) 
+
+
+
+ +
+ +
+
+

Placeable

+
+
+class placeable.Placeable(parent=None, properties=None)
+

This class represents every item on the deck.

+

It maintains the hierarchy and provides means to: +* traverse +* retrieve items by name +* calculate coordinates in different reference systems

+

It should never be directly created; it is created by the system during +labware load and when accessing wells.

+
+
+bottom(self, z=0, radius=0, degrees=0, reference=None)
+

Returns (Placeable, Vector) tuple where +the vector points to the bottom of the placeable. This can be passed +into any Robot or Pipette method +location argument.

+

If reference (a Placeable) is provided, the return +value will be in that placeable’s coordinate system.

+

The radius and degrees arguments are interpreted as +in from_center() (except that degrees is in degrees, not +radians). They can be used to specify a further distance from the +bottom center of the well; for instance, calling +bottom(radius=0.5, degrees=180) will move half the radius in the +180 degree direction from the center of the well.

+

The z argument is a distance in mm to move in z from the bottom, +and can be used to hover above the bottom. For instance, calling +bottom(z=1) will move 1mm above the bottom.

+
+
Parameters:
+
    +
  • z – Absolute distance in mm to move in z from the bottom. +Note that unlike the other arguments, this is a distance, not +a ratio.

  • +
  • degrees – Direction in which to move radius from the bottom +center.

  • +
  • radius – Ratio of the placeable’s radius to move in the direction +specified by degrees from the bottom center.

  • +
  • reference – An optional placeable for the vector to be relative +to.

  • +
+
+
Returns:
+

A tuple of the placeable and the offset. This can be passed +into any Robot or Pipette method +location argument.

+
+
+
+ +
+
+center(self, reference=None)
+

Returns (Placeable, Vector) tuple where +the vector points to the center of the placeable, in x, y, +and z. This can be passed into any Robot or +Pipette method location argument.

+

If reference (a Placeable) is provided, the return +value will be in that placeable’s coordinate system.

+
+
Parameters:
+

reference – An optional placeable for the vector to be relative +to.

+
+
Returns:
+

A tuple of the placeable and the offset. This can be passed +into any Robot or Pipette method +location argument.

+
+
+
+ +
+
+from_center(self, x=None, y=None, z=None, r=None, theta=None, h=None, reference=None)
+

Accepts a set of ratios for Cartesian or ratios/angle for Polar +and returns Vector using reference as origin.

+

Though both polar and cartesian arguments are accepted, only one +set should be used at the same time, and the set selected should be +entirely used. In addition, all variables in the set should be used.

+

For instance, if you want to use cartesian coordinates, you must +specify all of x, y, and z as numbers; if you want to +use polar coordinates, you must specify all of theta, r and +h as numbers.

+

While theta is an absolute angle in radians, the other values are +actually ratios which are multiplied by the relevant dimensions of the +placeable on which from_center is called. For instance, calling +from_center(x=0.5, y=0.5, z=0.5) does not mean “500 micromenters +from the center in each dimension”, but “half the x size, half the y +size, and half the z size from the center”. Similarly, +from_center(r=0.5, theta=3.14, h=0.5) means “half the radius +dimension at 180 degrees, and half the height upwards”.

+
+
Parameters:
+
    +
  • x – Ratio of the x dimension of the placeable to move from the +center.

  • +
  • y – Ratio of the y dimension of the placeable to move from the +center.

  • +
  • z – Ratio of the z dimension of the placeable to move from the +center.

  • +
  • r – Ratio of the radius to move from the center.

  • +
  • theta – Angle in radians at which to move the percentage of the +radius specified by r from the center.

  • +
  • h – Percentage of the height to move up in z from the center.

  • +
  • reference – If specified, an origin to add to the offset vector +specified by the other arguments.

  • +
+
+
Returns:
+

A vector from either the origin or the specified reference. +This can be passed into any Robot or +Pipette method location argument.

+
+
+
+ +
+
+top(self, z=0, radius=0, degrees=0, reference=None)
+

Returns (Placeable, Vector) tuple where +the vector points to the top of the placeable. This can be passed +into any Robot or Pipette method +location argument.

+

If reference (a Placeable) is provided, the return +value will be in that placeable’s coordinate system.

+

The radius and degrees arguments are interpreted as +in from_center() (except that degrees is in degrees, not +radians). They can be used to specify a further distance from the top +center of the well; for instance, calling +top(radius=0.5, degrees=180) will move half the radius in the 180 +degree direction from the center of the well.

+

The z argument is a distance in mm to move in z from the top, and +can be used to hover above or below the top. For instance, calling +top(z=-1) will move 1mm below the top.

+
+
Parameters:
+
    +
  • z – Absolute distance in mm to move in z from the top. Note +that unlike the other arguments, this is a distance, not a +ratio.

  • +
  • degrees – Direction in which to move radius from the top +center.

  • +
  • radius – Ratio of the placeable’s radius to move in the direction +specified by degrees from the top center.

  • +
+
+
Returns:
+

A tuple of the placeable and the offset. This can be passed +into any Robot or Pipette method +location argument.

+
+
+
+ +
+ +
+
+

Simulation

+

opentrons.simulate: functions and entrypoints for simulating protocols

+

This module has functions that provide a console entrypoint for simulating +a protocol from the command line.

+
+
+opentrons.simulate.allow_bundle() bool
+

Check if bundling is allowed with a special not-exposed-to-the-app flag.

+

Returns True if the environment variable +OT_API_FF_allowBundleCreation is "1"

+
+ +
+
+opentrons.simulate.format_runlog(runlog: List[Mapping[str, Any]]) str
+

Format a run log (return value of simulate) into a +human-readable string

+
+
Parameters:
+

runlog – The output of a call to simulate

+
+
+
+ +
+
+opentrons.simulate.get_arguments(parser: argparse.ArgumentParser) argparse.ArgumentParser
+

Get the argument parser for this module

+

Useful if you want to use this module as a component of another CLI program +and want to add its arguments.

+
+
Parameters:
+

parser – A parser to add arguments to. If not specified, one will be created.

+
+
Returns argparse.ArgumentParser:
+

The parser with arguments added.

+
+
+
+ +
+
+opentrons.simulate.simulate(protocol_file: Union[BinaryIO, TextIO], file_name: Optional[str] = None, custom_labware_paths: Optional[List[str]] = None, custom_data_paths: Optional[List[str]] = None, propagate_logs: bool = False, hardware_simulator_file_path: Optional[str] = None, duration_estimator: Optional[opentrons.protocols.duration.estimator.DurationEstimator] = None, log_level: str = 'warning') Tuple[List[Mapping[str, Any]], Optional[opentrons.protocols.types.BundleContents]]
+

Simulate the protocol itself.

+

This is a one-stop function to simulate a protocol, whether Python or JSON, +no matter the API version, from external (i.e. not bound up in other +internal server infrastructure) sources.

+

To simulate an opentrons protocol from other places, pass in a file-like +object as protocol_file; this function either returns (if the simulation +has no problems) or raises an exception.

+

To call from the command line, use either the autogenerated entrypoint +opentrons_simulate (opentrons_simulate.exe, on windows) or +python -m opentrons.simulate.

+

The return value is the run log, a list of dicts that represent the +commands executed by the robot; and either the contents of the protocol +that would be required to bundle, or None.

+

Each dict element in the run log has the following keys:

+
+
    +
  • level: The depth at which this command is nested. If this an +aspirate inside a mix inside a transfer, for instance, it would be 3.

  • +
  • payload: The command. The human-readable run log text is available at +payload["text"]. The other keys of payload are command-dependent; +see opentrons.legacy_commands.

    +
    +

    Note

    +

    In older software versions, payload["text"] was a +format string. +To get human-readable text, you had to do payload["text"].format(**payload). +Don’t do that anymore. If payload["text"] happens to contain any +{ or } characters, it can confuse .format() and cause it to raise a +KeyError.

    +
    +
  • +
  • logs: Any log messages that occurred during execution of this +command, as a standard Python LogRecord.

  • +
+
+
+
Parameters:
+
    +
  • protocol_file – The protocol file to simulate.

  • +
  • file_name – The name of the file

  • +
  • custom_labware_paths – A list of directories to search for custom labware. +Loads valid labware from these paths and makes them available +to the protocol context. If this is None (the default), and +this function is called on a robot, it will look in the labware +subdirectory of the Jupyter data directory.

  • +
  • custom_data_paths – A list of directories or files to load custom +data files from. Ignored if the apiv2 feature +flag if not set. Entries may be either files or +directories. Specified files and the +non-recursive contents of specified directories +are presented by the protocol context in +protocol_api.ProtocolContext.bundled_data.

  • +
  • hardware_simulator_file_path – A path to a JSON file defining the simulated +hardware. This is mainly for internal use by Opentrons, and is not necessary +to simulate protocols.

  • +
  • duration_estimator – For internal use only. +Optional duration estimator object.

  • +
  • propagate_logs – Whether this function should allow logs from the +Opentrons stack to propagate up to the root handler. +This can be useful if you’re integrating this +function in a larger application, but most logs that +occur during protocol simulation are best associated +with the actions in the protocol that cause them. +Default: False

  • +
  • log_level – The level of logs to capture in the run log: +"debug", "info", "warning", or "error". +Defaults to "warning".

  • +
+
+
Returns:
+

A tuple of a run log for user output, and possibly the required +data to write to a bundle to bundle this protocol. The bundle is +only emitted if bundling is allowed +and this is an unbundled Protocol API +v2 python protocol. In other cases it is None.

+
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/atomic_commands.html b/api/docs/dist/v1/atomic_commands.html new file mode 100644 index 000000000000..8f70f8afbd1b --- /dev/null +++ b/api/docs/dist/v1/atomic_commands.html @@ -0,0 +1,1668 @@ + + + + + + + + + Atomic Liquid Handling — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+

Atomic Liquid Handling

+
+

Tip Handling

+

When we handle liquids with a pipette, we are constantly exchanging old, used tips for new ones to prevent cross-contamination between our wells. To help with this constant need, we describe in this section a few methods for getting new tips, and removing tips from a pipette.

+
+

This section demonstrates the options available for controlling tips

+
'''
+Examples in this section expect the following
+'''
+from opentrons import labware, instruments, robot
+
+tiprack = labware.load("opentrons_96_tiprack_300ul", "2")
+
+pipette = instruments.P300_Single(mount="left")
+
+
+
+

Pick Up Tip

+

Before any liquid handling can be done, your pipette must have a tip on it. The command pick_up_tip() will move the pipette over to the specified tip, the press down into it to create a vacuum seal. The below example picks up the tip at location "A1".

+
pipette.pick_up_tip(tiprack.wells("A1"))
+
+
+
+
+

Drop Tip

+

Once finished with a tip, the pipette will autonomously remove the tip when we call drop_tip(). We can specify where to drop the tip by passing in a location. The below example drops the tip back at its originating location on the tip rack. +If no location is specified, it will go to the fixed trash location on the deck.

+
pipette.drop_tip(tiprack.wells("A1"))
+
+
+

Instead of returning a tip to the tip rack, we can also drop it in an alternative trash container besides the fixed trash on the deck.

+
trash = labware.load("trash-box", "1")
+pipette.pick_up_tip(tiprack.wells("A2"))
+pipette.drop_tip(trash)
+
+
+
+
+

Return Tip

+

When we need to return the tip to its originating location on the tip rack, we can simply call return_tip(). The example below will automatically return the tip to "A3" on the tip rack.

+
pipette.pick_up_tip(tiprack.wells("A3"))
+pipette.return_tip()
+
+
+
+
+
+

Tips Iterating

+

Automatically iterate through tips and drop tip in trash by attaching containers to a pipette. +If no location is specified, the pipette will move to the next available tip by iterating through the tiprack that is associated with it.

+
'''
+Examples in this section expect the following
+'''
+from opentrons import labware, instruments, robot
+
+trash = labware.load("trash-box", "1")
+tip_rack_1 = containers.load("opentrons_96_tiprack_300ul", "2")
+tip_rack_2 = containers.load("opentrons_96_tiprack_300ul", "3")
+
+
+
+

Attach Tip Rack to Pipette

+

Tip racks and trash containers can be “attached” to a pipette when the pipette is created. This give the pipette the ability to automatically iterate through tips, and to automatically send the tip to the trash container.

+

Trash containers can be attached with the option trash_container=TRASH_CONTAINER.

+

Multiple tip racks are can be attached with the option tip_racks=[RACK_1, RACK_2, etc... ].

+
pipette = instruments.P300_Single(mount="left",
+                                  tip_racks=[tip_rack_1, tip_rack_2],
+                                  trash_container=trash)
+
+
+
+

Note

+

The tip_racks= option expects us to give it a Python list, containing each tip rack we want to attach. If we are only attaching one tip rack, then the list will have a length of one, like the following:

+

tip_racks=[tiprack]

+
+
+
+

Iterating Through Tips

+

Now that we have two tip racks attached to the pipette, we can automatically step through each tip whenever we call pick_up_tip(). We then have the option to either return_tip() to the tip rack, or we can drop_tip() to remove the tip in the attached trash container.

+
pipette.pick_up_tip()  # picks up tip_rack_1:A1
+pipette.return_tip()
+pipette.pick_up_tip()  # picks up tip_rack_1:A2
+pipette.drop_tip()     # automatically drops in trash
+
+# use loop to pick up tips tip_rack_1:A3 through tip_rack_2:H12
+tips_left = 94 + 96 # add up the number of tips leftover in both tipracks
+for _ in range(tips_left):
+    pipette.pick_up_tip()
+    pipette.return_tip()
+
+
+

If we try to pick_up_tip() again when all the tips have been used, the Opentrons API will show you an error.

+
+

Note

+

If you run the cell above, and then uncomment and run the cell below, you will get an error because the pipette is out of tips.

+
+
# this will raise an exception if run after the previous code block
+# pipette.pick_up_tip()
+
+
+
+
+

Reseting Tip Tracking

+

If you plan to change out tipracks during the protocol run, you must reset tip tracking to prevent any errors. This is done through pipette.reset() which resets the tipracks and sets the current volume back to 0 ul.

+
pipette.reset()
+
+
+
+
+

Select Starting Tip

+

Calls to pick_up_tip() will by default start at the attached tip rack’s "A1" location in order of tipracks listed. If you however want to start automatic tip iterating at a different tip, you can use start_at_tip().

+
pipette.start_at_tip(tip_rack_1.well("C3"))
+pipette.pick_up_tip()  # pick up C3 from "tip_rack_1"
+pipette.return_tip()
+
+
+
+
+

Get Current Tip

+

Get the source location of the pipette’s current tip by calling current_tip(). If the tip was from the "A1" position on our tip rack, current_tip() will return that position.

+
print(pipette.current_tip())  # is holding no tip
+
+pipette.pick_up_tip()
+print(pipette.current_tip())  # is holding the next available tip
+
+pipette.return_tip()
+print(pipette.current_tip())  # is holding no tip
+
+
+

will print out…

+
+
+
+
+
+

Liquid Control

+

This is the fun section, where we get to move things around and pipette! This section describes the Pipette object’s many liquid-handling commands, as well as how to move the robot. +Please note that the default now for pipette aspirate and dispense location is a 1mm offset from the bottom of the well now.

+
+
from opentrons import labware, instruments, robot
+
+'''
+Examples in this section expect the following:
+'''
+plate = labware.load("96-flat", "1")
+pipette = instruments.P300_Single(mount="left")
+pipette.pick_up_tip()
+
+
+
+

Aspirate

+

To aspirate is to pull liquid up into the pipette’s tip. When calling aspirate on a pipette, we can specify how many micoliters, and at which location, to draw liquid from:

+
pipette.aspirate(50, plate.wells("A1"))  # aspirate 50uL from plate:A1
+
+
+

Now our pipette’s tip is holding 50uL.

+

We can also simply specify how many microliters to aspirate, and not mention a location. The pipette in this circumstance will aspirate from it’s current location (which we previously set as plate.wells("A1")).

+
pipette.aspirate(50)                     # aspirate 50uL from current position
+
+
+

Now our pipette’s tip is holding 100uL.

+

We can also specify only the location to aspirate from. If we do not tell the pipette how many micoliters to aspirate, it will by default fill up the remaining volume in it’s tip. In this example, since we already have 100uL in the tip, the pipette will aspirate another 200uL

+
pipette.aspirate(plate.wells("A2"))      # aspirate until pipette fills from plate:A2
+
+
+
+
+

Dispense

+

To dispense is to push out liquid from the pipette’s tip. It’s usage in the Opentrons API is nearly identical to aspirate(), in that you can specify microliters and location, only microliters, or only a location:

+
pipette.dispense(50, plate.wells("B1")) # dispense 50uL to plate:B1
+pipette.dispense(50)                    # dispense 50uL to current position
+pipette.dispense(plate.wells("B2"))     # dispense until pipette empties to plate:B2
+
+
+

That final dispense without specifying a micoliter amount will dispense all remaining liquids in the tip to plate.wells("B2"), and now our pipette is empty.

+
+
+

Blow Out

+

To blow out is to push an extra amount of air through the pipette’s tip, so as to make sure that any remaining droplets are expelled.

+

When calling blow_out() on a pipette, we have the option to specify a location to blow out the remaining liquid. If no location is specified, the pipette will blow out from it’s current position.

+
pipette.blow_out()                  # blow out in current location
+pipette.blow_out(plate.wells("B3")) # blow out in current plate:B3
+
+
+
+
+

Touch Tip

+

To touch tip is to move the pipette’s currently attached tip to four opposite edges of a well, for the purpose of knocking off any droplets that might be hanging from the tip.

+

When calling touch_tip() on a pipette, we have the option to specify a location where the tip will touch the inner walls. If no location is specified, the pipette will touch tip inside it’s current location.

+
pipette.touch_tip()                  # touch tip within current location
+pipette.touch_tip(v_offset=-2)       # touch tip 2mm below the top of the current location
+pipette.touch_tip(plate.wells("B1")) # touch tip within plate:B1
+
+
+
+
+

Mix

+

Mixing is simply performing a series of aspirate() and dispense() commands in a row on a single location. However, instead of having to write those commands out every time, the Opentrons API allows you to simply say mix().

+

The mix command takes three arguments: mix(repetitions, volume, location)

+
pipette.mix(4, 100, plate.wells("A2"))   # mix 4 times, 100uL, in plate:A2
+pipette.mix(3, 50)                       # mix 3 times, 50uL, in current location
+pipette.mix(2)                           # mix 2 times, pipette's max volume, in current location
+
+
+
+
+

Air Gap

+

Some liquids need an extra amount of air in the pipette’s tip to prevent it from sliding out. A call to air_gap() with a microliter amount will aspirate that much air into the tip.

+
pipette.aspirate(100, plate.wells("B4"))
+pipette.air_gap(20)
+pipette.drop_tip()
+
+
+
+
from opentrons import labware, instruments, robot
+
+'''
+Examples in this section expect the following
+'''
+tiprack = labware.load("opentrons_96_tiprack_300ul", "1")
+plate = labware.load("96-flat", "2")
+
+pipette = instruments.P300_Single(mount="right", tip_racks=[tiprack])
+
+
+
+
+

Controlling Speed

+

You can change the speed at which you aspirate or dispense liquid by either changing the +defaults in the pipette constructor (more info under the Creating a Pipette section) or +using our set_flow_rate function. This can be called at any time during the protocol.

+
from opentrons import labware, instruments, robot
+
+'''
+Examples in this section expect the following
+'''
+tiprack = labware.load("opentrons_96_tiprack_300ul", "1")
+plate = labware.load("96-flat", "2")
+
+pipette = instruments.P300_Single(mount="right", tip_racks=[tiprack])
+
+pipette.set_flow_rate(aspirate=50, dispense=100)
+
+
+

You can also choose to only update aspirate OR dispense depending on the application. +Pipette liquid handling speed is in ul/s.

+

Note The dispense speed also controls the speed of blow_out.

+
+
+
+

Moving

+
+

Move To

+

Pipette’s are able to move_to() any location on the deck.

+

For example, we can move to the first tip in our tip rack:

+
pipette.move_to(tiprack.wells("A1"))
+
+
+

You can also specify at what height you would like the robot to move to inside of a location using top() and bottom() methods on that location.

+
pipette.move_to(plate.wells("A1").bottom())  # move to the bottom of well A1
+pipette.move_to(plate.wells("A1").top())     # move to the top of well A1
+pipette.move_to(plate.wells("A1").bottom(2)) # move to 2mm above the bottom of well A1
+pipette.move_to(plate.wells("A1").top(-2))   # move to 2mm below the top of well A1
+
+
+

The above commands will cause the robot’s head to first move upwards, then over to above the target location, then finally downwards until the target location is reached. If instead you would like the robot to move in a straight line to the target location, you can set the movement strategy to "direct".

+
pipette.move_to(plate.wells("A1"), strategy="direct")
+
+
+
+

Note

+

Moving with strategy="direct" will run the risk of colliding with things on your deck. Be very careful when using this option.

+
+

Usually the strategy="direct" option is useful when moving inside of a well. Take a look at the below sequence of movements, which first move the head to a well, and use “direct” movements inside that well, then finally move on to a different well.

+
pipette.move_to(plate.wells("A1"))
+pipette.move_to(plate.wells("A1").bottom(1), strategy="direct")
+pipette.move_to(plate.wells("A1").top(-2), strategy="direct")
+pipette.move_to(plate.wells("A1"))
+
+
+
+
+

Delay

+

To have your protocol pause for any given number of minutes or seconds, simply call delay() on your pipette. The value passed into delay() is the number of minutes or seconds the robot will wait until moving on to the next commands.

+
pipette.delay(seconds=2)             # pause for 2 seconds
+pipette.delay(minutes=5)             # pause for 5 minutes
+pipette.delay(minutes=5, seconds=2)  # pause for 5 minutes and 2 seconds
+
+
+
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/complex_commands.html b/api/docs/dist/v1/complex_commands.html new file mode 100644 index 000000000000..715090149832 --- /dev/null +++ b/api/docs/dist/v1/complex_commands.html @@ -0,0 +1,2022 @@ + + + + + + + + + Complex Liquid Handling — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+

Complex Liquid Handling

+

The examples below will use the following set-up:

+
from opentrons import robot, labware, instruments
+
+plate = labware.load("96-flat", "1")
+
+tiprack = labware.load("opentrons_96_tiprack_300ul", "2")
+
+pipette = instruments.P300_Single(
+    mount="left",
+    tip_racks=[tiprack])
+
+
+

You could simulate the protocol using our protocol simulator, which can be installed by following the instructions here.

+
+
+

Transfer

+

Most of time, a protocol is really just looping over some wells, aspirating, and then dispensing. Even though they are simple in nature, these loops take up a lot of space. The pipette.transfer() command takes care of those common loops. It will combine aspirates and dispenses automatically, making your protocol easier to read and edit. +For transferring with a multi-channel, please refer to the Multi-Channel Pipettes and Complex Liquid Handling section.

+
+

Basic

+

The example below will transfer 100 uL from well "A1" to well "B1", automatically picking up a new tip and then disposing it when finished.

+
pipette.transfer(100, plate.wells("A1"), plate.wells("B1"))
+
+
+

Transfer commands will automatically create entire series of aspirate(), dispense(), and other Pipette commands.

+
+
+

Large Volumes

+

Volumes larger than the pipette’s max_volume will automatically divide into smaller transfers.

+
pipette.transfer(700, plate.wells("A2"), plate.wells("B2"))
+
+
+

will have the steps…

+
Transferring 700 from well A2 in "1" to well B2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 300.0 uL from well A2 in "1" at 1 speed
+Dispensing 300.0 uL into well B2 in "1"
+Aspirating 200.0 uL from well A2 in "1" at 1 speed
+Dispensing 200.0 uL into well B2 in "1"
+Aspirating 200.0 uL from well A2 in "1" at 1 speed
+Dispensing 200.0 uL into well B2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Multiple Wells

+

Transfer commands are most useful when moving liquid between multiple wells.

+
pipette.transfer(100, plate.cols("1"), plate.cols("2"))
+
+
+

will have the steps…

+
Transferring 100 from wells A1...H1 in "1" to wells A2...H2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well A2 in "1"
+Aspirating 100.0 uL from well B1 in "1" at 1 speed
+Dispensing 100.0 uL into well B2 in "1"
+Aspirating 100.0 uL from well C1 in "1" at 1 speed
+Dispensing 100.0 uL into well C2 in "1"
+Aspirating 100.0 uL from well D1 in "1" at 1 speed
+Dispensing 100.0 uL into well D2 in "1"
+Aspirating 100.0 uL from well E1 in "1" at 1 speed
+Dispensing 100.0 uL into well E2 in "1"
+Aspirating 100.0 uL from well F1 in "1" at 1 speed
+Dispensing 100.0 uL into well F2 in "1"
+Aspirating 100.0 uL from well G1 in "1" at 1 speed
+Dispensing 100.0 uL into well G2 in "1"
+Aspirating 100.0 uL from well H1 in "1" at 1 speed
+Dispensing 100.0 uL into well H2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

One to Many

+

You can transfer from a single source to multiple destinations, and the other way around (many sources to one destination).

+
pipette.transfer(100, plate.wells("A1"), plate.cols("2"))
+
+
+

will have the steps…

+
Transferring 100 from well A1 in "1" to wells A2...H2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well A2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well C2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well D2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well E2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well F2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well G2 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well H2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Few to Many

+

What happens if, for example, you tell your pipette to transfer from 2 source wells to 4 destination wells? The transfer command will attempt to divide the wells evenly, or raise an error if the number of wells aren’t divisible.

+
pipette.transfer(
+    100,
+    plate.wells("A1", "A2"),
+    plate.wells("B1", "B2", "B3", "B4"))
+
+
+

will have the steps…

+
Transferring 100 from wells A1...A2 in "1" to wells B1...B4 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B1 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B2 in "1"
+Aspirating 100.0 uL from well A2 in "1" at 1 speed
+Dispensing 100.0 uL into well B3 in "1"
+Aspirating 100.0 uL from well A2 in "1" at 1 speed
+Dispensing 100.0 uL into well B4 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

List of Volumes

+

Instead of applying a single volume amount to all source/destination wells, you can instead pass a list of volumes.

+
pipette.transfer(
+    [20, 40, 60],
+    plate.wells("A1"),
+    plate.wells("B1", "B2", "B3"))
+
+
+

will have the steps…

+
Transferring [20, 40, 60] from well A1 in "1" to wells B1...B3 in "1"
+Picking up tip well A1 in "2"
+Aspirating 20.0 uL from well A1 in "1" at 1 speed
+Dispensing 20.0 uL into well B1 in "1"
+Aspirating 40.0 uL from well A1 in "1" at 1 speed
+Dispensing 40.0 uL into well B2 in "1"
+Aspirating 60.0 uL from well A1 in "1" at 1 speed
+Dispensing 60.0 uL into well B3 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Volume Gradient

+

Create a linear gradient between a start and ending volume (uL). The start and ending volumes must be the first and second elements of a tuple.

+
pipette.transfer(
+    (100, 30),
+    plate.wells("A1"),
+    plate.cols("2"))
+
+
+

will have the steps…

+
Transferring (100, 30) from well A1 in "1" to wells A2...H2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well A2 in "1"
+Aspirating 90.0 uL from well A1 in "1" at 1 speed
+Dispensing 90.0 uL into well B2 in "1"
+Aspirating 80.0 uL from well A1 in "1" at 1 speed
+Dispensing 80.0 uL into well C2 in "1"
+Aspirating 70.0 uL from well A1 in "1" at 1 speed
+Dispensing 70.0 uL into well D2 in "1"
+Aspirating 60.0 uL from well A1 in "1" at 1 speed
+Dispensing 60.0 uL into well E2 in "1"
+Aspirating 50.0 uL from well A1 in "1" at 1 speed
+Dispensing 50.0 uL into well F2 in "1"
+Aspirating 40.0 uL from well A1 in "1" at 1 speed
+Dispensing 40.0 uL into well G2 in "1"
+Aspirating 30.0 uL from well A1 in "1" at 1 speed
+Dispensing 30.0 uL into well H2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+
+
+

Distribute and Consolidate

+

Save time and tips with the distribute() and consolidate() commands. These are nearly identical to transfer(), except that they will combine multiple transfer’s into a single tip.

+
+

Consolidate

+

Volumes going to the same destination well are combined within the same tip, so that multiple aspirates can be combined to a single dispense.

+
pipette.consolidate(30, plate.cols("2"), plate.wells("A1"))
+
+
+

will have the steps…

+
Consolidating 30 from wells A2...H2 in "1" to well A1 in "1"
+Transferring 30 from wells A2...H2 in "1" to well A1 in "1"
+Picking up tip well A1 in "2"
+Aspirating 30.0 uL from well A2 in "1" at 1 speed
+Aspirating 30.0 uL from well B2 in "1" at 1 speed
+Aspirating 30.0 uL from well C2 in "1" at 1 speed
+Aspirating 30.0 uL from well D2 in "1" at 1 speed
+Aspirating 30.0 uL from well E2 in "1" at 1 speed
+Aspirating 30.0 uL from well F2 in "1" at 1 speed
+Aspirating 30.0 uL from well G2 in "1" at 1 speed
+Aspirating 30.0 uL from well H2 in "1" at 1 speed
+Dispensing 240.0 uL into well A1 in "1"
+Dropping tip well A1 in "12"
+
+
+

If there are multiple destination wells, the pipette will never combine their volumes into the same tip.

+
pipette.consolidate(30, plate.cols("1"), plate.wells("A1", "A2"))
+
+
+

will have the steps…

+
Consolidating 30 from wells A1...H1 in "1" to wells A1...A2 in "1"
+Transferring 30 from wells A1...H1 in "1" to wells A1...A2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 30.0 uL from well A1 in "1" at 1 speed
+Aspirating 30.0 uL from well B1 in "1" at 1 speed
+Aspirating 30.0 uL from well C1 in "1" at 1 speed
+Aspirating 30.0 uL from well D1 in "1" at 1 speed
+Dispensing 120.0 uL into well A1 in "1"
+Aspirating 30.0 uL from well E1 in "1" at 1 speed
+Aspirating 30.0 uL from well F1 in "1" at 1 speed
+Aspirating 30.0 uL from well G1 in "1" at 1 speed
+Aspirating 30.0 uL from well H1 in "1" at 1 speed
+Dispensing 120.0 uL into well A2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Distribute

+

Volumes from the same source well are combined within the same tip, so that one aspirate can provide for multiple dispenses.

+
pipette.distribute(55, plate.wells("A1"), plate.rows("A"))
+
+
+

will have the steps…

+
Distributing 55 from well A1 in "1" to wells A1...A12 in "1"
+Transferring 55 from well A1 in "1" to wells A1...A12 in "1"
+Picking up tip well A1 in "2"
+Aspirating 250.0 uL from well A1 in "1" at 1 speed
+Dispensing 55.0 uL into well A1 in "1"
+Dispensing 55.0 uL into well A2 in "1"
+Dispensing 55.0 uL into well A3 in "1"
+Dispensing 55.0 uL into well A4 in "1"
+Blowing out at well A1 in "12"
+Aspirating 250.0 uL from well A1 in "1" at 1 speed
+Dispensing 55.0 uL into well A5 in "1"
+Dispensing 55.0 uL into well A6 in "1"
+Dispensing 55.0 uL into well A7 in "1"
+Dispensing 55.0 uL into well A8 in "1"
+Blowing out at well A1 in "12"
+Aspirating 250.0 uL from well A1 in "1" at 1 speed
+Dispensing 55.0 uL into well A9 in "1"
+Dispensing 55.0 uL into well A10 in "1"
+Dispensing 55.0 uL into well A11 in "1"
+Dispensing 55.0 uL into well A12 in "1"
+Blowing out at well A1 in "12"
+Dropping tip well A1 in "12"
+
+
+

If there are multiple source wells, the pipette will never combine their volumes into the same tip.

+
pipette.distribute(30, plate.wells("A1", "A2"), plate.rows("A"))
+
+
+

will have the steps…

+
Distributing 30 from wells A1...A2 in "1" to wells A1...A12 in "1"
+Transferring 30 from wells A1...A2 in "1" to wells A1...A12 in "1"
+Picking up tip well A1 in "2"
+Aspirating 210.0 uL from well A1 in "1" at 1 speed
+Dispensing 30.0 uL into well A1 in "1"
+Dispensing 30.0 uL into well A2 in "1"
+Dispensing 30.0 uL into well A3 in "1"
+Dispensing 30.0 uL into well A4 in "1"
+Dispensing 30.0 uL into well A5 in "1"
+Dispensing 30.0 uL into well A6 in "1"
+Blowing out at well A1 in "12"
+Aspirating 210.0 uL from well A2 in "1" at 1 speed
+Dispensing 30.0 uL into well A7 in "1"
+Dispensing 30.0 uL into well A8 in "1"
+Dispensing 30.0 uL into well A9 in "1"
+Dispensing 30.0 uL into well A10 in "1"
+Dispensing 30.0 uL into well A11 in "1"
+Dispensing 30.0 uL into well A12 in "1"
+Blowing out at well A1 in "12"
+Dropping tip well A1 in "12"
+
+
+
+
+

Disposal Volume

+

When dispensing multiple times from the same tip, it is recommended to aspirate an extra amount of liquid to be disposed of after distributing. This added disposal_vol can be set as an optional argument. There is a default disposal volume (equal to the pipette’s minimum volume), which will be blown out at the trash after the dispenses.

+
pipette.distribute(
+    30,
+    plate.wells("A1", "A2"),
+    plate.cols("2"),
+    disposal_vol=10)   # include extra liquid to make dispenses more accurate
+
+
+

will have the steps…

+
Distributing 30 from wells A1...A2 in "1" to wells A2...H2 in "1"
+Transferring 30 from wells A1...A2 in "1" to wells A2...H2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 130.0 uL from well A1 in "1" at 1 speed
+Dispensing 30.0 uL into well A2 in "1"
+Dispensing 30.0 uL into well B2 in "1"
+Dispensing 30.0 uL into well C2 in "1"
+Dispensing 30.0 uL into well D2 in "1"
+Blowing out at well A1 in "12"
+Aspirating 130.0 uL from well A2 in "1" at 1 speed
+Dispensing 30.0 uL into well E2 in "1"
+Dispensing 30.0 uL into well F2 in "1"
+Dispensing 30.0 uL into well G2 in "1"
+Dispensing 30.0 uL into well H2 in "1"
+Blowing out at well A1 in "12"
+Dropping tip well A1 in "12"
+
+
+
+
+
+
+

Transfer Options

+

There are other options for customizing your transfer command:

+
+

Always Get a New Tip

+

Transfer commands will by default use the same one tip for each well, then finally drop it in the trash once finished.

+

The pipette can optionally get a new tip at the beginning of each aspirate, to help avoid cross contamination.

+
pipette.transfer(
+    100,
+    plate.wells("A1", "A2", "A3"),
+    plate.wells("B1", "B2", "B3"),
+    new_tip="always")    # always pick up a new tip
+
+
+

will have the steps…

+
Transferring 100 from wells A1...A3 in "1" to wells B1...B3 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B1 in "1"
+Dropping tip well A1 in "12"
+Picking up tip well B1 in "2"
+Aspirating 100.0 uL from well A2 in "1" at 1 speed
+Dispensing 100.0 uL into well B2 in "1"
+Dropping tip well A1 in "12"
+Picking up tip well C1 in "2"
+Aspirating 100.0 uL from well A3 in "1" at 1 speed
+Dispensing 100.0 uL into well B3 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Never Get a New Tip

+

For scenarios where you instead are calling pick_up_tip() and drop_tip() elsewhere in your protocol, the transfer command can ignore picking up or dropping tips.

+
pipette.pick_up_tip()
+...
+pipette.transfer(
+    100,
+    plate.wells("A1", "A2", "A3"),
+    plate.wells("B1", "B2", "B3"),
+    new_tip="never")    # never pick up or drop a tip
+...
+pipette.drop_tip()
+
+
+

will have the steps…

+
Picking up tip well A1 in "2"
+...
+Transferring 100 from wells A1...A3 in "1" to wells B1...B3 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B1 in "1"
+Aspirating 100.0 uL from well A2 in "1" at 1 speed
+Dispensing 100.0 uL into well B2 in "1"
+Aspirating 100.0 uL from well A3 in "1" at 1 speed
+Dispensing 100.0 uL into well B3 in "1"
+...
+Dropping tip well A1 in "12"
+
+
+
+
+

Use One Tip

+

The default behavior of complex commands is to use one tip:

+
pipette.transfer(
+    100,
+    plate.wells("A1", "A2", "A3"),
+    plate.wells("B1", "B2", "B3"),
+    new_tip="once")    # use one tip (default behavior)
+
+
+

will have the steps…

+
Transferring 100 from wells A1...A3 in "1" to wells B1...B3 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B1 in "1"
+Aspirating 100.0 uL from well A2 in "1" at 1 speed
+Dispensing 100.0 uL into well B2 in "1"
+Aspirating 100.0 uL from well A3 in "1" at 1 speed
+Dispensing 100.0 uL into well B3 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Trash or Return Tip

+

By default, the transfer command will drop the pipette’s tips in the trash container. However, if you wish to instead return the tip to it’s tip rack, you can set trash=False.

+
pipette.transfer(
+    100,
+    plate.wells("A1"),
+    plate.wells("B1"),
+    trash=False)       # do not trash tip
+
+
+

will have the steps…

+
Transferring 100 from well A1 in "1" to well B1 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well B1 in "1"
+Returning tip
+Dropping tip well A1 in "2"
+
+
+
+
+

Touch Tip

+

A touch-tip can be performed after every aspirate and dispense by setting touch_tip=True.

+
pipette.transfer(
+    100,
+    plate.wells("A1"),
+    plate.wells("A2"),
+    touch_tip=True)     # touch tip to each well's edge
+
+
+

will have the steps…

+
Transferring 100 from well A1 in "1" to well A2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Touching tip
+Dispensing 100.0 uL into well A2 in "1"
+Touching tip
+Dropping tip well A1 in "12"
+
+
+
+
+

Blow Out

+

A blow-out can be performed after every dispense that leaves the tip empty by setting blow_out=True.

+
pipette.transfer(
+    100,
+    plate.wells("A1"),
+    plate.wells("A2"),
+    blow_out=True)      # blow out droplets when tip is empty
+
+
+

will have the steps…

+
Transferring 100 from well A1 in "1" to well A2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well A2 in "1"
+Blowing out
+Dropping tip well A1 in "12"
+
+
+
+
+

Mix Before/After

+

A mix can be performed before every aspirate by setting mix_before=. The value of mix_before= must be a tuple, the 1st value is the number of repetitions, the 2nd value is the amount of liquid to mix.

+
pipette.transfer(
+    100,
+    plate.wells("A1"),
+    plate.wells("A2"),
+    mix_before=(2, 50), # mix 2 times with 50uL before aspirating
+    mix_after=(3, 75))  # mix 3 times with 75uL after dispensing
+
+
+

will have the steps…

+
Transferring 100 from well A1 in "1" to well A2 in "1"
+Picking up tip well A1 in "2"
+Mixing 2 times with a volume of 50ul
+Aspirating 50 uL from well A1 in "1" at 1.0 speed
+Dispensing 50 uL into well A1 in "1"
+Aspirating 50 uL from well A1 in "1" at 1.0 speed
+Dispensing 50 uL into well A1 in "1"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Dispensing 100.0 uL into well A2 in "1"
+Mixing 3 times with a volume of 75ul
+Aspirating 75 uL from well A2 in "1" at 1.0 speed
+Dispensing 75.0 uL into well A2 in "1"
+Aspirating 75 uL from well A2 in "1" at 1.0 speed
+Dispensing 75.0 uL into well A2 in "1"
+Aspirating 75 uL from well A2 in "1" at 1.0 speed
+Dispensing 75.0 uL into well A2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+

Air Gap

+

An air gap can be performed after every aspirate by setting air_gap=int, where the value is the volume of air in microliters to aspirate after aspirating the liquid.

+
pipette.transfer(
+    100,
+    plate.wells("A1"),
+    plate.wells("A2"),
+    air_gap=20)         # add 20uL of air after each aspirate
+
+
+

will have the steps…

+
Transferring 100 from well A1 in "1" to well A2 in "1"
+Picking up tip well A1 in "2"
+Aspirating 100.0 uL from well A1 in "1" at 1 speed
+Air gap
+Aspirating 20 uL from well A1 in "1" at 1.0 speed
+Dispensing 20 uL into well A2 in "1"
+Dispensing 100.0 uL into well A2 in "1"
+Dropping tip well A1 in "12"
+
+
+
+
+
+

Multi-Channel Pipettes and Complex Liquid Handling

+

When the robot is determining positioning for a multi-channel pipette, it uses +the back-nozzle (A1 channel) to move to the plate. While considering which +wells you should input into your complex function, always keep in mind that +you should determine the multi-channel position via the back-nozzle position.

+

We will be using the code-block below to perform our examples.

+
from opentrons import robot, labware, instruments
+
+plate_96 = labware.load("96-flat", "1")
+plate_384 = labware.load("384-plate", "3")
+trough = labware.load("trough-12row", "4")
+
+tiprack = labware.load("opentrons_96_tiprack_300ul", "2")
+
+multi_pipette = instruments.P300_Multi(
+    mount="left",
+    tip_racks=[tiprack])
+
+
+
+

Transfer in a 96 Well Plate

+

If you want to move across a 96 well plate using a multi-channel you can do the +following:

+
multi_pipette.transfer(50, plate_96.columns("1"), plate_96.columns("2", to="12"))
+
+
+

will have the steps

+
Transferring 50 from well A1 in "3" to wells A2...H12 in "3"
+Picking up tip wells A1...H1 in "4"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A2...H2 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A3...H3 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A4...H4 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A5...H5 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A6...H6 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A7...H7 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A8...H8 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A9...H9 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A10...H10 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A11...H11 in "3"
+Aspirating 50.0 uL from wells A1...H1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A12...H12 in "3"
+Dropping tip well A1 in "12"
+
+
+

or

+
multi_pipette.transfer(50, plate_96.wells("A1"), plate_96.columns("2", to="12"))
+
+
+

will have the steps

+
Transferring 50 from well A1 in "3" to wells A2...H12 in "3"
+Picking up tip wells A1...H1 in "4"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A2...H2 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A3...H3 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A4...H4 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A5...H5 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A6...H6 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A7...H7 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A8...H8 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A9...H9 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A10...H10 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A11...H11 in "3"
+Aspirating 50.0 uL from well A1 in "3" at 1 speed
+Dispensing 50.0 uL into wells A12...H12 in "3"
+Dropping tip well A1 in "12"
+
+
+
+

Note

+

The following scenarios may not work as you expect them to.

+
multi_pipette.transfer(50, plate_96.wells("A1"), plate_96.wells())
+
+
+

The multi-channel would visit every well in the plate and dispense liquid +outside of the plate boundaries so be careful!

+
multi_pipette.transfer(50, plate_96.wells("A1"), plate_96.rows("A"))
+
+
+

In this scenario, the multi-channel would only visit the first column of the plate.

+
+
+
+

Transfer in a 384 Well Plate

+

In a 384 Well plate, there are 2 sets of “columns” that the multi-channel can +dispense into [“A1”, “C1”…”A2”, “C2”…] and [“B1”, “D1”…”B2”, “D2”].

+

If you want to transfer to a 384 well plate in order, you can do:

+
alternating_wells = []
+for row in plate_384.rows():
+    alternating_wells.append(row.wells("A"))
+    alternating_wells.append(row.wells("B"))
+multi_pipette.transfer(50, trough.wells("A1"), alternating_wells)
+
+
+

or you can choose to dispense by row first, moving first through row A +and then through row B of the 384 well plate.

+
list_of_wells = [for well in plate_384.rows("A")] + [for well in plate_384.rows("B")]
+multi_pipette.transfer(50, trough.wells("A1"), list_of_wells)
+
+
+
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/examples.html b/api/docs/dist/v1/examples.html new file mode 100644 index 000000000000..fe101d72aa1d --- /dev/null +++ b/api/docs/dist/v1/examples.html @@ -0,0 +1,1518 @@ + + + + + + + + + Examples — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+

Examples

+

All examples on this page assume the following labware and pipette:

+
from opentrons import robot, labware, instruments
+
+plate = labware.load("96-flat", "1")
+trough = labware.load("trough-12row", "2")
+
+tiprack_1 = labware.load("opentrons_96_tiprack_300ul", "3")
+tiprack_2 = labware.load("opentrons_96_tiprack_300ul", "4")
+
+p300 = instruments.P300_Single(
+    mount="left",
+    tip_racks=[tiprack_2])
+
+
+
+
+

Basic Transfer

+

Moving 100uL from one well to another:

+
p300.transfer(100, plate.wells("A1"), plate.wells("B1"))
+
+
+

If you prefer to not use the .transfer() command, the following pipette commands will create the some results:

+
p300.pick_up_tip()
+p300.aspirate(100, plate.wells("A1"))
+p300.dispense(100, plate.wells("A1"))
+p300.return_tip()
+
+
+
+
+
+

Loops

+

Loops in Python allows your protocol to perform many actions, or act upon many wells, all within just a few lines. The below example loops through the numbers 0 to 11, and uses that loop’s current value to transfer from all wells in a trough to each row of a plate:

+
# distribute 20uL from trough:A1 -> plate:row:1
+# distribute 20uL from trough:A2 -> plate:row:2
+# etc...
+
+# ranges() starts at 0 and stops at 12, creating a range of 0-11
+for i in range(12):
+  p300.distribute(200, trough.wells(i), plate.rows(i))
+
+
+
+
+
+

Multiple Air Gaps

+

The Opentrons liquid handler can do some things that a human cannot do with a pipette, like accurately alternate between aspirating and creating air gaps within the same tip. The below example will aspirate from five wells in the trough, while creating a air gap between each sample.

+
p300.pick_up_tip()
+
+for well in trough.wells():
+  p300.aspirate(35, well).air_gap(10)
+
+p300.dispense(plate.wells("A1"))
+
+p300.return_tip()
+
+
+
+
+
+

Dilution

+

This example first spreads a dilutent to all wells of a plate. It then dilutes 8 samples from the trough across the 8 columns of the plate.

+
p300.distribute(50, trough.wells("A12"), plate.wells())  # dilutent
+
+# loop through each row
+for i in range(8):
+
+  # save the source well and destination column to variables
+  source = trough.wells(i)
+  row = plate.rows(i)
+
+  # transfer 30uL of source to first well in column
+  p300.transfer(30, source, column.wells("1"))
+
+  # dilute the sample down the column
+  p300.transfer(
+    30, row.wells("1", to="11"), row.wells("2", to="12"),
+    mix_after=(3, 25))
+
+
+
+
+
+

Plate Mapping

+

Deposit various volumes of liquids into the same plate of wells, and automatically refill the tip volume when it runs out.

+
# these uL values were created randomly for this example
+water_volumes = [
+  1,  2,  3,  4,  5,  6,  7,  8,
+  9,  10, 11, 12, 13, 14, 15, 16,
+  17, 18, 19, 20, 21, 22, 23, 24,
+  25, 26, 27, 28, 29, 30, 31, 32,
+  33, 34, 35, 36, 37, 38, 39, 40,
+  41, 42, 43, 44, 45, 46, 47, 48,
+  49, 50, 51, 52, 53, 54, 55, 56,
+  57, 58, 59, 60, 61, 62, 63, 64,
+  65, 66, 67, 68, 69, 70, 71, 72,
+  73, 74, 75, 76, 77, 78, 79, 80,
+  81, 82, 83, 84, 85, 86, 87, 88,
+  89, 90, 91, 92, 93, 94, 95, 96
+]
+
+p300.distribute(water_volumes, trough.wells("A12"), plate)
+
+
+

The final volumes can also be read from a CSV, and opened by your protocol.

+
'''
+  This example uses a CSV file saved on the same computer, formatted as follows,
+  where the columns in the file represent the 12 columns of the plate,
+  and the rows in the file represent the 8 rows of the plate,
+  and the values represent the uL that must end up at that location
+
+  1,  2,  3,  4,  5,  6,  7,  8, 9,  10, 11, 12,
+  13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+  25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+  37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+  49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+  61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+  73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+  85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96
+'''
+
+# open file with absolute path (will be different depending on operating system)
+# file paths on Windows look more like 'C:\\path\\to\\your\\csv_file.csv'
+with open("/path/to/your/csv_file.csv") as my_file:
+
+    # save all volumes from CSV file into a list
+    volumes = []
+
+    # loop through each line (the plate's columns)
+    for l in my_file.read().splitlines():
+        # loop through each comma-separated value (the plate's rows)
+        for v in l.split(","):
+            volumes.append(float(v))  # save the volume
+
+    # distribute those volumes to the plate
+    p300.distribute(volumes, trough.wells("A1"), plate.wells())
+
+
+
+
+
+

Precision Pipetting

+

This example shows how to deposit liquid around the edge of a well using +Placeable.from_center() to specify locations within a well.

+
p300.pick_up_tip()
+p300.aspirate(200, trough.wells("A1"))
+# rotate around the edge of the well, dropping 20ul at a time
+theta = 0.0
+while p300.current_volume > 0:
+    # we can move around a circle with radius (r) and theta (degrees)
+    well_edge = plate.wells("B1").from_center(r=1.0, theta=theta, h=0.9)
+
+    # combine a Well with a Vector in a tuple
+    destination = (plate.wells("B1"), well_edge)
+    p300.move_to(destination, strategy="direct")  # move straight there
+    p300.dispense(20)
+
+    theta += 0.314
+
+p300.drop_tip()
+
+
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/genindex.html b/api/docs/dist/v1/genindex.html new file mode 100644 index 000000000000..5ae5b830a355 --- /dev/null +++ b/api/docs/dist/v1/genindex.html @@ -0,0 +1,1579 @@ + + + + + + + + Index — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + + +

Index

+ +
+ A + | B + | C + | D + | F + | G + | H + | I + | M + | O + | P + | R + | S + | T + +
+

A

+
+ + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + +
    +
  • + instruments + +
  • +
+ +

M

+ + + +
+ +

O

+ + + +
    +
  • + opentrons + +
  • +
    +
  • + opentrons.simulate + +
  • +
+ +

P

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/hardware_control.html b/api/docs/dist/v1/hardware_control.html new file mode 100644 index 000000000000..d6922df275aa --- /dev/null +++ b/api/docs/dist/v1/hardware_control.html @@ -0,0 +1,1489 @@ + + + + + + + + + Advanced Control — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
from opentrons import robot
+robot.reset()
+
+
+
+

Advanced Control

+
+

Note

+

The below features are designed for advanced users who wish to use the Opentrons API in their own Python environment (ie Jupyter). This page is not relevant for users only using the Opentrons App, because the features described below will not be accessible.

+
+

The robot module can be thought of as the parent for all aspects of the Opentrons API. All containers, instruments, and protocol commands are added to and controlled by robot.

+
'''
+Examples in this section require the following
+'''
+from opentrons import robot, labware, instruments
+
+plate = labware.load("96-flat", "B1", "my-plate")
+tiprack = labware.load("opentrons_96_tiprack_300ul", "A1", "my-rack")
+
+pipette = instruments.P300_Single(mount="left", tip_racks=[tiprack])
+
+
+
+

User-Specified Pause

+

This will pause your protocol at a specific step. You can resume by pressing “resume” in your OT App.

+
robot.pause()
+
+
+
+
+

Head Speed

+

The speed of the robot’s motors can be set using robot.head_speed(). The units are all millimeters-per-second (mm/sec). The x, y, z, a, b, c parameters set the maximum speed of the corresponding axis on Smoothie.

+

“x”: lateral motion, “y”: front to back motion, “z”: vertical motion of the left mount, “a”: vertical motion of the right mount, “b”: plunger motor for the left pipette, “c”: plunger motor for the right pipette.

+

The combined_speed parameter sets the speed across all axes to either the specified value or the axis max, whichever is lower. Defaults are specified by DEFAULT_MAX_SPEEDS in robot_configs.py.

+
max_speed_per_axis = {
+    "x": 600, "y": 400, "z": 125, "a": 125, "b": 50, "c": 50}
+robot.head_speed(
+    combined_speed=max(max_speed_per_axis.values()),
+    **max_speed_per_axis)
+
+
+
+
+

Homing

+

You can home the robot by calling home(). You can also specify axes. The robot will home immdediately when this call is made.

+
robot.home()           # home the robot on all axis
+robot.home("z")        # home the Z axis only
+
+
+
+
+

Commands

+

When commands are called on a pipette, they are recorded on the robot in the order they are called. You can see all past executed commands by calling robot.commands(), which returns a Python list.

+
pipette.pick_up_tip(tiprack.wells("A1"))
+pipette.drop_tip(tiprack.wells("A1"))
+
+for c in robot.commands():
+    print(c)
+
+
+

will print out…

+
Picking up tip <Well A1>
+Dropping tip <Well A1>
+
+
+
+
+

Clear Commands

+

We can erase the robot command history by calling robot.clear_commands(). Any previously created instruments and containers will still be inside robot, but the commands history is erased.

+
robot.clear_commands()
+pipette.pick_up_tip(tiprack["A1"])
+print("There is", len(robot.commands()), "command")
+
+robot.clear_commands()
+print("There are now", len(robot.commands()), "commands")
+
+
+

will print out…

+
There is 1 command
+There are now 0 commands
+
+
+
+
+

Comment

+

You can add a custom message to the list of command descriptions you see when running robot.commands(). This command is robot.comment(), and it allows you to print out any information you want at the point in your protocol

+
robot.clear_commands()
+
+pipette.pick_up_tip(tiprack["A1"])
+robot.comment("Hello, just picked up tip A1")
+
+pipette.pick_up_tip(tiprack["A1"])
+robot.comment("Goodbye, just dropped tip A1")
+
+for c in robot.commands():
+    print(c)
+
+
+

will print out…

+
Picking up tip <Well A1>
+Hello, just picked up tip A1
+Picking up tip <Well A1>
+Goodbye, just dropped tip A1
+
+
+
+
+

Get Containers

+

When containers are loaded, they are automatically added to the robot. You can see all currently held containers by calling robot.get_containers(), which returns a Python list.

+
for container in robot.get_containers():
+    print(container.get_name(), container.get_type())
+
+
+

will print out…

+
my-rack opentrons_96_tiprack_300ul
+my-plate 96-flat
+
+
+
+
+

Reset

+

Calling robot.reset() will remove everything from the robot. Any previously added containers, pipettes, or commands will be erased.

+
robot.reset()
+print(robot.get_containers())
+print(robot.commands())
+
+
+

will print out…

+
[]
+[]
+[]
+
+
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/index.html b/api/docs/dist/v1/index.html new file mode 100644 index 000000000000..068c933cf425 --- /dev/null +++ b/api/docs/dist/v1/index.html @@ -0,0 +1,1654 @@ + + + + + + + + + OT-2 Python API Version 1 — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + + +
+

OT-2 Python API Version 1

+

The Opentrons API is a simple Python framework designed to make writing automated biology lab protocols easy.

+

We’ve designed it in a way we hope is accessible to anyone with basic Python and wetlab skills. As a bench scientist, you should be able to code your automated protocols in a way that reads like a lab notebook.

+
+
+

Getting Started

+

New to Python? Check out our Using Python In Protocols page first before continuing. To get a sense of the typical structure of our scripts, take a look at our Examples page.

+

Our API requires Python version 3.7.6 or later. Once this is set up on your computer, you can simply use pip to install the Opentrons package.

+
pip install opentrons
+
+
+

To simulate protocols on your laptop, check out Simulating Your Scripts. When you’re ready to run your script on a robot, download our latest desktop app

+
+
+

Troubleshooting

+

If you encounter problems using our products please take a look at our support docs or contact our team via intercom on our website at opentrons.com.

+
+
+
+

Overview

+
+

How it Looks

+

The design goal of the Opentrons API is to make code readable and easy to understand. For example, below is a short set of instruction to transfer from well "A1" to well "B1" that even a computer could understand:

+
Use the Opentrons API's labware and instruments
+
+This protocol is by me; it’s called Opentrons Protocol Tutorial and is used for demonstrating the Opentrons API
+
+Add a 96 well plate, and place it in slot "2" of the robot deck
+Add a 200uL tip rack, and place it in slot "1" of the robot deck
+
+Add a single-channel 300uL pipette to the left mount, and tell it to use that tip rack
+
+Transfer 100uL from the plate's "A1" well to it's "B2" well
+
+
+

If we were to rewrite this with the Opentrons API, it would look like the following:

+
# imports
+from opentrons import labware, instruments
+
+# metadata
+metadata = {
+    "protocolName": "My Protocol",
+    "author": "Name <email@address.com>",
+    "description": "Simple protocol to get started using OT2",
+}
+
+# labware
+plate = labware.load("96-flat", "2")
+tiprack = labware.load("opentrons_96_tiprack_300ul", "1")
+
+# pipettes
+pipette = instruments.P300_Single(mount="left", tip_racks=[tiprack])
+
+# commands
+pipette.transfer(100, plate.wells("A1"), plate.wells("B2"))
+
+
+
+
+

How it’s Organized

+

When writing protocols using the Opentrons API, there are generally five sections:

+
    +
  1. Imports

  2. +
  3. Metadata

  4. +
  5. Labware

  6. +
  7. Pipettes

  8. +
  9. Commands

  10. +
+
+

Imports

+

When writing in Python, you must always include the Opentrons API within your file. We most commonly use the labware and instruments sections of the API.

+

From the example above, the “imports” section looked like:

+
from opentrons import labware, instruments
+
+
+
+
+

Metadata

+

Metadata is a dictionary of data that is read by the server and returned to client applications (such as the Opentrons App). It is not needed to run a protocol (and is entirely optional), but if present can help the client application display additional data about the protocol currently being executed.

+

The fields above (“protocolName”, “author”, and “description”) are the recommended fields, but the metadata dictionary can contain fewer or additional fields as desired (though non-standard fields may not be rendered by the client, depending on how it is designed).

+

You may see a metadata field called “source” in protocols you download directly from Opentrons. The “source” field is used for anonymously tracking protocol usage if you opt-in to analytics in the Opentrons App. For example, protocols from the Opentrons Protocol Library may have “source” set to “Opentrons Protocol Library”. You shouldn’t define “source” in your own protocols.

+
+
+

Labware

+

While the imports section is usually the same across protocols, the labware section is different depending on the tip racks, well plates, troughs, or tubes you’re using on the robot.

+

Each labware is given a type (ex: "96-flat"), and the slot on the robot it will be placed (ex: "2").

+

From the example above, the “labware” section looked like:

+
plate = labware.load("96-flat", "2")
+tiprack = labware.load("opentrons_96_tiprack_300ul", "1")
+
+
+
+
+

Pipettes

+

Next, pipettes are created and attached to a specific mount on the OT-2 ("left" or "right").

+

There are other parameters for pipettes, but the most important are the tip rack(s) it will use during the protocol.

+

From the example above, the “pipettes” section looked like:

+
pipette = instruments.P300_Single(mount="left", tip_racks=[tiprack])
+
+
+
+
+

Commands

+

And finally, the most fun section, the actual protocol commands! The most common commands are transfer(), aspirate(), dispense(), pick_up_tip(), drop_tip(), and much more.

+

This section can tend to get long, relative to the complexity of your protocol. However, with a better understanding of Python you can learn to compress and simplify even the most complex-seeming protocols.

+

From the example above, the “commands” section looked like:

+
pipette.transfer(100, plate.wells("A1"), plate.wells("B1"))
+
+
+
+
+
+
+
+

Feature Requests

+

Have an interesting idea or improvement for our software? Create a ticket on github by following these guidelines.

+
+
+

Developer’s guide

+

Do you want to contribute to our open-source API? You can find more information on how to be involved here.

+
+ +
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/labware.html b/api/docs/dist/v1/labware.html new file mode 100644 index 000000000000..71f6941b9a30 --- /dev/null +++ b/api/docs/dist/v1/labware.html @@ -0,0 +1,1979 @@ + + + + + + + + + Labware — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+

Labware

+

We spend a fair amount of time organizing and counting wells when writing +Python protocols. This section describes the different ways we can access +wells and groups of wells.

+
+
+

Labware Library

+

The Opentrons API comes with many common labware built in. These can be loaded +into your Python protocol by using the labware.load() method with the +specific load name of the labware you need.

+

Please see the Opentrons Labware Library for a list of currently supported +labware, along with visualizations, pictures, and load names.

+
+

Tip

+

Copy and paste load names directly from the Labware Library to ensure +your load() statements get the correct definitions.

+
+

If you are interested in using your own labware that is not included in the +API, please take a look at how to create custom labware definitions using +labware.create(), or contact Opentrons Support.

+
+

Labware Versions

+

Some labware on the Opentrons Labware Library have multiple versions of their +definitions available. Opentrons publishes new versions of a labware definition +when we find an issue with a labware definition. In general, you should use the +newest version of a labware definition; however, the older definitions remain +available for use with previously-written protocols that may have been customized +to work with the older definition.

+

If you do not specify a version when loading labware, version 1 will be used by default.

+
+
+
+
+

Placing labware on the robot deck

+

The robot deck is made up of slots labeled 1, 2, 3, 4, and so on.

+_images/DeckMapEmpty.png +

To tell the robot what labware will be on the deck for your protocol, use +labware.load after importing labware as follows:

+
from opentrons import labware
+
+# ...
+
+tiprack = labware.load("opentrons_96_tiprack_300ul", slot="1")
+
+
+
+
+
+

Labware Import Reference

+
'''
+Examples in this section require the following
+'''
+from opentrons import labware
+
+
+
+

Load

+

labware.load tells the robot that your protocol will be using a given +labware in a certain slot.

+
my_labware = labware.load("usascientific_12_reservoir_22ml", slot="1")
+
+
+

A third optional argument can be used to give a labware a nickname for display +in the Opentrons App.

+
my_labware = labware.load("usascientific_12_reservoir_22ml",
+                 slot="2",
+                 label="any-name-you-want")
+
+
+

Sometimes, you may need to place a labware on top of something else on the +deck, like modules. For this, you should use the share parameter.

+
from opentrons import labware, modules
+
+td = modules.load("tempdeck", slot="1")
+plate = labware.load("opentrons_96_aluminumblock_biorad_wellplate_200ul",
+                     slot="1",
+                     share=True)
+
+
+

To specify the version of the labware definition to use, you can use the version +parameter:

+
from opentrons import labware
+block1 = labware.load(
+             "opentrons_96_aluminumblock_biorad_wellplate_200ul",
+             slot="1",
+             version=2)  # version 2 of the aluminum block definition
+block2 = labware.load(
+             "opentrons_96_aluminumblock_biorad_wellplate_200ul",
+              slot="2",
+              version=1)  # version 1 of the aluminum block definition
+block3 = labware.load(
+             "opentrons_96_aluminumblock_biorad_wellplate_200ul",
+             slot="2")  # if you don't specify version, version 1 is used
+
+
+
+
+

Create

+
+

Note

+

The current custom labware creation mechanisms in the API are fairly +limited. We’re working on a much more robust system for custom labware +definitions. If the current API isn’t able to support your labware, please +reach out to our support team.

+
+

Using labware.create, you can create your own custom labware. The labware +created through this method must consist of circular wells arranged in +regularly-spaced columns and rows.

+
custom_plate_name = "custom_18_wellplate_200ul"
+
+if plate_name not in labware.list():
+    labware.create(
+        custom_plate_name,  # name of you labware
+        grid=(3, 6),        # number of (columns, rows)
+        spacing=(12, 12),   # distances (mm) between each (column, row)
+        diameter=5,         # diameter (mm) of each well
+        depth=10,           # depth (mm) of each well
+        volume=200)         # volume (µL) of each well
+
+custom_plate = labware.load(custom_plate_name, slot="3")
+
+for well in custom_plate.wells():
+    print(well)
+
+
+

The above example will print out…

+
<Well A1>
+<Well B1>
+<Well C1>
+<Well A2>
+<Well B2>
+<Well C2>
+<Well A3>
+<Well B3>
+<Well C3>
+<Well A4>
+<Well B4>
+<Well C4>
+<Well A5>
+<Well B5>
+<Well C5>
+<Well A6>
+<Well B6>
+<Well C6>
+
+
+

You only need to call labware.create once. It will save the labware +definition on the robot so that your labware will be available to all your +subsequent protocol runs.

+

labware.create will throw an error if you try to call it more than once +with the same load name. In the example above, the call to labware.create +is wrapped in an if-block so it does not try to add the definition twice, which +would cause an error.

+

If you would like to delete a labware you have already added to the database +(for example: to make changes to its definition), you can do the following:

+
from opentrons.data_storage import database
+
+database.delete_container("custom_18_wellplate_200ul")
+
+
+
+

Note

+

There is some specialty labware that will require you to specify the +type within your labware name. If you are creating a custom tip rack, it +must be tiprack-REST-OF-LABWARE-NAME in order for the software to act +reliably.

+
+
+
+

List (deprecated)

+

labware.list returns an array of all labware load names in the old, +unsupported format.

+
labware.list()
+
+
+
+

Tip

+

For a list of all currently supported labware, please visit the Opentrons +Labware Library

+
+
+
+
+

Accessing Wells

+
+

Individual Wells

+

When writing a protocol using the API, you will need to select which wells to +transfer liquids to and from.

+

The OT-2 deck and labware are all set up with the same coordinate system

+
    +
  • Lettered rows ["A"]-["END"]

  • +
  • Numbered columns ["1"]-["END"].

  • +
+_images/Well_Iteration.png +
'''
+Examples in this section expect the following
+'''
+from opentrons import labware
+
+plate = labware.load("corning_24_wellplate_3.4ml_flat", slot="1")
+
+
+
+

Wells by Name

+

Once a labware is loaded into your protocol, you can easily access the many +wells within it using wells() method. wells() takes the name of the +well as an argument, and will return the well at that location.

+
a1 = plate.wells("A1")
+d6 = plate.wells("D6")
+
+
+
+
+

Wells by Index

+

Wells can be referenced by their “string” name, as demonstrated above. +However, they can also be referenced with zero-indexing, with the first well in +a labware being at position 0.

+
plate.wells(0)   # well A1
+plate.wells(23)  # well D6
+
+
+
+

Tip

+

You may find well names (e.g. B3) to be easier to reason with, +especially with irregular labware (e.g. +opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical). Whichever well +access method you use, your protocol will be most maintainable if you pick +one method and don’t use the other one.

+
+
+
+

Columns and Rows

+

A labware’s wells are organized within a series of columns and rows, which are +also labelled on standard labware. In the API, rows are given letter names +("A" through "D" for example) and go left to right, while columns are +given numbered names ("1" through "6" for example) and go from front to +back.

+

You can access a specific row or column by using the rows() and +columns() methods on a labware. These will return all wells within that row +or column.

+
row = plate.rows("A")
+column = plate.columns("1")
+
+print('Column "1" has', len(column), 'wells')
+print('Row "A" has', len(row), 'wells')
+
+
+

will print out…

+
Column "1" has 4 wells
+Row "A" has 6 wells
+
+
+

The rows() or cols() methods can be used in combination with the +wells() method to access wells within that row or column. In the example +below, both lines refer to well "A1".

+
plate.cols("1").wells("A")
+plate.rows("A").wells("1")
+
+
+
+

Tip

+

The example above works but is a little convoluted. If you can, always get +individual wells like A1 with wells("A1") or wells(0)

+
+
+
+
+

Multiple Wells

+

If we had to reference each well one at a time, our protocols could get very +long.

+

When describing a liquid transfer, we can point to groups of wells for the +liquid’s source and/or destination. Or, we can get a group of wells and loop +(or iterate) through them.

+
'''
+Examples in this section expect the following
+'''
+from opentrons import labware
+
+plate = labware.load("corning_24_wellplate_3.4ml_flat", slot="1")
+
+
+
+

Wells

+

The wells() method can return a single well, or it can return a list of +wells when multiple arguments are passed.

+

Here is an example or accessing a list of wells, each specified by name:

+
w = plate.wells("A1", "B2", "C3", "D4")
+
+print(w)
+
+
+

will print out…

+
<WellSeries: <Well A1><Well B2><Well C3><Well D4>>
+
+
+

Multiple wells can be treated just like a normal Python list, and can be +iterated through:

+
for w in plate.wells("A1", "B2", "C3", "D4"):
+    print(w)
+
+
+

will print out…

+
<Well A1>
+<Well B2>
+<Well C3>
+<Well D3>
+
+
+
+
+

Wells To

+

Instead of having to list the name of every well, we can also create a range of +wells with a start and end point. The first argument is the starting well, and +the to= argument is the last well.

+
for w in plate.wells("A1", to="D1"):
+    print(w)
+
+
+

will print out…

+
<Well A1>
+<Well B1>
+<Well C1>
+<Well D1>
+
+
+

These lists of wells can also move in the reverse direction along your labware. +For example, setting the to= argument to a well that comes before the +starting position is allowed:

+
for w in plate.wells("D1", to="A1"):
+    print(w)
+
+
+

will print out…

+
<Well D1>
+<Well C1>
+<Well B1>
+<Well A1>
+
+
+
+
+

Wells Length

+

Another way you can create a list of wells is by specifying the length of the +well list you need, including the starting well. The example below will +return 4 wells, starting at well "A1":

+
for w in plate.wells("A1", length=4):
+    print(w)
+
+
+

will print out…

+
<Well A1>
+<Well B1>
+<Well C1>
+<Well D1>
+
+
+
+
+

Columns and Rows

+

The same arguments described above can be used with rows() and cols() +to create lists of rows or columns.

+

Here is an example of iterating through rows:

+
for r in plate.rows("A", length=3):
+    print(r)
+
+
+

will print out…

+
<WellSeries: <Well A1><Well A2><Well A3><Well A4><Well A5><Well A6>>
+<WellSeries: <Well B1><Well B2><Well B3><Well B4><Well B5><Well B6>>
+<WellSeries: <Well C1><Well C2><Well C3><Well C4><Well C5><Well C6>>
+
+
+

And here is an example of iterating through columns:

+
for c in plate.cols("1", to="6"):
+    print(c)
+
+
+

will print out…

+
<WellSeries: <Well A1><Well B1><Well C1><Well D1>>
+<WellSeries: <Well A2><Well B2><Well C2><Well D2>>
+<WellSeries: <Well A3><Well B3><Well C3><Well D3>>
+<WellSeries: <Well A4><Well B4><Well C4><Well D4>>
+<WellSeries: <Well A5><Well B5><Well C5><Well D5>>
+<WellSeries: <Well A6><Well B6><Well C6><Well D6>>
+
+
+
+
+

Slices

+

Labware can also be treating similarly to Python lists, and can therefore +handle slices.

+
# start at index 0
+# slice until index 8, without including it
+# increment by 2
+for w in plate[0:8:2]:
+    print(w)
+
+
+

will print out…

+
<Well A1>
+<Well C1>
+<Well A2>
+<Well C2>
+
+
+

The API’s labware are also prepared to take string values for the slice’s +start and stop positions.

+
for w in plate["A1":"A2":2]:
+    print(w)
+
+
+

will print out…

+
<Well A1>
+<Well C1>
+
+
+
for w in plate.rows["B"]["1"::2]:
+    print(w)
+
+
+

will print out…

+
<Well B1>
+<Well B3>
+<Well B5>
+
+
+
+
+
+
+

Deprecated Labware Load Names

+

Prior to version 3.10.0 of the Opentrons API, we used a completely +different set of labware load names. They will continue to work until version +4.0.0 is released, but they should be considered deprecated.

+

We recommend you switch over to using the load names from the Labware Library +as soon as possible. The following mapping can be used as a guide:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Deprecated

Recommended

Notes

6-well-plate

corning_6_wellplate_16.8ml_flat

12-well-plate

corning_12_wellplate_6.9ml_flat

24-well-plate

corning_24_wellplate_3.4ml_flat

48-well-plate

corning_48_wellplate_1.6ml_flat

384-plate

corning_384_wellplate_112ul_flat

96-deep-well

usascientific_96_wellplate_2.4ml_deep

This labware has square wells

96-flat

corning_96_wellplate_360ul_flat

96-PCR-flat

biorad_96_wellplate_200ul_pcr

96-PCR-tall

biorad_96_wellplate_200ul_pcr

alum-block-pcr-strips

opentrons_40_aluminumblock_eppendorf_24x2ml_safelock_snapcap_generic_16x0.2ml_pcr_strip

This product has been discontinued

biorad-hardshell-96-PCR

biorad_96_wellplate_200ul_pcr

opentrons-aluminum-block-2ml-eppendorf

opentrons_24_aluminumblock_generic_2ml_screwcap

Opentrons Aluminum Block Set

opentrons-aluminum-block-2ml-screwcap

opentrons_24_aluminumblock_generic_2ml_screwcap

Opentrons Aluminum Block Set

opentrons-aluminum-block-96-PCR-plate

opentrons_96_aluminumblock_biorad_wellplate_200ul

Opentrons Aluminum Block Set

opentrons-aluminum-block-PCR-strips-200ul

opentrons_96_aluminumblock_generic_pcr_strip_200ul

Opentrons Aluminum Block Set

opentrons-tiprack-300ul

opentrons_96_tiprack_300ul

opentrons-tuberack-1.5ml-eppendorf

opentrons_24_tuberack_eppendorf_1.5ml_safelock_snapcap

Opentrons 4-in-1 Tube Rack Set

opentrons-tuberack-15_50ml

opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical

Opentrons 4-in-1 Tube Rack Set

opentrons-tuberack-15ml

opentrons_15_tuberack_falcon_15ml_conical

Opentrons 4-in-1 Tube Rack Set

opentrons-tuberack-2ml-eppendorf

opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap

Opentrons 4-in-1 Tube Rack Set

opentrons-tuberack-2ml-screwcap

opentrons_24_tuberack_generic_2ml_screwcap

Opentrons 4-in-1 Tube Rack Set

opentrons-tuberack-50ml

opentrons_6_tuberack_falcon_50ml_conical

Opentrons 4-in-1 Tube Rack Set

PCR-strip-tall

opentrons_96_aluminumblock_generic_pcr_strip_200ul

tiprack-10ul

opentrons_96_tiprack_10ul

If possible, please use an Opentrons tip rack rather than a rack with a slot adapter

tiprack-200ul

tipone_96_tiprack_200ul

If possible, please use an Opentrons tip rack rather than a rack with a slot adapter

tiprack-1000ul

opentrons_96_tiprack_1000ul

If possible, please use an Opentrons tip rack rather than a rack with a slot adapter

trash-box

agilent_1_reservoir_290ml

trash-box is no longer supported; we recommend using a 1-well reservoir for liquid trash

trough-12row

usascientific_12_reservoir_22ml

tube-rack-.75ml

opentrons_24_tuberack_generic_0.75ml_snapcap_acrylic

Discontinued; please upgrade to the Opentrons 4-in-1 Tube Rack Set

tube-rack-2ml

opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap_acrylic

Discontinued; please upgrade to the Opentrons 4-in-1 Tube Rack Set

tube-rack-15_50ml

opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical_acrylic

Discontinued; please upgrade to the Opentrons 4-in-1 Tube Rack Set

+
+

Note

+

If your labware is missing from the list above, or you’re unsure how to +update your protocol’s load names, please contact our support team

+
+

The following load names do not have a new definitions available, and could +eventually be removed. They will continue to function normally for now. If you +have any concerns about their deprecation and/or removal, please reach out!

+
    +
  • 24-vial-rack

  • +
  • 48-vial-plate

  • +
  • 5ml-3x4

  • +
  • 96-well-plate-20mm

  • +
  • MALDI-plate

  • +
  • T25-flask

  • +
  • T75-flask

  • +
  • e-gelgol

  • +
  • hampton-1ml-deep-block

  • +
  • point

  • +
  • rigaku-compact-crystallization-plate

  • +
  • small_vial_rack_16x45

  • +
  • temperature-plate

  • +
  • tiprack-10ul-H

  • +
  • trough-12row-short

  • +
  • trough-1row-25ml

  • +
  • trough-1row-test

  • +
  • tube-rack-2ml-9x9

  • +
  • tube-rack-5ml-96

  • +
  • tube-rack-80well

  • +
  • wheaton_vial_rack

  • +
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/modules.html b/api/docs/dist/v1/modules.html new file mode 100644 index 000000000000..4f961d5e3943 --- /dev/null +++ b/api/docs/dist/v1/modules.html @@ -0,0 +1,1563 @@ + + + + + + + + + Hardware Modules — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+

Hardware Modules

+

This documentation and modules API is subject to change. Check here or on +our github for updated information.

+

This code is only valid on software version 3.3.0 or later.

+
+

Loading your Module onto a deck

+

Just like labware, you will also need to load in your module in order to use it +within a protocol. To do this, you call:

+
from opentrons import modules
+
+module = modules.load("Module Name", slot)
+
+
+

Above, Module Name represents either tempdeck or magdeck.

+

To add a labware onto a given module, you will need to use the share=True call-out

+
from opentrons import labware
+
+labware = labware.load("96-flat", slot, share=True)
+
+
+

Where slot is the same slot in which you loaded your module.

+
+
+

Detecting your Module on the robot

+

The Run App auto-detects and connects to modules that are plugged into the robot upon robot connection. +If you plug in a module with the app open and connected to your robot already, you can simply navigate to the +Pipettes & Modules in the Run App and hit the refresh icon.

+

If you are running a program outside of the app, you will need to initiate robot connection to the module. This can +be done like the following:

+
from opentrons import modules, robot
+
+robot.connect()
+robot.discover_modules()
+
+module = modules.load("Module Name", slot)
+... etc
+
+
+
+
+

Checking the status of your Module

+

Both modules have the ability to check what state they are currently in. To do this run the following:

+
from opentrons import modules
+
+module = modules.load("Module Name", slot)
+status = module.status
+
+
+

For the temperature module this will return a string stating whether it’s heating, cooling, holding at target or idle. +For the magnetic module this will return a string stating whether it’s engaged or disengaged.

+
+

Temperature Module

+

Our temperature module acts as both a cooling and heating device. The range +of temperatures this module can reach goes from 4 to 95 degrees celsius with a resolution of 1 degree celcius.

+

The temperature module has the following methods that can be accessed during a protocol.

+
+
+
+

Set Temperature

+

To set the temperature module to a given temperature in degrees celsius do the following:

+
from opentrons import modules, labware
+
+module = modules.load("tempdeck", slot)
+plate = labware.load("96-flat", slot, share=True)
+
+module.set_temperature(4)
+
+
+

This will set your Temperature module to 4 degrees celsius.

+
+
+

Wait Until Setpoint Reached

+

This function will pause your protocol until your target temperature is reached.

+
from opentrons import modules, labware
+
+module = modules.load("tempdeck", slot)
+plate = labware.load("96-flat", slot, share=True)
+
+module.set_temperature(4)
+module.wait_for_temp()
+
+
+

Before using wait_for_temp() you must set a target temperature with set_temperature(). +Once the target temperature is set, when you want the protocol to wait until the module +reaches the target you can call wait_for_temp().

+

If no target temperature is set via set_temperature(), the protocol will be stuck in +an indefinite loop.

+
+
+

Read the Current Temperature

+

You can read the current real-time temperature of the module by the following:

+
from opentrons import modules, labware
+
+module = modules.load("tempdeck", slot)
+plate = labware.load("96-flat", slot, share=True)
+
+temperature = module.temperature
+
+
+

This will return a float of the temperature in celsius.

+
+
+

Read the Target Temperature

+

We can read the target temperature of the module by the following:

+
from opentrons import modules, labware
+
+module = modules.load("tempdeck", slot)
+plate = labware.load("96-flat", slot, share=True)
+
+temperature = module.target
+
+
+

This will return a float of the temperature that the module is trying to reach.

+
+
+

Deactivate

+

This function will stop heating or cooling and will turn off the fan on the module. +You would still be able to call set_temperature() function to initiate a heating +or cooling phase again.

+
from opentrons import modules, labware
+
+module = modules.load("tempdeck", slot)
+plate = labware.load("96-flat", slot, share=True)
+
+module.set_temperature(4)
+module.wait_for_temp()
+
+## OTHER PROTOCOL ACTIONS
+
+module.deactivate()
+
+
+

** Note** +You can also deactivate your temperature module through our Run App by +clicking on the Pipettes & Modules tab. Your temperature module will automatically +deactivate if another protocol is uploaded to the app. Your temperature module will +not deactivate automatically upon protocol end, cancel or re-setting a protocol.

+
+

Magnetic Module

+

The magnetic module has two actions:

+
    +
  • engage: The magnetic stage rises to a default height unless an offset or a custom height is specified

  • +
  • disengage: The magnetic stage moves down to its home position

  • +
+

The magnetic module api is currently fully compatible with the BioRad Hardshell 96-PCR (.2ml) well plates. The magnets will +default to an engaged height of about 4.3 mm from the bottom of the well (or 18mm from magdeck home position). This is +roughly 30% of the well depth. This engaged height has been tested for an elution volume of 40ul.

+

You can also specify a custom engage height for the magnets so you can use a different labware with the magdeck. +In the future, we will have adapters to support tuberacks as well as deep well plates.

+
+
+
+

Engage

+
from opentrons import modules, labware
+
+module = modules.load("magdeck", slot)
+plate = labware.load("biorad-hardshell-96-PCR", slot, share=True)
+
+module.engage()
+
+
+

If you deem that the default engage height is not ideal for your applications, +you can include an offset in mm for the magnet to move to. The engage function +will take in a value (positive or negative) to offset the magnets from the default position.

+

To move the magnets higher than the default position you would specify a positive mm offset such as: +module.engage(offset=4)

+

To move the magnets lower than the default position you would input a negative mm value such as: +module.engage(offset=-4)

+

You can also use a custom height parameter with engage():

+
from opentrons import modules, labware
+
+module = modules.load("magdeck", slot)
+plate = labware.load("96-deep-well", slot, share=True)
+
+module.engage(height=12)
+
+
+

The height should be specified in mm from the magdeck home position (i.e. the position of magnets when power-cycled or +disengaged)

+

** Note ** +engage() and engage(offset=y) can only be used for labware that have default heights defined in the api. If your +labware doesn’t yet have a default height definition and your protocol uses either of those methods then you will get +an error. Simply use the height parameter to provide a custom height for you labware in such a case.

+
+
+

Disengage

+
from opentrons import modules, labware
+
+module = modules.load("magdeck", slot)
+plate = labware.load("biorad-hardshell-96-PCR", slot, share=True)
+
+module.engage()
+## OTHER PROTOCOL ACTIONS
+module.disengage()
+
+
+

The magnetic modules will disengage on power cycle of the device. It will not auto-disengage otherwise +unless you specify in your protocol.

+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/objects.inv b/api/docs/dist/v1/objects.inv new file mode 100644 index 000000000000..12e82ab92e80 Binary files /dev/null and b/api/docs/dist/v1/objects.inv differ diff --git a/api/docs/dist/v1/pipettes.html b/api/docs/dist/v1/pipettes.html new file mode 100644 index 000000000000..9d58931410d7 --- /dev/null +++ b/api/docs/dist/v1/pipettes.html @@ -0,0 +1,1547 @@ + + + + + + + + + Creating a Pipette — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +

The instruments module gives your protocol access to the pipette constructors, which is what you will be primarily using to create protocol commands.

+
+
+

Creating a Pipette

+
'''
+Examples in this section require the following:
+'''
+from opentrons import instruments, robot
+
+
+
+

Pipette Model(s)

+

Currently in our API there are 10 pipette models to correspond with the offered pipette models on our website.

+

They are as follows:

+
    +
  • P10_Single (1 - 10 ul)

  • +
  • P10_Multi (1 - 10ul)

  • +
  • P50_Single (5 - 50ul)

  • +
  • P50_Multi (5 - 50ul)

  • +
  • P300_Single (30 - 300ul)

  • +
  • P300_Multi (30 - 300ul)

  • +
  • P1000_Single (100 - 1000ul)

  • +
  • P20_Single_GEN2 (1 - 20ul)

  • +
  • P300_Single_GEN2 (20 - 300ul)

  • +
  • P1000_Single_GEN2 (100 - 1000ul)

  • +
+

For every pipette type you are using in a protocol, you must use one of the +model names specified above and call it out as instruments.(Model Name). +You must also specify a mount. The mount can be either "left" or "right". +In this example, we are using a Single-Channel 300uL pipette.

+
pipette = instruments.P300_Single(mount="left")
+
+
+
+
+

Pipette GEN2 Backwards Compatibility

+

Because the Gen 2 pipettes behave similarly to the Gen 1 pipettes, if you specify a Gen 1 pipette +in your protocol (for instance, instruments.P300_Single) but have a Gen 2 pipette attached (for instance, +instruments.P300_Single_GEN2), you can still run your protocol. The robot will consider the Gen 2 +pipette to have the same minimum volume as the Gen 1 pipette, so any advanced commands have the +same behavior as before.

+

The P20 Single GEN2 is back-compatible with the P10 Single in this regard. If your protocol +specifies an instruments.P10_Single and your robot has an instruments.P20_Single_GEN2 +attached, you can run your protocol, and the robot will act as if the maximum volume of the P20 +Single GEN2 is 10 µl.

+

If you have a P50 Single specified in your protocol, there is no automatic backwards compatibility. +If you want to use a Gen2 Pipette, you must change your protocol to load either a P300 Single GEN2 +(if you are using volumes between 20 and 50 µl) or a P20 Single GEN2 (if you are using volumes +below 20 µl).

+
+
+

Plunger Flow Rates

+

The speeds at which the pipette will aspirate and dispense can be set through aspirate_speed, dispense_speed, and blow_out_speed in units of millimeters of plunger travel per second, or through aspirate_flow_rate, dispense_flow_rate, and blow_out_flow_rate in units of microliters/second. These have varying defaults depending on the model.

+
pipette = instruments.P300_Single(
+    mount="right",
+    aspirate_flow_rate=200,
+    dispense_flow_rate=600,
+    blow_out_flow_rate=600)
+
+
+
+
+

Minimum and Maximum Volume

+

The minimum and maximum volume of the pipette may be set using +min_volume and max_volume. The values are in microliters and have +varying defaults depending on the model.

+
pipette = instruments.P10_Single(
+    mount="right",
+    min_volume=2,
+    max_volume=8)
+
+
+

The given defaults for every pipette model is the following:

+
+

P10_Single

+
    +
  • Aspirate Default: 5 µl/s

  • +
  • Dispense Default: 10 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 1 µl

  • +
  • Maximum Volume: 10 µl

  • +
+
+
+

P10_Multi

+
    +
  • Aspirate Default: 5 µl/s

  • +
  • Dispense Default: 10 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 1 µl

  • +
  • Maximum Volume: 10 µl

  • +
+
+
+

P50_Single

+
    +
  • Aspirate Default: 25 µl/s

  • +
  • Dispense Default: 50 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 5 µl

  • +
  • Maximum Volume: 50 µl

  • +
+
+
+

P50_Multi

+
    +
  • Aspirate Default: 25 µl/s

  • +
  • Dispense Default: 50 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 5 µl

  • +
  • Maximum Volume: 50 µl

  • +
+
+
+

P300_Single

+
    +
  • Aspirate Default: 150 µl/s

  • +
  • Dispense Default: 300 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 30 µl

  • +
  • Maximum Volume: 300 µl

  • +
+
+
+

P300_Multi

+
    +
  • Aspirate Default: 150 µl/s

  • +
  • Dispense Default: 300 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 30 µl

  • +
  • Maximum Volume: 300 µl

  • +
+
+
+

P1000_Single

+
    +
  • Aspirate Default: 500 µl/s

  • +
  • Dispense Default: 1000 µl/s

  • +
  • Blow Out Default: 1000 µl/s

  • +
  • Minimum Volume: 100 µl

  • +
  • Maximum Volume: 1000 µl

  • +
+
+
+

P20_Single_GEN2

+
    +
  • Aspirate Default: 3.78 µl/s

  • +
  • Dispense Default: 3.78 µl/s

  • +
  • Blow Out Default: 3.78 µl/s

  • +
  • Minimum Volume: 1 µl

  • +
  • Maximum Volume: 20 µl

  • +
+
+
+

P300_Single_GEN2

+
    +
  • Aspirate Default: 46.43 µl/s

  • +
  • Dispense Default: 46.43 µl/s

  • +
  • Blow Out Default: 46.43 µl/s

  • +
  • Minimum Volume: 20 µl

  • +
  • Maximum Volume: 300 µl

  • +
+
+
+

P1000_Single_GEN2

+
    +
  • Aspirate Default: 137.35 µl/s

  • +
  • Dispense Default: 137.35 µl/s

  • +
  • Blow Out Default: 137.35 µl/s

  • +
  • Minimum Volume: 100 µl

  • +
  • Maximum Volume: 1000 µl

  • +
+
+
+
+

Old Pipette Constructor

+

The Pipette constructor that was used directly in OT-One protocols is now +an internal-only class. Its behavior is difficult to predict when not used +through the public constructors mentioned above. Pipette constructor +arguments are subject to change of their default values, behaviors, and +parameters may be added or removed without warning or a major version +increment.

+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/py-modindex.html b/api/docs/dist/v1/py-modindex.html new file mode 100644 index 000000000000..2d53e59dd643 --- /dev/null +++ b/api/docs/dist/v1/py-modindex.html @@ -0,0 +1,1378 @@ + + + + + + + + Python Module Index — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + + +

Python Module Index

+ +
+ i | + o +
+ + + + + + + + + + + + + + + +
 
+ i
+ instruments +
 
+ o
+ opentrons +
    + opentrons.simulate +
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/search.html b/api/docs/dist/v1/search.html new file mode 100644 index 000000000000..f6c399caf877 --- /dev/null +++ b/api/docs/dist/v1/search.html @@ -0,0 +1,1364 @@ + + + + + + + + Search — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +

Search

+ + + + +

+ Searching for multiple words only shows matches that contain + all words. +

+ + +
+ + + +
+ + + +
+ +
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/api/docs/dist/v1/searchindex.js b/api/docs/dist/v1/searchindex.js new file mode 100644 index 000000000000..4679d1910336 --- /dev/null +++ b/api/docs/dist/v1/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["api", "atomic_commands", "complex_commands", "examples", "hardware_control", "index", "labware", "modules", "pipettes", "writing"], "filenames": ["api.rst", "atomic_commands.rst", "complex_commands.rst", "examples.rst", "hardware_control.rst", "index.rst", "labware.rst", "modules.rst", "pipettes.rst", "writing.rst"], "titles": ["API Reference", "Atomic Liquid Handling", "Complex Liquid Handling", "Examples", "Advanced Control", "OT-2 Python API Version 1", "Labware", "Hardware Modules", "Creating a Pipette", "Using Python In Protocols"], "terms": {"If": [0, 1, 2, 3, 5, 6, 7, 8, 9], "you": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "ar": [0, 1, 2, 4, 5, 6, 7, 8, 9], "read": [0, 2, 3, 5, 9], "thi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "probabl": 0, "look": [0, 1, 3, 6, 9], "an": [0, 1, 2, 5, 6, 7, 8, 9], "depth": [0, 6, 7], "explan": 0, "class": [0, 8], "method": [0, 1, 6, 7, 9], "fulli": [0, 7], "master": 0, "your": [0, 1, 2, 3, 4, 5, 6, 8], "protocol": [0, 1, 2, 3, 4, 5, 6, 7, 8], "develop": [0, 9], "skill": [0, 5], "all": [0, 1, 2, 3, 4, 6], "set": [0, 1, 2, 4, 5, 6, 8, 9], "up": [0, 2, 3, 4, 5, 6, 9], "execut": [0, 4, 5, 9], "us": [0, 1, 3, 4, 5, 6, 7, 8], "config": 0, "none": 0, "broker": 0, "main": 0, "interfac": 0, "It": [0, 1, 2, 3, 5, 6, 7], "should": [0, 2, 5, 6, 7, 9], "never": [0, 5], "instanti": 0, "directli": [0, 5, 6, 8], "instead": [0, 1, 2, 6], "global": 0, "instanc": [0, 8, 9], "mai": [0, 2, 5, 6, 8, 9], "access": [0, 4, 5, 7, 8, 9], "opentron": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "through": [0, 2, 3, 5, 6, 7, 8, 9], "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "defin": [0, 5, 7], "deck": [0, 1, 5], "connect": [0, 7, 9], "physic": 0, "home": [0, 5, 7], "axi": [0, 4], "move": [0, 2, 3, 5, 6, 7, 9], "head": [0, 1, 5], "move_to": [0, 1, 3], "paus": [0, 1, 5, 7], "resum": [0, 4], "run": [0, 1, 3, 4, 5, 6, 7, 8, 9], "head_spe": [0, 4], "each": [0, 1, 2, 3, 5, 6], "python": [0, 1, 3, 4, 6], "script": [0, 5], "when": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "evalu": 0, "creat": [0, 1, 2, 3, 4, 5, 9], "plan": [0, 1], "which": [0, 1, 2, 4, 6, 7, 8, 9], "store": [0, 9], "list": [0, 1, 3, 4, 5, 9], "command": [0, 1, 2, 3, 8, 9], "s": [0, 1, 2, 3, 4, 6, 7], "queue": 0, "here": [0, 2, 5, 6, 7, 9], "typic": [0, 5], "step": [0, 1, 2, 4, 9], "write": [0, 1, 5, 6, 9], "load": [0, 1, 2, 3, 4, 5, 8], "contain": [0, 1, 2, 5, 9], "instrument": [0, 1, 2, 3, 4, 5, 8], "see": [0, 4, 5, 6, 9], "call": [0, 1, 2, 4, 5, 6, 7, 8, 9], "reset": [0, 5], "state": [0, 7], "clear": [0, 5], "instruct": [0, 2, 5], "get": [0, 6, 7, 9], "convert": 0, "review": 0, "gener": [0, 5, 6, 9], "real": [0, 7], "support": [0, 5, 6, 7], "add_instru": 0, "self": 0, "mount": [0, 1, 2, 3, 4, 5, 8], "add": [0, 1, 2, 4, 5, 6, 7], "paramet": [0, 4, 5, 6, 7, 8], "str": 0, "specifi": [0, 1, 3, 5, 6, 7, 8], "attach": [0, 5, 8], "valid": [0, 7], "option": [0, 1, 5, 6], "left": [0, 1, 2, 3, 4, 5, 6, 8], "right": [0, 1, 4, 5, 6, 8], "note": [0, 1, 6, 7, 9], "A": [0, 1, 2, 6, 9], "canon": 0, "wai": [0, 2, 5, 6, 9], "from": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "import": [0, 1, 2, 3, 4, 7, 8, 9], "m300": 0, "p300_multi": [0, 2, 5], "port": 0, "serial": 0, "os": [0, 9], "specif": [0, 4, 5, 6, 9], "name": [0, 5, 7, 8], "virtual": [0, 9], "smoothi": [0, 4], "dict": 0, "provid": [0, 2, 7, 9], "pass": [0, 1, 2, 6, 9], "get_virtual_devic": 0, "return": [0, 4, 5, 6, 7, 9], "type": [0, 5, 6, 8, 9], "true": [0, 2, 6, 7], "success": 0, "fals": [0, 2], "failur": 0, "wish": [0, 2, 4], "without": [0, 1, 6, 8, 9], "ot": [0, 4, 6, 8, 9], "app": [0, 4, 5, 6, 7, 9], "need": [0, 1, 5, 6, 7, 9], "function": [0, 1, 2, 6, 7, 9], "exampl": [0, 1, 2, 4, 5, 6, 8, 9], "disconnect": 0, "get_warn": 0, "current": [0, 3, 4, 5, 6, 8], "runtim": 0, "warn": [0, 8], "accumul": 0, "sinc": [0, 1], "last": [0, 6], "combined_spe": [0, 4], "x": [0, 4, 9], "y": [0, 4, 7], "z": [0, 4], "b": [0, 2, 4, 6], "c": [0, 3, 4, 6, 9], "speed": [0, 2, 5, 8], "mm": [0, 4, 6, 7], "sec": [0, 4], "number": [0, 1, 2, 3, 6, 9], "combin": [0, 2, 3, 6], "ax": [0, 4], "kei": 0, "valu": [0, 1, 2, 3, 4, 6, 7, 8], "pair": 0, "maximum": [0, 4, 5], "400": [0, 4], "max": [0, 1, 4], "per": [0, 4, 8], "200": [0, 2, 3, 6, 8], "arg": 0, "kwarg": 0, "plunger": [0, 4, 5], "motor": [0, 4], "locat": [0, 1, 3, 6, 9], "strategi": [0, 1, 3], "arc": 0, "coordin": [0, 6], "within": [0, 1, 2, 3, 5, 6, 7], "one": [0, 1, 2, 3, 6, 8], "follow": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "1": [0, 1, 2, 3, 4, 6, 7, 8, 9], "i": [0, 3, 7], "e": [0, 6, 7], "slot": [0, 5, 6, 7], "well": [0, 1, 3, 4, 5, 7], "origin": [0, 1], "2": [0, 1, 2, 3, 6, 8, 9], "vector": [0, 3], "given": [0, 1, 5, 6, 7, 8, 9], "system": [0, 3, 6], "3": [0, 1, 2, 3, 5, 6, 7, 8, 9], "object": [0, 1], "rel": [0, 5], "center": 0, "gantri": 0, "direct": [0, 1, 3, 6], "point": [0, 4, 6, 9], "trajectori": 0, "avoid": [0, 2, 9], "obstacl": 0, "straight": [0, 1, 3], "line": [0, 1, 3, 6, 9], "msg": 0, "after": [0, 1, 5, 6, 9], "stop": [0, 3, 6, 7, 9], "alia": 0, "halt": 0, "model_offset": 0, "0": [0, 1, 2, 3, 4, 6, 7], "mount_obj": 0, "model": [0, 5], "ul_per_mm": 0, "channel": [0, 5, 8], "min_volum": [0, 8], "max_volum": [0, 2, 8], "trash_contain": [0, 1], "tip_rack": [0, 1, 2, 3, 4, 5], "aspirate_spe": [0, 8], "5": [0, 1, 3, 6, 8, 9], "dispense_spe": [0, 8], "10": [0, 2, 3, 6, 8], "blow_out_spe": [0, 8], "60": [0, 2, 3], "aspirate_flow_r": [0, 8], "dispense_flow_r": [0, 8], "plunger_curr": 0, "drop_tip_curr": 0, "return_tip_height": 0, "drop_tip_spe": 0, "plunger_posit": 0, "blow_out": [0, 1, 2], "bottom": [0, 1, 7], "drop_tip": [0, 1, 2, 3, 4, 5], "top": [0, 1, 6], "18": [0, 3], "pick_up_curr": 0, "pick_up_dist": 0, "pick_up_incr": 0, "pick_up_press": 0, "pick_up_spe": 0, "30": [0, 2, 3, 7, 8], "quirk": 0, "fallback_tip_length": 0, "51": [0, 3], "7": [0, 3, 5, 9], "blow_out_flow_r": [0, 8], "requested_a": 0, "pipette_id": 0, "OF": [0, 6], "IS": 0, "deprec": [0, 5], "Its": [0, 8], "default": [0, 1, 2, 4, 6, 7, 8], "behavior": [0, 2, 8], "subject": [0, 7, 8], "chang": [0, 1, 6, 7, 8, 9], "major": [0, 8], "version": [0, 7, 8, 9], "releas": [0, 6], "constructor": [0, 1, 5], "avail": [0, 1, 6], "inheritor": 0, "With": 0, "ani": [0, 1, 4, 6, 8, 9], "those": [0, 1, 2, 3, 7], "handl": [0, 5, 6, 9], "liquid": [0, 3, 5, 6, 9], "aspir": [0, 2, 3, 5, 8], "dispens": [0, 2, 3, 5, 8], "mix": [0, 5], "tip": [0, 3, 4, 5, 6], "pick_up_tip": [0, 1, 2, 3, 4, 5], "return_tip": [0, 1, 3], "calibr": [0, 9], "posit": [0, 1, 2, 6, 7], "volum": [0, 1, 3, 5, 6, 7], "ul": [0, 1, 2, 3, 8], "design": [0, 4, 5, 9], "includ": [0, 2, 5, 6, 7], "assert": 0, "where": [0, 1, 2, 3, 7], "ensur": [0, 6, 9], "action": [0, 3, 7, 9], "requir": [0, 4, 5, 6, 8, 9], "must": [0, 1, 2, 3, 5, 6, 7, 8, 9], "preceed": 0, "For": [0, 1, 2, 5, 6, 7, 8, 9], "transfer": [0, 5, 6], "The": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "actuat": 0, "put": 0, "fix": [0, 1], "trash": [0, 1, 5, 6], "track": [0, 5], "int": [0, 2], "while": [0, 2, 3, 5, 6], "new": [0, 1, 5, 6, 9], "labwar": [0, 1, 2, 3, 4, 7, 9], "tip_rack_300ul": 0, "geb": 0, "tiprack": [0, 1, 2, 4, 5, 6], "300ul": [0, 5, 6, 8], "p300": [0, 3, 8], "p300_singl": [0, 1, 2, 3, 4, 5], "rate": [0, 5], "microlit": [0, 1, 2, 8], "onli": [0, 1, 2, 4, 6, 7, 8, 9], "relat": 0, "float": [0, 3, 7], "tupl": [0, 2, 3], "perform": [0, 1, 2, 3], "also": [0, 1, 3, 4, 6, 7, 8, 9], "first": [0, 1, 2, 3, 5, 6, 9], "item": 0, "second": [0, 1, 2, 4, 8], "set_spe": 0, "plate": [0, 1, 4, 5, 6, 7], "96": [0, 1, 3, 4, 5, 6, 7], "flat": [0, 1, 2, 3, 4, 5, 6, 7], "50ul": [0, 1, 2, 8], "50": [0, 1, 2, 3, 4, 8], "20ul": [0, 2, 3, 8], "place": [0, 5, 9], "twice": [0, 6, 9], "fast": 0, "20": [0, 1, 2, 3, 8], "remain": [0, 1, 6], "80ul": 0, "forc": 0, "consolid": [0, 5], "sourc": [0, 1, 2, 3, 5, 6], "dest": 0, "singl": [0, 1, 2, 5, 6, 8], "target": [0, 1, 5], "detail": [0, 9], "full": 0, "argument": [0, 1, 2, 6, 8], "a3": [0, 1, 2, 6], "col": [0, 2, 6], "delai": [0, 5], "minut": [0, 1], "freez": 0, "current_volum": [0, 3], "fill": [0, 1], "200ul": [0, 1, 5, 6], "relative_vector": 0, "half": 0, "distribut": [0, 3, 5], "home_aft": 0, "drop": [0, 2, 3, 4, 5], "its": [0, 1, 6, 7, 9], "opentrons_96_tiprack_300ul": [0, 1, 2, 3, 4, 5, 6], "c2": [0, 2, 6], "back": [0, 1, 2, 4, 6, 8], "rack": [0, 2, 4, 5, 6], "dure": [0, 1, 5, 7], "repetit": [0, 1, 2], "how": [0, 1, 3, 6], "mani": [0, 1, 3, 5, 6], "time": [0, 1, 2, 3, 6, 7], "4": [0, 1, 2, 3, 6, 7], "three": [0, 1], "3x": 0, "until": [0, 1, 5, 6], "algorithm": 0, "either": [0, 1, 4, 7, 8], "destin": [0, 2, 3, 6], "arriv": 0, "pick": [0, 2, 4, 5, 6], "over": [0, 1, 2, 6], "xy": 0, "final": [0, 1, 2, 3, 5], "down": [0, 1, 3, 7], "simpli": [0, 1, 5, 7, 9], "press": [0, 1, 4], "increment": [0, 6, 8], "manual": 0, "next": [0, 1, 5, 9], "lower": [0, 4, 7], "rais": [0, 1, 2], "good": [0, 9], "seal": [0, 1], "zero": [0, 6], "result": [0, 3], "hover": 0, "desir": [0, 5], "could": [0, 2, 5, 6], "dry": 0, "addit": [0, 5], "distanc": [0, 6], "travel": [0, 8], "g": [0, 6], "5mm": 0, "third": [0, 6], "1mm": [0, 1], "300": [0, 2, 8], "automat": [0, 1, 2, 3, 4, 7, 8, 9], "go": [0, 1, 2, 6, 9], "more": [0, 1, 2, 3, 5, 6, 9], "tiprack2": 0, "set_flow_r": [0, 1], "nomin": 0, "touch_tip": [0, 1, 2], "radiu": [0, 3], "v_offset": [0, 1], "touch": [0, 5], "side": 0, "intent": 0, "remov": [0, 1, 4, 6, 8, 9], "droplet": [0, 1, 2], "describ": [0, 1, 4, 6], "percentag": 0, "100": [0, 1, 2, 3, 5, 8], "motion": [0, 4], "80": [0, 2, 3], "min": 0, "offset": [0, 1, 7], "8": [0, 3, 6, 8], "higher": [0, 7], "level": [0, 9], "incorpor": 0, "other": [0, 2, 5, 6, 7, 9], "like": [0, 1, 3, 5, 6, 7, 9], "make": [0, 1, 2, 5, 6, 9], "easier": [0, 2, 6], "cost": 0, "amount": [0, 1, 2, 6], "match": 0, "index": [0, 5], "two": [0, 1, 7], "element": [0, 2], "linear": [0, 2], "gradient": [0, 5], "between": [0, 1, 2, 3, 6, 8], "d": [0, 6], "ed": 0, "new_tip": [0, 2], "clean": 0, "nor": 0, "onc": [0, 1, 2, 5, 6, 7, 9], "cmd": 0, "alwai": [0, 5, 6, 9], "boolean": 0, "ha": [0, 6, 7, 8, 9], "been": [0, 1, 6, 7], "sent": 0, "associ": [0, 1], "occur": 0, "mix_befor": [0, 2], "proce": 0, "interpret": 0, "mix_aft": [0, 2, 3], "carryov": 0, "exce": 0, "split": [0, 3], "multipl": [0, 1, 5, 9], "smaller": [0, 2], "repeat": [0, 9], "applic": [0, 1, 5, 7], "sequenti": 0, "purpos": [0, 1], "save": [0, 2, 3, 6, 9], "seper": 0, "lambda": 0, "calcul": 0, "curv": 0, "length": [0, 1, 5], "howev": [0, 1, 2, 5, 6, 9], "keyword": 0, "custom": [0, 2, 4, 6, 7, 9], "parent": [0, 4], "properti": 0, "repres": [0, 3, 7], "everi": [0, 1, 2, 6, 8], "maintain": [0, 6], "hierarchi": 0, "mean": 0, "travers": 0, "retriev": 0, "differ": [0, 1, 3, 5, 6, 7, 9], "degre": [0, 3, 7], "from_cent": [0, 3], "except": [0, 1, 2], "radian": 0, "thei": [0, 2, 4, 6, 7, 8, 9], "further": 0, "180": 0, "abov": [0, 1, 5, 6, 7, 8, 9], "absolut": [0, 3], "unlik": 0, "ratio": 0, "r": [0, 3, 6], "theta": [0, 3], "h": [0, 3, 6], "accept": 0, "cartesian": 0, "angl": 0, "polar": 0, "though": [0, 2, 5], "both": [0, 1, 6, 7], "same": [0, 2, 3, 5, 6, 7, 8], "select": [0, 5, 6, 9], "entir": [0, 2, 5], "In": [0, 1, 2, 5, 6, 7, 8], "variabl": [0, 3, 9], "want": [0, 1, 2, 4, 5, 6, 7, 8, 9], "actual": [0, 5, 9], "multipli": 0, "relev": [0, 4], "dimens": 0, "doe": [0, 6, 9], "500": [0, 8], "microment": 0, "size": 0, "similarli": [0, 6, 8], "14": [0, 3], "height": [0, 1, 7], "upward": [0, 1], "below": [0, 1, 2, 3, 4, 5, 6, 8], "entrypoint": [0, 9], "modul": [0, 4, 5, 6, 8, 9], "consol": 0, "allow_bundl": 0, "bool": 0, "check": [0, 5], "bundl": 0, "allow": [0, 1, 3, 4, 6], "special": 0, "expos": 0, "flag": 0, "environ": [0, 4, 9], "ot_api_ff_allowbundlecr": 0, "format_runlog": [0, 9], "runlog": [0, 9], "map": [0, 5, 6], "format": [0, 3, 6], "log": [0, 9], "human": [0, 3, 9], "readabl": [0, 5, 9], "string": [0, 6, 7, 9], "output": [0, 9], "get_argu": 0, "parser": 0, "argpars": 0, "argumentpars": 0, "compon": 0, "anoth": [0, 1, 3, 6, 7, 9], "cli": 0, "program": [0, 7, 9], "ad": [0, 2, 4, 6, 8], "protocol_fil": [0, 9], "union": 0, "binaryio": 0, "textio": 0, "file_nam": 0, "custom_labware_path": 0, "custom_data_path": 0, "propagate_log": 0, "hardware_simulator_file_path": 0, "duration_estim": 0, "durat": 0, "estim": 0, "durationestim": 0, "log_level": 0, "bundlecont": 0, "itself": [0, 9], "whether": [0, 7, 9], "json": 0, "matter": 0, "extern": 0, "bound": 0, "intern": [0, 8, 9], "server": [0, 5], "infrastructur": 0, "To": [0, 5, 7, 9], "file": [0, 3, 5, 9], "problem": [0, 5, 9], "autogener": 0, "opentrons_simul": [0, 9], "ex": [0, 5, 9], "window": [0, 3, 9], "m": [0, 9], "content": 0, "would": [0, 1, 2, 5, 6, 7], "nest": 0, "insid": [0, 1, 4], "payload": 0, "text": [0, 9], "depend": [0, 1, 3, 5, 8, 9], "legacy_command": 0, "older": [0, 6], "softwar": [0, 5, 6, 7], "wa": [0, 1, 8], "had": [0, 6], "do": [0, 1, 2, 3, 5, 6, 7, 9], "don": [0, 6], "t": [0, 2, 5, 6, 7], "anymor": 0, "happen": [0, 2, 9], "charact": 0, "confus": 0, "caus": [0, 1, 6, 9], "keyerror": 0, "messag": [0, 4, 9], "standard": [0, 5, 6], "logrecord": 0, "directori": [0, 9], "search": 0, "path": [0, 3, 9], "them": [0, 2, 6], "context": [0, 9], "subdirectori": 0, "jupyt": [0, 4, 5], "data": [0, 5, 9], "ignor": [0, 2], "apiv2": 0, "featur": [0, 4], "entri": 0, "non": [0, 5], "recurs": 0, "present": [0, 5], "protocol_api": 0, "protocolcontext": 0, "bundled_data": 0, "hardwar": [0, 5, 9], "mainli": 0, "necessari": 0, "stack": 0, "propag": 0, "root": 0, "handler": [0, 3], "re": [0, 5, 6, 7], "integr": 0, "larger": [0, 2], "most": [0, 2, 5, 6, 9], "best": [0, 9], "captur": 0, "debug": [0, 9], "info": [0, 1], "error": [0, 1, 2, 6, 7, 9], "user": [0, 5, 9], "possibl": [0, 6], "emit": 0, "unbundl": 0, "v2": 0, "case": [0, 7], "we": [1, 2, 3, 4, 5, 6, 7, 8, 9], "constantli": 1, "exchang": 1, "old": [1, 5, 6], "ones": 1, "prevent": 1, "cross": [1, 2], "contamin": [1, 2], "our": [1, 2, 5, 6, 7, 8, 9], "help": [1, 2, 5, 9], "constant": 1, "section": [1, 2, 4, 5, 6, 8], "few": [1, 3, 5, 9], "demonstr": [1, 5, 6], "expect": [1, 2, 6], "robot": [1, 2, 3, 4, 5, 8], "befor": [1, 5, 6, 7, 8, 9], "done": [1, 7, 9], "have": [1, 2, 5, 6, 7, 8, 9], "vacuum": 1, "a1": [1, 2, 3, 4, 5, 6], "finish": [1, 2], "autonom": 1, "altern": [1, 3], "besid": 1, "box": [1, 6], "a2": [1, 2, 3, 6], "tip_rack_1": 1, "tip_rack_2": 1, "give": [1, 6, 8], "abil": [1, 7], "send": 1, "rack_1": 1, "rack_2": 1, "etc": [1, 3, 7], "now": [1, 4, 6, 8, 9], "whenev": 1, "loop": [1, 2, 5, 6, 7, 9], "h12": [1, 2], "tips_left": 1, "94": [1, 3], "leftov": 1, "_": 1, "rang": [1, 3, 6, 7], "try": [1, 6, 7], "again": [1, 7], "api": [1, 4, 6, 7, 8, 9], "show": [1, 3], "cell": 1, "uncom": 1, "becaus": [1, 4, 8], "previou": 1, "code": [1, 2, 5, 7, 9], "block": [1, 2, 6], "order": [1, 2, 4, 6, 7], "start_at_tip": 1, "c3": [1, 6], "current_tip": 1, "print": [1, 4, 6, 9], "hold": [1, 7], "fun": [1, 5], "thing": [1, 3], "around": [1, 2, 3], "pleas": [1, 2, 5, 6], "pull": 1, "micolit": 1, "draw": 1, "mention": [1, 8], "circumst": 1, "previous": [1, 4, 6], "100ul": [1, 3, 5], "tell": [1, 2, 5, 6, 9], "alreadi": [1, 6, 7], "push": 1, "usag": [1, 5], "nearli": [1, 2], "ident": [1, 2], "b1": [1, 2, 3, 4, 5, 6], "b2": [1, 2, 5, 6], "empti": [1, 2], "That": 1, "extra": [1, 2], "so": [1, 2, 6, 7, 8, 9], "sure": [1, 9], "expel": 1, "b3": [1, 2, 6], "four": 1, "opposit": 1, "edg": [1, 2, 3], "knock": 1, "off": [1, 7], "might": 1, "hang": 1, "inner": 1, "wall": 1, "2mm": 1, "seri": [1, 2, 6], "row": [1, 2, 3, 5], "sai": 1, "take": [1, 2, 5, 6, 7], "some": [1, 2, 3, 6, 9], "slide": 1, "air_gap": [1, 2, 3], "much": [1, 5, 6], "b4": [1, 2, 6], "under": 1, "choos": [1, 2], "updat": [1, 6, 7], "OR": 1, "abl": [1, 5, 6, 7, 9], "what": [1, 2, 6, 7, 8, 9], "downward": 1, "reach": [1, 5, 6], "movement": 1, "risk": 1, "collid": 1, "Be": 1, "veri": [1, 6], "care": [1, 2], "usual": [1, 5], "sequenc": 1, "wait": [1, 5], "simul": [2, 5], "instal": [2, 5], "realli": 2, "just": [2, 3, 4, 6, 7], "even": [2, 5], "simpl": [2, 5, 9], "natur": 2, "lot": 2, "space": [2, 6], "common": [2, 5, 6, 9], "edit": 2, "refer": [2, 5], "than": [2, 6, 7], "divid": 2, "700": 2, "12": [2, 3, 6, 7], "h1": 2, "h2": 2, "c1": [2, 6], "d1": [2, 6], "d2": [2, 6], "e1": 2, "e2": 2, "f1": 2, "f2": 2, "g1": 2, "g2": 2, "attempt": 2, "evenli": 2, "aren": 2, "divis": 2, "appli": 2, "40": [2, 3], "start": [2, 3, 6, 9], "end": [2, 3, 6, 7, 9], "90": [2, 3], "70": [2, 3], "These": [2, 6, 8, 9], "240": 2, "120": 2, "55": [2, 3], "a12": [2, 3], "250": 2, "a4": [2, 6], "a5": [2, 6], "a6": [2, 6], "a7": 2, "a8": 2, "a9": 2, "a10": 2, "a11": 2, "210": 2, "recommend": [2, 5, 6, 9], "disposal_vol": 2, "There": [2, 4, 5, 6], "equal": 2, "minimum": [2, 5], "blown": 2, "accur": [2, 3], "130": 2, "begin": 2, "scenario": 2, "elsewher": 2, "By": 2, "leav": 2, "1st": 2, "2nd": 2, "75": [2, 3], "75ul": 2, "determin": 2, "nozzl": 2, "consid": [2, 6, 8], "input": [2, 7], "keep": [2, 9], "mind": 2, "via": [2, 5, 7, 9], "plate_96": 2, "plate_384": 2, "trough": [2, 3, 5, 6], "12row": [2, 3, 6], "multi_pipett": 2, "across": [2, 3, 4, 5], "column": [2, 3, 5], "h3": 2, "h4": 2, "h5": 2, "h6": 2, "h7": 2, "h8": 2, "h9": 2, "h10": 2, "h11": 2, "work": [2, 5, 6], "visit": [2, 6], "outsid": [2, 7], "boundari": 2, "alternating_wel": 2, "append": [2, 3], "list_of_wel": 2, "page": [3, 4, 5, 9], "assum": 3, "pipett": [3, 4, 7], "tiprack_1": 3, "tiprack_2": 3, "prefer": 3, "act": [3, 6, 7, 8], "upon": [3, 7, 9], "11": 3, "cannot": 3, "five": [3, 5], "sampl": 3, "35": [3, 8], "spread": 3, "30ul": 3, "25": [3, 8], "deposit": 3, "variou": 3, "refil": 3, "out": [3, 4, 5, 6, 7, 8, 9], "were": [3, 5], "randomli": 3, "water_volum": 3, "6": [3, 5, 6, 9], "9": 3, "13": 3, "15": 3, "16": 3, "17": 3, "19": 3, "21": 3, "22": 3, "23": [3, 6], "24": [3, 6], "26": 3, "27": 3, "28": 3, "29": 3, "31": 3, "32": 3, "33": 3, "34": 3, "36": 3, "37": 3, "38": 3, "39": 3, "41": 3, "42": 3, "43": [3, 8], "44": 3, "45": 3, "46": [3, 8], "47": 3, "48": [3, 6], "49": 3, "52": 3, "53": 3, "54": 3, "56": 3, "57": 3, "58": 3, "59": 3, "61": 3, "62": 3, "63": 3, "64": 3, "65": 3, "66": 3, "67": 3, "68": 3, "69": 3, "71": 3, "72": 3, "73": 3, "74": 3, "76": 3, "77": 3, "78": [3, 8], "79": 3, "81": 3, "82": 3, "83": 3, "84": 3, "85": 3, "86": 3, "87": 3, "88": 3, "89": 3, "91": 3, "92": 3, "93": 3, "95": [3, 7], "csv": 3, "open": [3, 5, 7, 9], "comput": [3, 5, 9], "oper": [3, 9], "csv_file": 3, "my_fil": 3, "l": 3, "splitlin": 3, "comma": 3, "separ": 3, "v": 3, "placeabl": [3, 5], "rotat": 3, "circl": 3, "well_edg": 3, "314": 3, "who": 4, "own": [4, 5, 6], "ie": 4, "thought": 4, "aspect": 4, "my": [4, 5], "unit": [4, 8], "millimet": [4, 8], "correspond": [4, 8], "later": [4, 5, 7, 9], "front": [4, 6, 9], "vertic": 4, "whichev": [4, 6, 9], "default_max_spe": 4, "robot_config": 4, "py": [4, 9], "max_speed_per_axi": 4, "600": [4, 8], "125": 4, "immdedi": 4, "made": [4, 6], "record": 4, "past": [4, 6], "eras": 4, "histori": 4, "clear_command": 4, "still": [4, 7, 8], "len": [4, 6], "descript": [4, 5], "inform": [4, 5, 7, 9], "hello": [4, 9], "goodby": 4, "held": 4, "get_contain": 4, "get_nam": 4, "get_typ": 4, "everyth": 4, "framework": 5, "autom": [5, 9], "biologi": 5, "lab": 5, "easi": 5, "ve": 5, "hope": 5, "anyon": 5, "basic": [5, 9], "wetlab": 5, "As": [5, 9], "bench": 5, "scientist": 5, "notebook": 5, "continu": [5, 6], "sens": 5, "structur": [5, 9], "pip": [5, 9], "packag": [5, 9], "laptop": 5, "readi": 5, "download": [5, 9], "latest": 5, "desktop": 5, "encount": 5, "product": [5, 6], "doc": [5, 9], "contact": [5, 6], "team": [5, 6], "intercom": 5, "websit": [5, 8], "com": 5, "goal": 5, "understand": [5, 9], "short": [5, 6], "me": 5, "tutori": [5, 9], "rewrit": 5, "protocolnam": 5, "author": 5, "email": 5, "address": [5, 9], "ot2": 5, "commonli": 5, "dictionari": [5, 9], "client": 5, "displai": [5, 6, 9], "about": [5, 6, 7], "being": [5, 6, 9], "field": 5, "fewer": 5, "render": 5, "anonym": 5, "opt": 5, "analyt": 5, "librari": 5, "shouldn": 5, "tube": [5, 6], "And": [5, 6], "tend": 5, "long": [5, 6], "complex": 5, "better": 5, "learn": 5, "compress": 5, "simplifi": 5, "seem": 5, "interest": [5, 6], "idea": 5, "improv": 5, "ticket": 5, "github": [5, 7], "guidelin": 5, "contribut": 5, "find": [5, 6], "involv": 5, "beginn": 5, "configur": 5, "local": 5, "storag": 5, "individu": 5, "slice": 5, "gen2": 5, "backward": 5, "compat": [5, 7], "flow": 5, "p10_singl": 5, "p10_multi": 5, "p50_singl": 5, "p50_multi": 5, "p1000_singl": 5, "p20_single_gen2": 5, "p300_single_gen2": 5, "p1000_single_gen2": 5, "atom": 5, "iter": [5, 6], "control": 5, "blow": [5, 8], "air": 5, "gap": 5, "larg": 5, "One": [5, 8], "dispos": 5, "multi": 5, "384": [5, 6], "advanc": [5, 8], "comment": 5, "onto": [5, 9], "detect": 5, "statu": 5, "temperatur": [5, 6], "setpoint": 5, "deactiv": 5, "magnet": 5, "engag": 5, "disengag": 5, "dilut": 5, "precis": 5, "pipet": 5, "spend": 6, "fair": 6, "organ": 6, "count": 6, "group": 6, "come": 6, "built": [6, 9], "along": 6, "visual": 6, "pictur": 6, "copi": 6, "statement": 6, "correct": 6, "definit": [6, 7], "publish": 6, "issu": 6, "newest": 6, "written": 6, "label": 6, "certain": 6, "my_labwar": 6, "usascientific_12_reservoir_22ml": 6, "nicknam": 6, "sometim": [6, 9], "someth": 6, "els": 6, "share": [6, 7], "td": 6, "tempdeck": [6, 7], "opentrons_96_aluminumblock_biorad_wellplate_200ul": 6, "block1": 6, "aluminum": 6, "block2": 6, "block3": 6, "creation": 6, "mechan": 6, "fairli": 6, "limit": 6, "robust": 6, "isn": 6, "consist": 6, "circular": 6, "arrang": 6, "regularli": 6, "custom_plate_nam": 6, "custom_18_wellplate_200ul": 6, "plate_nam": 6, "grid": 6, "diamet": 6, "\u00b5l": [6, 8], "custom_pl": 6, "c4": 6, "b5": 6, "c5": 6, "b6": 6, "c6": 6, "subsequ": 6, "throw": 6, "wrap": 6, "delet": 6, "databas": 6, "data_storag": 6, "delete_contain": 6, "specialti": 6, "rest": 6, "reliabl": 6, "arrai": 6, "unsupport": 6, "letter": 6, "corning_24_wellplate_3": 6, "4ml_flat": 6, "easili": 6, "d6": 6, "referenc": 6, "reason": 6, "especi": 6, "irregular": 6, "opentrons_10_tuberack_falcon_4x50ml_6x15ml_con": 6, "littl": 6, "convolut": 6, "Or": 6, "w": 6, "d4": 6, "wellseri": 6, "treat": 6, "normal": 6, "d3": 6, "revers": 6, "d5": 6, "therefor": 6, "prepar": 6, "prior": 6, "complet": 6, "switch": 6, "soon": 6, "guid": 6, "corning_6_wellplate_16": 6, "8ml_flat": 6, "corning_12_wellplate_6": 6, "9ml_flat": 6, "corning_48_wellplate_1": 6, "6ml_flat": 6, "corning_384_wellplate_112ul_flat": 6, "deep": [6, 7], "usascientific_96_wellplate_2": 6, "4ml_deep": 6, "squar": 6, "corning_96_wellplate_360ul_flat": 6, "pcr": [6, 7], "biorad_96_wellplate_200ul_pcr": 6, "tall": 6, "alum": 6, "strip": 6, "opentrons_40_aluminumblock_eppendorf_24x2ml_safelock_snapcap_generic_16x0": 6, "2ml_pcr_strip": 6, "discontinu": 6, "biorad": [6, 7], "hardshel": [6, 7], "2ml": [6, 7], "eppendorf": 6, "opentrons_24_aluminumblock_generic_2ml_screwcap": 6, "screwcap": 6, "opentrons_96_aluminumblock_generic_pcr_strip_200ul": 6, "tuberack": [6, 7], "5ml": 6, "opentrons_24_tuberack_eppendorf_1": 6, "5ml_safelock_snapcap": 6, "15_50ml": 6, "15ml": 6, "opentrons_15_tuberack_falcon_15ml_con": 6, "opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap": 6, "opentrons_24_tuberack_generic_2ml_screwcap": 6, "50ml": 6, "opentrons_6_tuberack_falcon_50ml_con": 6, "10ul": [6, 8], "opentrons_96_tiprack_10ul": 6, "rather": 6, "adapt": [6, 7], "tipone_96_tiprack_200ul": 6, "1000ul": [6, 8], "opentrons_96_tiprack_1000ul": 6, "agilent_1_reservoir_290ml": 6, "longer": 6, "reservoir": 6, "75ml": 6, "opentrons_24_tuberack_generic_0": 6, "75ml_snapcap_acryl": 6, "upgrad": 6, "opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap_acryl": 6, "opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical_acryl": 6, "miss": 6, "unsur": 6, "eventu": 6, "concern": 6, "vial": 6, "3x4": 6, "20mm": 6, "maldi": 6, "t25": 6, "flask": 6, "t75": 6, "gelgol": 6, "hampton": 6, "1ml": 6, "rigaku": 6, "compact": 6, "crystal": 6, "small_vial_rack_16x45": 6, "1row": 6, "25ml": 6, "test": [6, 7, 9], "9x9": 6, "80well": 6, "wheaton_vial_rack": 6, "document": [7, 9], "magdeck": 7, "auto": 7, "plug": 7, "navig": 7, "hit": 7, "refresh": 7, "icon": 7, "initi": 7, "discover_modul": 7, "heat": 7, "cool": 7, "idl": 7, "devic": 7, "goe": 7, "celsiu": 7, "resolut": 7, "celciu": 7, "set_temperatur": 7, "wait_for_temp": 7, "stuck": 7, "indefinit": 7, "turn": [7, 9], "fan": 7, "phase": 7, "click": 7, "tab": 7, "upload": [7, 9], "cancel": 7, "stage": [7, 9], "rise": 7, "unless": [7, 9], "18mm": 7, "roughli": 7, "elut": 7, "40ul": 7, "futur": 7, "deem": 7, "ideal": 7, "neg": 7, "power": 7, "cycl": 7, "doesn": 7, "yet": 7, "otherwis": 7, "primarili": 8, "offer": 8, "gen": 8, "behav": 8, "p20": 8, "p10": 8, "regard": 8, "p50": 8, "vari": 8, "1000": 8, "150": 8, "137": 8, "difficult": 8, "predict": 8, "public": 8, "At": 9, "high": 9, "aim": 9, "suggest": 9, "acquir": 9, "base": 9, "build": 9, "great": 9, "learnpython": 9, "org": 9, "world": 9, "condit": 9, "enough": 9, "experi": 9, "found": 9, "popular": 9, "free": 9, "editor": 9, "sublim": 9, "extens": 9, "properli": 9, "my_protocol": 9, "manag": 9, "exact": 9, "slightli": 9, "x64": 9, "x86": 9, "termin": 9, "frequent": 9, "tool": 9, "pyenv": 9, "particularli": 9, "whch": 9, "successfulli": 9, "kernel": 9, "sy": 9, "linux": 9, "similar": 9, "invok": 9, "interact": 9, "prompt": 9, "_bundl": 9, "folder": 9, "live": 9, "osx": 9, "usernam": 9, "exactli": 9, "ip": 9, "48888": 9, "browser": 9, "button": 9, "enter": 9}, "objects": {"": [[0, 0, 0, "-", "instruments"], [0, 0, 0, "-", "opentrons"]], "opentrons": [[0, 0, 0, "-", "simulate"]], "opentrons.simulate": [[0, 1, 1, "", "allow_bundle"], [0, 1, 1, "", "format_runlog"], [0, 1, 1, "", "get_arguments"], [0, 1, 1, "", "simulate"]], "pipette": [[0, 2, 1, "", "Pipette"]], "pipette.Pipette": [[0, 3, 1, "", "aspirate"], [0, 3, 1, "", "blow_out"], [0, 3, 1, "", "consolidate"], [0, 3, 1, "", "delay"], [0, 3, 1, "", "dispense"], [0, 3, 1, "", "distribute"], [0, 3, 1, "", "drop_tip"], [0, 3, 1, "", "home"], [0, 3, 1, "", "mix"], [0, 3, 1, "", "move_to"], [0, 3, 1, "", "pick_up_tip"], [0, 3, 1, "", "return_tip"], [0, 3, 1, "", "set_flow_rate"], [0, 3, 1, "", "touch_tip"], [0, 3, 1, "", "transfer"]], "placeable": [[0, 2, 1, "", "Placeable"]], "placeable.Placeable": [[0, 3, 1, "", "bottom"], [0, 3, 1, "", "center"], [0, 3, 1, "", "from_center"], [0, 3, 1, "", "top"]], "robot": [[0, 2, 1, "", "Robot"]], "robot.Robot": [[0, 3, 1, "", "add_instrument"], [0, 3, 1, "", "connect"], [0, 3, 1, "", "disconnect"], [0, 3, 1, "", "get_warnings"], [0, 3, 1, "", "head_speed"], [0, 3, 1, "", "home"], [0, 3, 1, "", "move_to"], [0, 3, 1, "", "pause"], [0, 3, 1, "", "reset"], [0, 3, 1, "", "resume"], [0, 3, 1, "", "stop"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"api": [0, 5], "refer": [0, 6], "robot": [0, 6, 7, 9], "pipett": [0, 1, 2, 5, 8], "placeabl": 0, "simul": [0, 9], "atom": 1, "liquid": [1, 2], "handl": [1, 2], "tip": [1, 2], "pick": 1, "up": 1, "drop": 1, "return": [1, 2], "iter": 1, "attach": 1, "rack": 1, "through": 1, "reset": [1, 4], "track": 1, "select": 1, "start": [1, 5], "get": [1, 2, 4, 5], "current": [1, 7], "control": [1, 4], "aspir": 1, "dispens": 1, "blow": [1, 2], "out": [1, 2], "touch": [1, 2], "mix": [1, 2], "air": [1, 2, 3], "gap": [1, 2, 3], "speed": [1, 4], "move": 1, "To": [1, 6], "delai": 1, "complex": 2, "transfer": [2, 3], "basic": [2, 3], "larg": 2, "volum": [2, 8], "multipl": [2, 3, 6], "well": [2, 6], "One": 2, "mani": 2, "few": 2, "list": [2, 6], "gradient": 2, "distribut": 2, "consolid": 2, "dispos": 2, "option": 2, "alwai": 2, "new": 2, "never": 2, "us": [2, 9], "trash": 2, "befor": 2, "after": 2, "multi": 2, "channel": 2, "96": 2, "plate": [2, 3], "384": 2, "exampl": 3, "loop": 3, "dilut": 3, "map": 3, "precis": 3, "pipet": 3, "advanc": 4, "user": 4, "specifi": 4, "paus": 4, "head": 4, "home": 4, "command": [4, 5], "clear": 4, "comment": 4, "contain": 4, "ot": 5, "2": 5, "python": [5, 9], "version": [5, 6], "1": 5, "troubleshoot": 5, "overview": 5, "how": 5, "look": 5, "s": [5, 8, 9], "organ": 5, "import": [5, 6], "metadata": 5, "labwar": [5, 6], "featur": 5, "request": 5, "develop": 5, "guid": 5, "librari": 6, "place": 6, "deck": [6, 7], "load": [6, 7], "creat": [6, 8], "deprec": 6, "access": 6, "individu": 6, "name": 6, "index": 6, "column": 6, "row": 6, "length": 6, "slice": 6, "hardwar": 7, "modul": 7, "your": [7, 9], "onto": 7, "detect": 7, "check": 7, "statu": 7, "temperatur": 7, "set": 7, "wait": 7, "until": 7, "setpoint": 7, "reach": 7, "read": 7, "target": 7, "deactiv": 7, "magnet": 7, "engag": 7, "disengag": 7, "model": 8, "gen2": 8, "backward": 8, "compat": 8, "plunger": 8, "flow": 8, "rate": 8, "minimum": 8, "maximum": 8, "p10_singl": 8, "p10_multi": 8, "p50_singl": 8, "p50_multi": 8, "p300_singl": 8, "p300_multi": 8, "p1000_singl": 8, "p20_single_gen2": 8, "p300_single_gen2": 8, "p1000_single_gen2": 8, "old": 8, "constructor": 8, "In": 9, "protocol": 9, "beginn": 9, "work": 9, "instal": 9, "non": 9, "jupyt": 9, "script": 9, "configur": 9, "local": 9, "storag": 9, "notebook": 9}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/api/docs/dist/v1/writing.html b/api/docs/dist/v1/writing.html new file mode 100644 index 000000000000..6b2f41ffdba7 --- /dev/null +++ b/api/docs/dist/v1/writing.html @@ -0,0 +1,1472 @@ + + + + + + + + + Using Python In Protocols — OT-2 Python API Version 1 Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+

Using Python In Protocols

+

Writing protocols in Python requires some up-front design before seeing your liquid handling automation in action. At a high-level, writing protocols with the Opentrons API looks like:

+
    +
  1. Write a Python protocol

  2. +
  3. Test the code for errors

  4. +
  5. Repeat steps 1 & 2

  6. +
  7. Calibrate labware on robot

  8. +
  9. Run your protocol

  10. +
+

These sets of documents aim to help you get the most out of steps 1 & 2, the “design” stage.

+
+
+

Python for Beginners

+

If Python is new to you, we suggest going through a few simple tutorials to acquire a base understanding to build upon. The following tutorials are a great starting point for working with the Opentrons API (from learnpython.org):

+
    +
  1. Hello World

  2. +
  3. Variables and Types

  4. +
  5. Lists

  6. +
  7. Basic Operators

  8. +
  9. Conditions

  10. +
  11. Loops

  12. +
  13. Functions

  14. +
  15. Dictionaries

  16. +
+

After going through the above tutorials, you should have enough of an understanding of Python to work with the Opentrons API and start designing your experiments! +More detailed information on python can always be found at the python docs

+
+
+
+

Working with Python

+

Using a popular and free code editor, like Sublime Text 3, is a common method for writing Python protocols. Download onto your computer, and you can now write and save Python scripts.

+
+

Note

+

Make sure that when saving a protocol file, it ends with the .py file extension. This will ensure the App and other programs are able to properly read it.

+

For example, my_protocol.py

+
+
+
+

Simulating Python Protocols

+

In general, the best way to simulate a protocol is to simply upload it to an OT 2 through the Opentrons app. When you upload a protocol via the Opentrons app, the robot simulates the protocol and the app displays any errors. However, if you want to simulate protocols without being connected to a robot, you can download the Opentrons python package.

+
+

Installing

+

To install the Opentrons package, you must install it from Python’s package manager, pip. The exact method of installation is slightly different depending on whether you use Jupyter on your computer (note: you do not need to do this if you want to use the Robot’s Jupyter Notebook, ONLY for your locally-installed notebook) or not.

+
+

Non-Jupyter Installation

+

First, install Python 3.7 (Windows x64, Windows x86, OS X) on your local computer.

+

Once the installer is done, make sure that Python is properly installed by opening a terminal and doing python --version. If this is not 3.7.6, you have another version of Python installed; this happens frequently on OS X and sometimes on windows. We recommend using a tool like pyenv to manage multiple Python versions. This is particularly useful on OS X, whch has a built in install of Python 2.7 that should not be removed.

+

Once python is installed, install the opentrons package using pip:

+
pip install opentrons
+
+
+

You should see some output that ends with Successfully installed opentrons-3.6.5 (the version number may be different).

+
+
+

Jupyter Installation

+

You must make sure that you install the opentrons package for whichever kernel and virtual environment the notebook is using. A generally good way to do this is

+
import sys
+!{sys.executable} -m pip install opentrons
+
+
+
+
+
+

Simulating Your Scripts

+

Once the Opentrons Python package is installed, you can simulate protocols in your terminal using the opentrons_simulate command:

+
opentrons_simulate.exe my_protocol.py
+
+
+

or, on OS X or linux,

+
opentrons_simulate my_protocol.py
+
+
+

The simulator will print out a log of the actions the protocol will cause, similar to the Opentrons app; it will also print out any log messages caused by a given command next to that list of actions. If there is a problem with the protocol, the simulation will stop and the error will be printed.

+

The simulation script can also be invoked through python with python -m opentrons.simulate /path/to/protocol.

+

This also provides an entrypoint to use the Opentrons simulation package from other Python contexts such as an interactive prompt or Jupyter. To simulate a protocol in python, open a file containing a protocol and pass it to opentrons.simulate.simulate:

+
from opentrons.simulate import simulate, format_runlog
+# read the file
+protocol_file = open("/path/to/protocol.py")
+# simulate() the protocol, keeping the runlog
+runlog, _bundle = simulate(protocol_file)
+# print the runlog
+print(format_runlog(runlog))
+
+
+

The opentrons.simulate.simulate() method does the work of simulating the protocol and returns the run log, which is a list of structured dictionaries. opentrons.simulate.format_runlog() turns that list of dictionaries into a human readable string, which is then printed out. For more information on the protocol simulator, see Simulation.

+
+
+

Configuration and Local Storage

+

The module uses a folder in your user directory as a place to store and read configuration and changes to its internal data. For instance, if your protocol creates a custom labware, the custom labware will live in the local storage location. This location is ~/.opentrons on Linux or OSX and C:\Users\%USERNAME%\.opentrons on Windows.

+
+
+
+

Robot’s Jupyter Notebook

+

For a more interactive environment to write and debug using some of our API tools, we recommend using the Jupyter notebook which is installed on the robot. Using this notebook, you can develop a protocol by running its commands line-by-line, ensuring they do exactly what you want, before saving the protocol for later execution.

+

You can access the robot’s Jupyter notebook by following these steps:

+
    +
  1. Open your Opentrons App and look for the IP address of your robot on the robot information page.

  2. +
  3. Type in (Your Robot's IP Address):48888 into any browser on your computer.

  4. +
+

Here, you can select a notebook and develop protocols that will be saved on the robot itself. Note that these protocols will only be on the robot unless specifically downloaded to your computer using the File / Download As buttons in the notebook.

+
+

Note

+

When running protocol code in a Jupyter notebook, before executing protocol steps you must call robot.connect():

+
from opentrons import robot
+robot.connect()
+
+
+

This tells the notebook to connect to the robot’s hardware so the commands you enter actually cause the robot to move.

+

However, this happens automatically when you upload a protocol through the Opentrons app, and connecting twice will cause errors. To avoid this, remove the call to robot.connect() before uploading the protocol through the Opentrons app.

+
+
+
+ + +
+
+
+
+
+ + + + + + + \ No newline at end of file