diff --git a/docs/source/developer/developer_documentation.rst b/docs/source/developer/developer_documentation.rst index 9d41964..d3cc1d1 100644 --- a/docs/source/developer/developer_documentation.rst +++ b/docs/source/developer/developer_documentation.rst @@ -16,6 +16,11 @@ Project Structure .. include:: project_structure.rst +ESBO-ETC Python module +====================== + +.. include:: scripting.rst + Software Architecture ===================== diff --git a/docs/source/developer/scripting.rst b/docs/source/developer/scripting.rst new file mode 100644 index 0000000..0f0d921 --- /dev/null +++ b/docs/source/developer/scripting.rst @@ -0,0 +1,26 @@ +ESBO-ETC is designed to be included as module in other Python scripts. +This is possible by importing the class ``esbo_etc`` from the module ``esbo_etc`` as shown below. + +.. code-block:: python + :linenos: + + from esbo_etc import esbo_etc + +The class ``esbo_etc`` requires a path to the configuration file as initialization argument and some other optional paramaters. +The created object offers the method ``run()`` to trigger the computation. +The result of the computation is returned as Astropy quantity. +A Minimal example looks as follows: + +.. code-block:: python + :linenos: + + from esbo_etc import esbo_etc + + + # Initialize a new ESBO-ETC object + etc = esbo_etc("path_to_configuration_file.xml") + + # Run the calculations + res = etc.run() + + print(res)