The Python application programming interface (API) enables users to run simulations and fits from the high-level programming language Python. This can be done in interactive sessions or by executing a script, using the command line, a Jupyter notebook, or an integrated development environment (IDE) like PyCharm.
Python scripting provides full control. For instance, one can
Install Python and the BornAgain Python module as explained in the installation instructions.
Launch a Python shell, notebook or IDE. At the Python command prompt, enter the command
import bornagain
If the BornAgain module is found, Python prints the next command prompt.
Otherwise it will raise a ModuleNotFoundError.
Run a first example script. Then read the explanation.
Finally, to start productive work, choose an example script that resembles your application problem, and modify it step by step.
The example catalog provides scripts, input data, and a ZIP archive. Examples also appear throughout the reference section.
Examples are covered by automated tests. If nonetheless an example does not work as expected, then please report this as a bug.