====== Convert image file series ======
===== Introduction =====
Typical diamond anvil cell beamlines generate series of diffraction files in various formats, which are not the [[fileformat:edf|EDF]] format used in further processing. The tools here can be used to convert the files into the proper format.
Data collected at step scans have a starting ω position, an end ω position, and a step size δω. Diffraction are collected at each ω and save in files such as ''name-0000.tif'', ''name-0001.tif'', etc. For instance, if you collect data from -2° to +2° with a step size of 1.0°, starting from image 5, with a stem ''mydata'', you will save the following data files
* ''mydata-0005.tif'' for a scan between ω = -2.0° to -1.0° with an average ω of -1.5°,
* ''mydata-0006.tif'' for a scan between ω = -1.0° to -0.0° with an average ω of -0.5°,
* ''mydata-0007.tif'' for a scan between ω = +0.0° to +1.0° with an average ω of -0.5°,
* ''mydata-0008.tif'' for a scan between ω = +1.0° to +2.0° with an average ω of -1.5°.
The scripts ''timelessTiff2edf'' and ''timelessMccd2edf'', which are both part of the [[software:timelesstools|TIMEleSS tools]], are meant to convert such file series into series of EDF files.
Watch out! You can generate vast amount of data! You may want to include such scripts into larger scripts as you develop your data processing strategy.
===== timelessTiff2edf =====
timelessTiff2edf -h
usage: timelessTiff2edf -f from -t to -s step -n stem -i first image [OPTIONS]
Creates a list of EDF files based on a collection of TIFF files This is part
of the TIMEleSS project http://timeless.texture.rocks
optional arguments:
-h, --help show this help message and exit
-f FROM, --from FROM Start for omega scan (in degrees, required)
-t TO, --to TO End for omega scan (in degrees, required)
-s STEP, --step STEP Omega step (in degrees, required)
-n STEM, --stem STEM Stem for images files (required)
-i IMAGEFIRST, --imagefirst IMAGEFIRST
Number of first image file in series (required)
-p TIFFIMAGEPATH, --tiffimagepath TIFFIMAGEPATH
Path to tiff images. Default is ./
-e EDFIMAGEPATH, --edfimagepath EDFIMAGEPATH
Path in which to save edf images. Default is ./
-x EXTENSION, --extension EXTENSION
Extension for tiff files. Default is tif
-d NDIGITS, --ndigits NDIGITS
Number of digits for file number. Default is 4
===== timelessMccd2edf =====
timelessMccd2edf -h
usage: timelessMccd2edf -f from -t to -s step -n stem -i first image [OPTIONS]
Creates a list of EDF files based on a collection of MarCCD files This is part
of the TIMEleSS project http://timeless.texture.rocks
optional arguments:
-h, --help show this help message and exit
-f FROM, --from FROM Start for omega scan (in degrees, required)
-t TO, --to TO End for omega scan (in degrees, required)
-s STEP, --step STEP Omega step (in degrees, required)
-n STEM, --stem STEM Stem for images file (required)
-i IMAGEFIRST, --imagefirst IMAGEFIRST
Number of first image file in series (required)
-p MCCDIMAGEPATH, --mccdimagepath MCCDIMAGEPATH
Path to MarCCD images. Default is ./
-e EDFIMAGEPATH, --edfimagepath EDFIMAGEPATH
Path in which to save edf images. Default is ./
-x EXTENSION, --extension EXTENSION
Extension for MarCCD files. Default is mccd
-d NDIGITS, --ndigits NDIGITS
Number of digits for file number. Default is 4