BornAgain reads no data files itself: experimental data are loaded on the
Python side and kept as NumPy arrays. A fitting or plotting script then
compares these arrays with simulation.simulate().intensities().
The tools:
numpy for ASCII tables and matrices;pip install fabio);pip install h5py);bornagain.ba_io for column tables with scan-axis preparation, and for
a few instrument formats that Fabio does not cover; all its readers
accept gz/bz2-compressed files.The supported data kinds, each with its format description and import recipe:
Any other format can be read with any Python tool that suits it: BornAgain only ever works with plain NumPy arrays. If a column is to serve as a scan axis, remember that BornAgain requires strictly ascending values there.
How to compare the loaded arrays with simulated intensities in a residual function, including the treatment of masked detector pixels, is described in Python tutorial > Fitting and in the fit reference.