Skip to content

Conversation

@oscarxblanco
Copy link
Contributor

This PR adds the energy offset as option to the calculation of the optics used in AT matlab computeRDT and pyat get_rdts.

@oscarxblanco
Copy link
Contributor Author

Dear @swhite2401 and @lfarv , who could review this PR ?
This addresses issue #887 .

@oscarxblanco oscarxblanco added enhancement Matlab For Matlab/Octave AT code Python For python AT code labels Jan 14, 2025
@swhite2401
Copy link
Contributor

@oscarxblanco this looks fine to me, are the off-momentum RDTS the same as the on-momentum ones? High order terms appear no?

@oscarxblanco
Copy link
Contributor Author

@swhite2401 , @lfarv .
Before talking about the rdt I have a doubt. Does avlinopt requires ring.is_6d False ?
I'm getting this error

>>> ring.avlinopt(refpts=at.All)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oblanco/Documents/public/progs/pyenv/pyenvat/lib/python3.11/site-packages/at/lattice/utils.py", line 279, in wrapper
    raise AtError('{0} needs "ring.is_6d" {1}'.format(
at.lattice.utils.AtError: avlinopt needs "ring.is_6d" False

@swhite2401
Copy link
Contributor

I thought I had fixed this by calling linopt6 in avlinopt, do you run the latest master version?

@swhite2401
Copy link
Contributor

By the way I discussed with @carmignani on that point and the implementation you propose is missing all the feed down effects from the off-energy orbit.
It is possible to implement but would require more work.

@oscarxblanco
Copy link
Contributor Author

I thought I had fixed this by calling linopt6 in avlinopt, do you run the latest master version?

@swhite2401 , yes, it is the latest master

>>> at.__version__
'0.6.2.dev66+gbc8b345a'

@oscarxblanco
Copy link
Contributor Author

By the way I discussed with @carmignani on that point and the implementation you propose is missing all the feed down effects from the off-energy orbit. It is possible to implement but would require more work.

oh, I see.
I guess I should

  • calculate the closed orbit in all reference points
  • get the feed-down polynom B and A for those reference points in a magnet,
  • extract the quad, sextupole and octupole components
  • operate those components with the off-energy optics.

Am I missing something ?

@swhite2401
Copy link
Contributor

By the way I discussed with @carmignani on that point and the implementation you propose is missing all the feed down effects from the off-energy orbit. It is possible to implement but would require more work.

oh, I see. I guess I should

* calculate the closed orbit in all  reference points

* get the feed-down polynom B and A for those reference points in a magnet,

* extract the quad, sextupole and octupole components

* operate those components with the off-energy optics.

Am I missing something ?

Yes I think this is about it

@swhite2401
Copy link
Contributor

Concerning the avlinopt calculation I changed the linopt function but did not remove the decorator... this explains the behavior you observe, it can be easily fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Matlab For Matlab/Octave AT code Python For python AT code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants