BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Provides users with possibility to read and write IntensityData from/to files in different format. Type of the file will be deduced from file name. *.txt - ASCII file with 2D array [nrow][ncol], layout as in numpy. *.int - BornAgain internal ASCII format. *.tif - 32-bits tiff file. If file name ends with "*.gz" or "*.bz2" the file will be zipped on the fly using appropriate algorithm.
Usage:
Public Types | |
enum | LoaderSelector { automatic , bornagain , tiff , nicos } |
Static Public Member Functions | |
static Datafield * | readDatafield (const std::string &file_name, LoaderSelector selector=automatic) |
Reads file and returns newly created Datafield object. If selector is automatic, then the file extension will be used to determine which file type to load. If selector is not automatic, then this selector will define which type of file to load (no matter which file extension or content). May throw, but will never return nullptr. More... | |
static Datafield * | readReflectometryData (const std::string &file_name) |
static void | writeDatafield (const Datafield &data, const std::string &file_name) |
Writes Datafield in file. More... | |
static void | writeSimulationResult (const SimulationResult &result, const std::string &file_name) |
Writes Datafield contained in the given SimulationResult object. More... | |
|
static |
Reads file and returns newly created Datafield object. If selector is automatic, then the file extension will be used to determine which file type to load. If selector is not automatic, then this selector will define which type of file to load (no matter which file extension or content). May throw, but will never return nullptr.
|
static |
|
static |
Writes Datafield in file.
|
static |
Writes Datafield contained in the given SimulationResult object.