Command-line processing [DAWN 2.1]
Once a processing chain has been configured, data can be processed without starting the DAWN UI, by calling dawn from the command-line using the following arguments:
-noSplash -application org.dawnsci.commandserver.processing.processing -data @none -path /path/to/config/file.json
The .json file is a JSON config file which specifies which data to process, to where, and where the file that contains the processing steps is.
Below is an example structure for a config file:
{ "name": "HeadlessProcessingRun", "runDirectory": "/path/to/temp/folder", "filePath": "/path/to/file/to/process.nxs", "datasetPath": "/entry/dataset_name/data", "axesNames": [["/entry/dataset_name/axis_dim0_0","/entry/dataset_name/axis_dim0_1"],null,null], "outputFilePath": "/path/to/output/file.nxs", "dataDimensions": [1,2], "processingPath": "/path/to/processing/chain.nxs", "deleteProcessingFile": false }
Here is a description of what should be in each file:
name : just a label, can be any string you like
runDirectory : temporary folder where logging can be stored
filePath : path to the data file you want to process
datasetPath: name of the dataset in the file
axesNames: names of the axes dataset you wish to propagate with the data. Is a list of lists "[[something], [something, another], [something]]", i.e. 1 list for each dimension of the data you are processing. For example, for a temperature scan of a detector with energy and angle axis, where you want to propagate the temperature and time axis of the scan dimension the list would be [[temperature, time], [angle], [energy]].
outputFilePath : path to the output file to be created
dataDimensions: the dimensions of the dataset that correspond to the frame to be processed. For example, a single image, processed as an image would have dataDimensions of [0,1], processing the images from a stack would have dataDimensions of [1,2], and processing images from a 2d grid scan would have [2,3].
processingPath: path to the processing chain description exported from the processing perspective (or a previously processed file)
deleteProcessingFile: set to false to stop the process deleting the exported chain when it is finished.