From 754b39e4df386768592a079d677eec515e7c4e8b Mon Sep 17 00:00:00 2001 From: Thomas VINCENT <thomas.vincent@esrf.fr> Date: Fri, 22 Nov 2024 11:56:33 +0100 Subject: [PATCH] Add Save as ASCII task to the integrate_with_saving workflows --- workflows/integrate_with_saving.json | 151 ++++++------- .../integrate_with_saving_with_flat.json | 201 ++++++++---------- 2 files changed, 168 insertions(+), 184 deletions(-) diff --git a/workflows/integrate_with_saving.json b/workflows/integrate_with_saving.json index 78120ea..74c24be 100644 --- a/workflows/integrate_with_saving.json +++ b/workflows/integrate_with_saving.json @@ -1,71 +1,30 @@ { - "links": [ + "graph": { + "id": "integrate_with_saving", + "label": "Integrate with saving" + }, + "nodes": [ { - "source": "0", - "target": "1", - "data_mapping": [ - { - "source_output": "detector_config", - "target_input": "detector_config" - }, - { - "source_output": "energy", - "target_input": "energy" - }, - { - "source_output": "integration_options", - "target_input": "integration_options" - }, - { - "source_output": "detector", - "target_input": "detector" - }, - { - "source_output": "mask", - "target_input": "mask" - }, - { - "source_output": "geometry", - "target_input": "geometry" - } - ], - "conditions": [], - "on_error": false, - "map_all_data": false, - "required": false, + "id": "ewoksxrpd.tasks.ascii.SaveNexusPatternsAsAscii0", + "label": "export_as_ascii", + "task_type": "class", + "task_identifier": "ewoksxrpd.tasks.ascii.SaveNexusPatternsAsAscii", "uiProps": { - "label": "detector_config->detector_config, ...", - "comment": "", - "type": "", - "markerEnd": "", - "style": { - "stroke": "#96a5f9" - }, - "animated": false, - "sourceHandle": "sr", - "targetHandle": "tl", - "getAroundProps": { - "x": 0, - "y": 0 + "icon": "default.png", + "position": { + "x": 645, + "y": 150 } } - } - ], - "nodes": [ + }, { - "id": "0", + "id": "config", "label": "config", "task_type": "class", "task_identifier": "ewoksxrpd.tasks.pyfaiconfig.PyFaiConfig", - "inputs_complete": false, "task_generator": "", "default_error_node": false, - "default_inputs": [], "uiProps": { - "nodeWidth": 120, - "type": "internal", - "icon": "", - "comment": "", "position": { "x": -165, "y": 15 @@ -73,23 +32,17 @@ "moreHandles": false, "withImage": true, "withLabel": true, - "colorBorder": "" + "nodeWidth": 120 } }, { - "id": "1", + "id": "integrate", "label": "integrate", "task_type": "class", "task_identifier": "ewoksxrpd.tasks.integrate.IntegrateBlissScan", - "inputs_complete": false, "task_generator": "", "default_error_node": false, - "default_inputs": [], "uiProps": { - "nodeWidth": 120, - "type": "internal", - "icon": "", - "comment": "", "position": { "x": 285, "y": 15 @@ -97,18 +50,66 @@ "moreHandles": false, "withImage": true, "withLabel": true, - "colorBorder": "" + "nodeWidth": 120 } } ], - "graph": { - "id": "integrate_with_saving", - "label": "Integrate with saving", - "category": "", - "input_nodes": [], - "output_nodes": [], - "uiProps": { - "notes": [] + "links": [ + { + "source": "config", + "target": "integrate", + "data_mapping": [ + { + "source_output": "detector_config", + "target_input": "detector_config" + }, + { + "source_output": "energy", + "target_input": "energy" + }, + { + "source_output": "integration_options", + "target_input": "integration_options" + }, + { + "source_output": "detector", + "target_input": "detector" + }, + { + "source_output": "mask", + "target_input": "mask" + }, + { + "source_output": "geometry", + "target_input": "geometry" + } + ], + "on_error": false, + "required": false, + "map_all_data": false, + "uiProps": { + "label": "detector_config->detector_config, ...", + "markerEnd": "none", + "animated": false + } + }, + { + "source": "integrate", + "target": "ewoksxrpd.tasks.ascii.SaveNexusPatternsAsAscii0", + "data_mapping": [ + { + "source_output": "nxdata_url", + "target_input": "nxdata_url" + }, + { + "source_output": "info", + "target_input": "header" + } + ], + "map_all_data": false, + "uiProps": { + "label": "nxdata_url->nxdata_url, info->header" + } } - } -} + ] +} \ No newline at end of file diff --git a/workflows/integrate_with_saving_with_flat.json b/workflows/integrate_with_saving_with_flat.json index 181bbff..28f5a2c 100644 --- a/workflows/integrate_with_saving_with_flat.json +++ b/workflows/integrate_with_saving_with_flat.json @@ -1,122 +1,50 @@ { - "links": [ + "graph": { + "id": "integrate_with_saving_with_flat", + "label": "Integrate with saving and with flat" + }, + "nodes": [ { - "source": "0", - "target": "1", - "data_mapping": [ - { - "source_output": "detector_config", - "target_input": "detector_config" - }, - { - "source_output": "energy", - "target_input": "energy" - }, - { - "source_output": "integration_options", - "target_input": "integration_options" - }, - { - "source_output": "detector", - "target_input": "detector" - }, - { - "source_output": "mask", - "target_input": "mask" - }, - { - "source_output": "geometry", - "target_input": "geometry" - } - ], - "conditions": [], - "on_error": false, - "map_all_data": false, - "required": false, + "id": "ewoksxrpd.tasks.ascii.SaveNexusPatternsAsAscii0", + "label": "export_as_ascii", + "task_type": "class", + "task_identifier": "ewoksxrpd.tasks.ascii.SaveNexusPatternsAsAscii", + "default_inputs": [], "uiProps": { - "label": "detector_config->detector_config, ...", - "comment": "", - "type": "", - "markerEnd": "", - "style": { - "stroke": "#96a5f9" - }, - "animated": false, - "sourceHandle": "sr", - "targetHandle": "tl", - "getAroundProps": { - "x": 0, - "y": 0 + "icon": "default.png", + "position": { + "x": 600, + "y": 165 } } }, - { - "source": "ewoksid31.tasks.flatfield.FlatFieldFromEnergy0", - "target": "1", - "data_mapping": [], - "conditions": [], - "on_error": false, - "map_all_data": true, - "required": false, - "uiProps": { - "label": "flatfield->flatfield", - "comment": "", - "type": "default", - "markerEnd": { - "type": "arrowclosed" - }, - "style": { - "stroke": "#96a5f9" - }, - "animated": false, - "sourceHandle": "sr", - "targetHandle": "tl", - "getAroundProps": { - "x": 0, - "y": 0 - } - } - } - ], - "nodes": [ { "id": "ewoksid31.tasks.flatfield.FlatFieldFromEnergy0", "label": "FlatFieldFromEnergy", "task_type": "class", "task_identifier": "ewoksid31.tasks.flatfield.FlatFieldFromEnergy", - "inputs_complete": false, "task_generator": "", "default_error_node": false, - "default_inputs": [], "uiProps": { - "nodeWidth": 100, - "type": "internal", "icon": "default.png", - "comment": "", "position": { - "x": 0, - "y": -135 + "x": -30, + "y": -180 }, "moreHandles": false, "withImage": true, "withLabel": true, - "colorBorder": "" + "nodeWidth": 100 } }, { - "id": "0", + "id": "config", "label": "config", "task_type": "class", "task_identifier": "ewoksxrpd.tasks.pyfaiconfig.PyFaiConfig", - "inputs_complete": false, "task_generator": "", "default_error_node": false, - "default_inputs": [], "uiProps": { - "nodeWidth": 120, - "type": "internal", - "icon": "", - "comment": "", "position": { "x": -165, "y": 15 @@ -124,23 +52,17 @@ "moreHandles": false, "withImage": true, "withLabel": true, - "colorBorder": "" + "nodeWidth": 120 } }, { - "id": "1", + "id": "integrate", "label": "integrate", "task_type": "class", "task_identifier": "ewoksxrpd.tasks.integrate.IntegrateBlissScan", - "inputs_complete": false, "task_generator": "", "default_error_node": false, - "default_inputs": [], "uiProps": { - "nodeWidth": 120, - "type": "internal", - "icon": "", - "comment": "", "position": { "x": 285, "y": 15 @@ -148,18 +70,79 @@ "moreHandles": false, "withImage": true, "withLabel": true, - "colorBorder": "" + "nodeWidth": 120 } } ], - "graph": { - "id": "integrate_with_saving_with_flat", - "label": "Integrate with saving and with flat", - "category": "", - "input_nodes": [], - "output_nodes": [], - "uiProps": { - "notes": [] + "links": [ + { + "source": "config", + "target": "integrate", + "data_mapping": [ + { + "source_output": "detector_config", + "target_input": "detector_config" + }, + { + "source_output": "energy", + "target_input": "energy" + }, + { + "source_output": "integration_options", + "target_input": "integration_options" + }, + { + "source_output": "detector", + "target_input": "detector" + }, + { + "source_output": "mask", + "target_input": "mask" + }, + { + "source_output": "geometry", + "target_input": "geometry" + } + ], + "on_error": false, + "required": false, + "map_all_data": false, + "uiProps": { + "label": "detector_config->detector_config, ...", + "markerEnd": "none", + "animated": false + } + }, + { + "source": "ewoksid31.tasks.flatfield.FlatFieldFromEnergy0", + "target": "integrate", + "on_error": false, + "required": false, + "map_all_data": true, + "uiProps": { + "label": "flatfield->flatfield", + "type": "default", + "markerEnd": "arrowclosed", + "animated": false + } + }, + { + "source": "integrate", + "target": "ewoksxrpd.tasks.ascii.SaveNexusPatternsAsAscii0", + "data_mapping": [ + { + "source_output": "nxdata_url", + "target_input": "nxdata_url" + }, + { + "source_output": "info", + "target_input": "header" + } + ], + "map_all_data": false, + "uiProps": { + "label": "nxdata_url->nxdata_url, info->header" + } } - } -} + ] +} \ No newline at end of file -- GitLab