Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute analytically the radiation integrals #122

Merged
merged 8 commits into from
Jul 9, 2019
Merged

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented Jul 5, 2019

The 5 radiation integrals are computed analytically by get_radiation_integrals in radiation.py. 2 new functions allow a comparison between results obtained from the radiation integrals (radiation_parameters) and from ohmi_envelope (envelope_parameters).
A slight difference with Matlab in i4 is under investigation

@lfarv
Copy link
Contributor Author

lfarv commented Jul 7, 2019

This is now OK for me. New features:

  • a Lattice.circumference property,
  • a get_radiation_integrals function / Lattice method to compute the radiation integrals,
  • radiation_parameters and envelope_parameters functions and Lattice methods returning an object summarising some lattice properties, such that print(ring.radiation_parameters()) gives a readable summary.

Function names can still be modified if there are better names!

Copy link
Contributor

@willrogers willrogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to merge this. I think the tests comparing Matlab and Python results are becoming very useful.

@lfarv
Copy link
Contributor Author

lfarv commented Jul 8, 2019

Ok, @willrogers, go on merging.
You are right, comparison tests are very useful: I could fix a small bug in my formula for I4.
Here the comparison between numerical integration in Matlab (for I4 and I5) and analytical integrals in Python shows a very good agreement.

I see that the correction for NumIntSteps is still in a pending pull request, so I add it here.

I have also a question on the updates of the Pypi repository: when is it updated? Since pyat is still evolving quite fast, I would push for rather frequent updates…

@willrogers willrogers merged commit c28d01d into master Jul 9, 2019
@willrogers willrogers deleted the radiation_integrals branch July 9, 2019 07:32
@willrogers
Copy link
Contributor

In principle, if I push a tag pyat-x.y.z, wheels should be built and uploaded to test PyPI. If these work successfully I can then download them and upload them to the real PyPI.

I'm happy to try that now (0.0.2), then when we've merged the Diamond changes I can make a 0.0.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants