Skip to content

Add ows to script

payno requested to merge add_ows_to_script into master

Description / Goal

Add a new application to est: ows-to-script: convert a workflow defined in a .ows file to a python script executing this workflow.

TODO list

INFO (how to use...)

  • xas_input is ignored
  • Can define the input XasObject from script parameters. This is why xas_input widget are ignored. We only consider one input for now. Current default parameter handled by the input script:
  -h, --help            show this help message and exit
  -i INPUT_, --input INPUT_
                        Input of the workflow. Should be a path to a file
  --input-spectra INPUT_SPECTRA
                        Input spectra url
  --input-spectra-dims INPUT_SPECTRA_DIMS
                        Input spectra dimension. Should be a tuple of three
                        values: (X,Y,channel). If None will take the default
                        dimension according to the input type.
  --input-channel INPUT_CHANNEL
                        Input channel url (usually energy)
  --input-configuration INPUT_CONFIGURATION
                        Input configuration url
  --input-energy-unit INPUT_ENERGY_UNIT
                        energy unit
  --input-dimensions INPUT_DIMENSIONS
                        dimension of the input as (channel, Y, X) for
                        example.If None will take default unit according to
                        the input type
  • output file is not handled and should be defined in the xas_output parameters (as relative) for now. Could be an improvement.

usage example

call ows:

est ows-to-script workflow.ows workflow_as_script.py --overwrite

execute the file

python script_test_pymca.py --input EXAFS_Cu.dat

Tested with the following workflow:

image

Any warning ?

defining on the fly the output file is not handled for now.

Edited by payno

Merge request reports