The ESO Recipe Flexible Execution Workbench

Instructions for Python usage in ESO Reflex

At present astronmers are widely using Python as a scripting languague and therefore it is important to get the flexibility and power of Python in use of ESO Reflex. This page includes instructions and examples with detailed description of the reflex.py Python module which is required for the usage in ESO Reflex.

Python interface of Reflex

The reflex.py Python module (download here) is the Python interface of Reflex. It is located under reflex/reflex-current/scripts/python. It contains the following four classes for reading parametres from stdin and printing output parameters from stdout back to java.

Python script editing window

In the figure below is the workflow pythonExample.xml located under reflex/reflex-current/examples.


Click on the Python processor Python_example, and the window below will open.


Edit a script

Edit the script by adding the row input2 = ReflexInput(type="'file/fits'",name="output2",value="test2.fits") under the row input1 = ReflexInput(type="'text/plain'",name="outputFilename",value="test.fits"). Press "Save script changes", and you will see in the figure below a new entry in the Input ports window.


The editor notes errors

Make on purpose an error to the scripts. In the example below the word BUG is written on a line. Try pressing "Save script changes", and you will get the message below.