Where to find help

The best way to learn about CrystFEL is from the man pages. After installing CrystFEL, start with this:

$ man crystfel

All CrystFEL's programs have a --help option on the command line, which will make them print out basic usage information and all possible command line options.

Using libcrystfel for your own programs

An archive of useful programs will be made available shortly as an example. You'll need to add the directory containing the libcrystfel headers to your compiler's environment. For gcc, you do this with -I, for example: -I/usr/local/include, then using #include <crystfel/reflist.h> in your program. Make sure the shared library can be found (-L/usr/local/lib), and link with -lcrystfel.

For best results, set LD_RUN_PATH to include the folder which contains This will make sure that your program can always find libcrystfel when you run it, without the need to make any other modifications to your shell environment. Don't even think about setting LD_LIBRARY_PATH: read more here and here.

Segfaults and bug reports

If a CrystFEL program crashes with a Segmentation fault, this always indicates a bug, perhaps a missing check for a certain pathology in the data or another kind of 'corner case'. The most helpful thing you can do in such a situation is to put together a small test case which reproducibly crashes the program and send it to us. If you're unwilling to do that, the next best thing is to run it under gdb and get a stack trace, which shows exactly which line the program crashed on. It's very useful to run the program under Valgrind as well, sending in the entire log.

If you experience any other unexpected behaviour, whether it indicates a bug or just that your expectations weren't quite correct and the documentation needs improvement, please send us your feedback.