Git Product home page Git Product logo

Comments (3)

swhite2401 avatar swhite2401 commented on June 3, 2024 1

Hello,

This element has issues, see #749, and I would not recommend to use it for the moment.
These issues are being addressed in #759 and will hopefully be released soon. You may get in touch with @ZeusMarti and @joanarenillas for details.

Depending on what you are trying to model, you may alternatively use kick maps or the energy loss element to approximate your wiggler.

from at.

joanarenillas avatar joanarenillas commented on June 3, 2024 1

Hello @ustc-cheese,

There is a bug in both GWigSymplecticPass.c and its radiative version GWigSymplecticRadPass.c, that produces the AttributeError you mention. The current versions in the master branch take the energy for the wiggler from the element rather than the structure. In the Mex part of the integrators, instead of

Energy = atGetDouble(ElemData, "Energy"); check_error();

there should be

Energy=atGetOptionalDouble(ElemData,"Energy",Param->energy); check_error();.

If you just want to get around this issue, you can change this line of code in your local wiggler passmethods. Nevertheless, I would not recommend doing this, since these passmetods have additional bugs which can lead you to incorrect results. As @swhite2401 suggested, I would avoid using the current distribution of GWigSymplecticPass.c and GWigSymplecticRadPass.c, unless it is strictly necessary.

All these bugs are fixed for both GWigSymplecticPass.c and GWigSymplecticRadPass.c (in Matlab and Python) in my branch wigglerintegrator_debugged. You can base your work in my branch to get around these issues, but I must warn you that this branch includes several other changes (see #759) and has still not been merged to the master branch (we are intending to merge it soon).

Hope this helps,

Joan

from at.

ustc-cheese avatar ustc-cheese commented on June 3, 2024

Thank you all! Hoping for your soon correction!

from at.

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.