Linking Datasets from Multiple Files [DAWN 2.2]

In DAWN 2.2 it is possible to link datasets from multiple different files into one "virtual" dataset by creating a simple linking text file. For example this could be used to generate a 4D dataset from a grid scan of an imaging detector that collects a single tiff at each point (virtual dataset shape would be [scan y, scan x, tiff size y, tiff size x]) or combining multiple line scans in HDF files into a grid scan.

An example text file can be found below. To work, the file should have the extension .dawn.

# DIR_NAME : /home/me/data/tiffs/
# DATASET_NAME: image-01
# SHAPE: 3,4
# FILE_NAME
00001.tif
00002.tif
00003.tif
00004.tif
00005.tif
00006.tif
00007.tif
00008.tif
00009.tif
00010.tif
00011.tif
00012.tif

 

The header needs to contain # DIR_NAME followed by a colon then the path to directory the files are in.

Then (possibly multiple)  # DATASET_NAME entries, which are the names of the datasets you wish to link

An optional # SHAPE entry if the data should not just be stacked

Then # FILE_NAME followed by the name of the file (found in the directory specified by DIR_NAME). If the files are spread across multiple directories, DIR_NAME can be the root directory (/) then the  FILE_NAME would be home/me/data/tiffs/00001.tif etc

Additional datasets can be added to this file (for example the I0 value associated with each frame) by adding more tab-separated columns in addition to the FILE_NAME column.

Creating Link Files using the Command Line

If you are confident using the command line on Windows or Linux the list of files required for this file can be easily created.

Navigate to the folder containing the files and:

On windows type: dir /b > my_link_file.dawn

On Linux type: ls > my_link_file.dawn

The file created, my_link_file.dawn, should contain a list of all the files in the directory which the header can then be added to. As with most command-line tools wildcard matching can be used to only select certain files during the ls or dir step.