There are cases where several images have to be taken to cover the entire sample, as this one is going through changes. To automate the acquisition, the system acquires the images going from one full cycle, full coverage of the sample, to the next one without any changes in the location of the files, or even information in the name of the files. This notebook will look at all the images of a given folder and will group them by cycle, then it will sort them in order to facilitate the work when stitching them together. This sorting can be something like working in rows first from left to right.

The following illustration shows this type of acquisition

The goal of this notebook is to go from a continuous list of files in the same folder to a sorted list of cycles



Select your IPTS

Need help using the IPTS selector?

Select the input folder

Using the file selection tool, select the folder containing the data to work with.

The program will then automatically group the data by cycle using 2 PVs, data acquisition metadata, called MotLiftTable and MotLongAxis. Those PVs record the vertical and horizontal positions of the sample table. A simple change can be done in the code to allow the program to use other, or more, PVs (contact Jean Bilheux to learn more about this advanced feature).

The notebook will list the name of the input folder and the number of files, only TIFF, found in that folder. Then on the left, you will find the list of groups created. Just click on any of those groups to see the name of the files that belong to the group and the corresponding metadata.


Sort files

Running the cell will allow you to select how your want to sort the files within each group/cycle.

For example, if you define MotLiftTable as your first variable, the files will be sorted as illustrated here.

The bottom widgets allow you to browse through the groups and see how the files will be sorted and renamed.

Select the output folder

Using the folder selection tool, select the output location

The notebook will create a folder named based on the input folder name and then will create a folder for each group of images.