Code Monkey home page Code Monkey logo

Comments (7)

lnadolski avatar lnadolski commented on August 21, 2024

Is it corrected ? If not I do not understand the issue ?

from at.

simoneliuzzo avatar simoneliuzzo commented on August 21, 2024

the issue is still unresolved up to my knowledge.
atlinopt does not return the correct phase advance if only specific locations are asked.
[l,t,c]=atlinopt(r,0,1:length(ring)+1) gives the correct l.mu at all elements
[l,t,c]=atlinopt(r,0, length(ring)+1) does not give the correct l.mu at the last element if the phase advance of ring is more than 2pi (to be checked).

from at.

lfarv avatar lfarv commented on August 21, 2024

I do not see anything to do: if you want to right phase advance, be sure to set enough locations so that there is no locations such that the phase progresses by more than 2pi in-between. It would be very inefficient for most uses to have atlinopt compute at all points and later extract the requested points of interest. You can do it manually as proposed by Simone in his 1st comment if you need it.

from at.

simoneliuzzo avatar simoneliuzzo commented on August 21, 2024

The problem historically raised from atmatch.

When matching the total phase advance for ESRF EBS cell, the call to match l.mu at a given location (cell end) specified using atvariablebuilder made the matching fail (no convergence) due to the above problem in atlinopt. The work arround ever since is the one mentioned above, calling with all indexes (could be optimized) between the lattice start and the desired location. This makes the matching slow, since that way all optics are computed at all locations rather than at the few specific ones (I remind that atmatch is optimized such that if different optics knobs are asked at the same locations, atlinopt is called only once per independent location).

The issue is open to look for a different algorithm for atlinopt that would provide the correct phase advance without knowing the optics of the elements before. I do not know if such algorithm exists, but MAD and elegant do not have this kind of problem.

from at.

lfarv avatar lfarv commented on August 21, 2024

It looks to me like a fundamental problem: you cannot measure the integer part of the tune with a single BPM (end of the turn) To get it properly you need to look all around the ring and sample it finely enough not to miss one integer. It's the same in simulation. So no other algorithm ! If you want to be fast, you can match the fractional tune (or phase advance modulo 2pi).

from at.

lcarver avatar lcarver commented on August 21, 2024

can this be closed @simoneliuzzo ?

from at.

simoneliuzzo avatar simoneliuzzo commented on August 21, 2024

no objection.

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.