Convert HDF5 to SPEC#

The following workflow is used for online data conversion of stscan HDF5 data

{
  "directed": true,
  "multigraph": false,
  "graph": {
    "id": "convert_to_spec",
    "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.convert.ID22H5ToSpec",
      "default_inputs": [
        {
          "name": "outdirs",
          "value": {
            "primary": "pyresults",
            "secondary": "pyresults/backup"
          }
        }
      ],
      "id": "convert"
    }
  ],
  "links": [
    {
      "data_mapping": [
        {
          "source_output": "filename",
          "target_input": "filename"
        },
        {
          "source_output": "entries",
          "target_input": "entries"
        }
      ],
      "source": "wait",
      "target": "convert"
    }
  ]
}

You can run it manually as follows

ewoks execute examples/convert.json \
    -p wait:filename=/path/to/dataset.h5 \
    -p 'wait:entries=["1.1","2.1"]' \
    -p convert: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.