Git Product home page Git Product logo

Comments (3)

tschoonj avatar tschoonj commented on May 26, 2024

Hi Roland,

I have tried to reproduce your problem here but I failed: using the free 5.5 Borland compiler both the C and C++ example produced the right results, even after I included calls to CS_Compt and CS_Rayl.

In fact I am quite surprised that you would get the right values for the attenuation coefficients (CS_Total) since these are calculated as the sum of CS_Photo, CS_Compt and CS_Rayl and these, as you know, rely on cubic spline interpolation.

Also: the import library libxrl-7-bcc.lib is not compiled, but is instead generated from the libxrl-7.dll using Borland's implib utility:

implib.exe -a -c libxrl-7-bcc.lib libxrl-7.dll

I think something else is going on here, perhaps some incompatibility between Borland 5.5 and C++ Builder? Could you try generating the import library yourself?

By the way, if you are interested in Monte Carlo simulations of X-ray fluorescence experiments, you may want to have a look at my other project XMI-MSIM

Thanks,

Tom

from xraylib.

rgouelSTA avatar rgouelSTA commented on May 26, 2024

Hi Tom,

Sorry for the delay in responding and thank you for your answer.

I should have thought that the Total cross-section is the sum of the others, I read it in the manual sometime ago.

My apologies.

In fact there is no problem with the library, it was me caught in a vicious circle of mishaps when I tried to compare the cross sections in barn to those of the LLL-Plechaty tables I have been using in years.

I can report that both libxrl-7-bcc.lib as well as libxrl-7.lib work well with C++Builder 6 and give the same results.

Only the libxrl-7.lib works with Visual studio Express.

Thank you for the link to your Monte Carlo project, I am certainly interested and will look into it.

May be my mistakes happened to have you direct me to your Monte Carlo project.

My Best Regards,

Roland.

From: Tom Schoonjans [mailto:[email protected]]
Sent: Saturday, April 04, 2015 2:54 AM
To: tschoonj/xraylib
Cc: Roland Gouel
Subject: Re: [xraylib] CS_Photo, CS_compton, CS_Rayleigh with C++Builder 6 library give the wrong value (#22)

Hi Roland,

I have tried to reproduce your problem here but I failed: using the free 5.5 Borland compiler both the C and C++ example produced the right results, even after I included calls to CS_Compt and CS_Rayl.

In fact I am quite surprised that you would get the right values for the attenuation coefficients (CS_Total) since these are calculated as the sum of CS_Photo, CS_Compt and CS_Rayl and these, as you know, rely on cubic spline interpolation.

Also: the import library libxrl-7-bcc.lib is not compiled, but is instead generated from the libxrl-7.dll using Borland's implib utility:

implib.exe -a -c libxrl-7-bcc.lib libxrl-7.dll

I think something else is going on here, perhaps some incompatibility between Borland 5.5 and C++ Builder? Could you try generating the import library yourself?

By the way, if you are interested in Monte Carlo simulations of X-ray fluorescence experiments, you may want to have a look at my other project XMI-MSIM https://github.com/tschoonj/xmimsim

Thanks,

Tom


Reply to this email directly or view it on GitHub #22 (comment) . https://github.com/notifications/beacon/ALGJm7qPiNq82Gh67L7Yk_HtmfQik3_Vks5n74H-gaJpZM4D55uD.gif

from xraylib.

tschoonj avatar tschoonj commented on May 26, 2024

Hi Roland,

Glad to hear things are working properly now.
Let me know if I can be of further assistance!

Best,

Tom

from xraylib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.