Notebook name: sequential_combine_images_using_metadata.ipynb
This notebook was implemented to automatically combine runs according to any of the metadata you select.
In other words, let’s pretend you take 10 images at a given sample position, move the sample then take another 10 images, until the end of the cycle. The algorithm will look at the metadata value you selected, in this case 2 motor positions, and if they match within a given range (1 by default), the images are considered to be of the same sample at the same place. They will be combined. If one of the metadata is outside the error range, or if the name of the run changed, then this is considered to be a different run or/and different location.
The notebook will create a dictionary of run # -> position# -> list of files. This then wll be used to combine the images using 1 of 3 different algorithms (check the following notebook to learn more about those algorithms combine_images)
Using the folder selection tool, select the folders containing the images you want to work on.
Using the first file of the folder selected, the notebook will display the list of metadata (and their value) to let you select which metadata we need to check to decide if the new file needs to be combine to the previous one or not.
By default, 2 metadata are selected
What algorithm do you want to use to combine them. You have the option to add or to mean (arithmetic mean or geometric mean) those images.
The program will load the data, in order to retrieve the metadata, and will create the list that will be used in the final step to merge the data. If anything seems wrong during this step, contact me (Jean Bilheux)
Using the folder selection tool, select the output location.
A double progress bar (folder and file progress) will show you the progress of the combination of the folders.