The Ultimate X,Y,Z Automation

How to Make the Ultimate X,Y,Z time-lapse automation with array variables

Impress your colleagues with a fantastic XYZ experience.

Arrays are variables that can be referenced using a name and an index, a variable that holds an array of values. The combination of the two uniquely identifies the variable.

What I set out to do in this technical note is to guide you through writing an X,Y,Z,T automation that uses array variables.

To take advantage of this you will need a scope capable of X,Y and Z automation that is fully controlled by Openlab.

Lets say for instance that you want to run an X,Y automation over time on a well plate with 24 wells, only problem is the sample in each of the wells is at a different focal plane.

Lets start.

Go to the Automator menu and select "New Automation"

Every Automation should begin with a "Start" task and end with an "End" task, click and drag these from the Automator essentials.

The next task should be a "Target Image Window" task, you’ll need one in this automation sooner rather than later so use it now.

Lets break the automation construction into manageable chunks.

Here is the first of the all important loops.

The Input task merely asks how many wells in the plates do you have?

At the end of the day it doesn’t have to be a well plate, you could just consider 24 independent positions that you want to define in X,Y and Z.

The "Loop" task then uses the output of the "plate-no" variable to define the number of loops.

Please note that it puts the loop count into the variable "count" - this is important.

The Tell tasks prompts you into moving to the appropriate position in X, Y and Z.

In other words move the stage (x,y) and z axis until you have reached the position you want to store, then press continue.

The set-up dialog is below.

OK the next part is where we use the array variables.

But first you have to create them. This used to be quite laborious as you needed to create each in turn, but there is now a convenient task to generate as many as you like (within reason!!).

Go to the "Windows" menu and open the Automator’s variable window.

In this window you will see a button called "New Array"

Click on this button.

The following set-up dialog will appear.

In the dialogue above I am creating the required number of variables for all of the positions in x.

When writing the automation you will need to repeat this for y and z.

Strictly speaking you do not have to create the variables at this point, you can do this any time before you run the automation.

Next are the all important get stage and focus position tasks, the question is how do you put the position into the corresponding variable ?

To do this you need to use a custom variable.

Let me demonstrate with x, it is the same procedure for y and z.

Select Custom from the drop down list of variables.

Type in "x[count]" as the Custom variable.

Notice this will use the value of the loopcount, each time the loop count changes so will the custom variable.

So the first loop the custom variable will be "x[1]" the second loop will be "x[2]" etc etc.

Do the same for "y" and set up "z" in the "Get position (Z)" task.

That’s the most complicated part over with, the next phase of the automation is pretty straight forward.

The first input asks for the length of the experiment in hours and puts the answer into a variable called "hours"

The second input task asks for the delay between well sequences and puts the answer into a variable "minutes"

Remember folks you don’t have to use the same variables as me, these are just a serving suggestion.

Now to calculate the number of loops.

Notice that the "hours" variable is multiplied by 60 to get the appropriate value in minutes (same units as the minutes variable).

This is then divided by the "minutes" variable to obtain the number of loops.

The loop count is put into the variable "sequence_no" for use in the name of the captured layer.

The delay needs to be in seconds therefore we have to multiply the variable "minutes" by 60 for the delay task.

This delay task only works in seconds.

The next loop task is set up exactly the same as the first loop.

It loops "plate-no" times and puts the output into the variable "count"

The final part of the automation re-visits the x,y and z positions then captures.

To do this set up the "Move XY Stage" and "Move to (Z)" task as show below.

It’s a good idea to set up a name in the "Capture Layer" task so that you know which layer is which.

Here is the set-up for your reference.