Rebin+sum ROI collectionΒΆ
The results of an stscan can be processed as described in J. Appl. Cryst. (2021). 54, 1088-1099.
{
"directed": true,
"multigraph": false,
"graph": {
"id": "rebinsum",
"schema_version": "1.0"
},
"nodes": [
{
"task_type": "class",
"task_identifier": "ewoksid22.wait.WaitScansFinished",
"default_inputs": [
{
"name": "filename",
"value": "/data/id22/inhouse/id222206/id22/CD_GC_June2022_CeZnTi/CD_GC_June2022_CeZnTi_0001/CD_GC_June2022_CeZnTi_0001.h5"
}
],
"id": "wait"
},
{
"task_type": "class",
"task_identifier": "ewoksid22.rebin.ID22Rebin",
"default_inputs": [
{
"name": "parsfile",
"value": "/data/id22/inhouse/CD_GC_PDF/advanced_50keV/patterns/for_wout/out7.pars"
},
{
"name": "delta2theta",
"value": 0.003
},
{
"name": "startp",
"value": 31
},
{
"name": "device",
"value": 0
},
{
"name": "outdirs",
"value": {
"primary": "pyresults",
"secondary": "pyresults/backup"
}
}
],
"id": "rebin"
},
{
"task_type": "class",
"task_identifier": "ewoksid22.convert.ID22H5ToSpec",
"default_inputs": [
{
"name": "outdirs",
"value": {
"primary": "pyresults",
"secondary": "pyresults/backup"
}
}
],
"id": "convert"
},
{
"task_type": "class",
"task_identifier": "ewoksid22.sum.ID22Sum",
"default_inputs": [
{
"name": "outdir",
"value": "pyresults"
},
{
"name": "resfile",
"value": "/data/id22/inhouse/CD_GC_PDF/advanced_50keV/patterns/for_wout/temp.res"
},
{
"name": "binsize",
"value": 0.002
},
{
"name": "sum_single",
"value": true
},
{
"name": "sum_all",
"value": true
},
{
"name": "outdirs",
"value": {
"primary": "pyresults",
"secondary": "pyresults/backup"
}
}
],
"id": "sum"
}
],
"links": [
{
"data_mapping": [
{
"source_output": "filename",
"target_input": "filename"
},
{
"source_output": "entries",
"target_input": "entries"
}
],
"source": "wait",
"target": "rebin"
},
{
"data_mapping": [
{
"source_output": "filename",
"target_input": "filename"
},
{
"source_output": "entries",
"target_input": "entries"
}
],
"source": "wait",
"target": "convert"
},
{
"data_mapping": [
{
"source_output": "filename",
"target_input": "raw_filename"
}
],
"source": "wait",
"target": "sum"
},
{
"data_mapping": [
{
"source_output": "outfile",
"target_input": "rebin_filename"
}
],
"source": "rebin",
"target": "convert"
},
{
"data_mapping": [
{
"source_output": "outfile",
"target_input": "filename"
}
],
"source": "convert",
"target": "sum"
}
]
}
You can run it manually as follows
ewoks execute examples/rebinsum.json \
-p wait:filename=/path/to/dataset.h5 \
-p 'wait:entries=["1.1","2.1"]' \
-p rebin:delta2theta=0.003 \
-p sum:binsize=0.002 \
-p rebin:outprefix=hc5204 \
-p primary_outdir=/data/visitor/hc5204/id22/20230404/PROCESSED_DATA \
--inputs=all
Workflow parameters are specified by the pattern -p ID:NAME=VALUE where ID is the id of the node in the graph (see above) and NAME is the name of the parameter to be set.