GitHub - wojdyr/xylib: library for reading files with x-y data from powder diffraction, spectroscopy, or other experimental methods (original) (raw)

xylib

xylib is a portable library for reading files that contain x-y data from powder diffraction, spectroscopy and other experimental methods.

It comes with two programs that can convert supported formats to plain text: command-line xyconv and graphical xyconvert.

Supported formats:

Examples of supported files are collected in sample-urls.

LIBRARY

The library is written in C++11 and has C bindings.

R bindings: rxylib (CRAN)by Sebastian Kreutzer.

Python bindings: pip-installable, generated by SWIG, details below.

Other languages (suggestions): you may access C API through FFI (here is an example), or extend xylib.i to wrap the C++ interface using SWIG.

The API is documented in the xylib/xylib.h file. Adding new formats -- inREADME.dev.

Licence: LGPL 2+

xylib is used by:

xyconv

Converts a file from one of the supported formats to plain text:

xyconv myfile.bin plain.txt

It has a few options, see xyconv -h for details.

xyConvert

web/xyconvert-linux.png

The GUI is designed for quick converting of many files at once.

DOWNLOAD

Binary packages:

Source:

To compile the source code you need:

Two build systems are provided: either use CMake or, on Unix,./configure && make. To skip building the GUI use option-D GUI=OFF for CMake or --without-gui for configure. If you are using git, autoreconf -i is needed before ./configure.

Python bindings require SWIG, Boost headers and a C++ compiler. It may be enough to just type:

pip install xylib-py --user

If the Boost headers cannot be found, run pip with options--global-option=build_ext --global-option=-I/path/to/boost_1_60_0. See the xyconv.py file for usage examples.

AUTHORS

CONTACT

Feel free to send e-mail to the authors, or to thefityk-dev mailing list.

CREDITS

HISTORY