tschoonj / xraylib

A library for X-ray matter interaction cross sections for X-ray fluorescence applications
https://github.com/tschoonj/xraylib/wiki
Other
120 stars 55 forks source link

Suppress warning output from xraylib #15

Closed licode closed 9 years ago

licode commented 9 years ago

Description

Is there any way to suppress warning output from xraylib, such as:

Shell not available in function JumpFactor Line not allowed in function CS_FluorLine

I want to output results from multiple energy lines and shells by calling xraylib, but it is difficult to remove these warning messages.

licode commented 9 years ago

cc @tacaswell

tschoonj commented 9 years ago

try the following function:

void SetErrorMessages(int status);

Pass 1 to suppress the messages. I will add this function (and a couple other) to the manual. I will close this bug report afterwards.

Best,

Tom

licode commented 9 years ago

Thanks. I add those in the python version. It works.

xraylib.XRayInit() xraylib.SetErrorMessages(0)

tschoonj commented 9 years ago

Closed by wiki fix http://github.com/tschoonj/xraylib/wiki/The-xraylib-API-list-of-all-functions/2760ea215e75668bc6238e9cb8417b1ef948ce1d