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 or pip install nexusformat);ba.read_columns, ba.read_motofit, and ba.read_bersans for column
tables with scan-axis preparation and instrument formats that Fabio does
not cover; all three 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.