Comments (6)
From @bnash on October 11, 2016 14:30
Here is a simple function to compute the 6x6 one turn map matrix. From this we can compute generalized Twiss parameters, invariants, etc. May still be a good idea to have uncoupled limits to get simple Twiss params.
I checked and got approximate agreement with Matlab on this. The Matlab version uses
an epsilon of 6.055454452393343e-006
claiming this is somehow optimal (referencing numerical recipes). I don't really know why.
(I'm trying to make the code display with indentation properly, but it doesn't work)
import at
import numpy
def pyATm66(ring):
eps=1e-10
epsmat=eps*numpy.identity(6)
mm=at.atpass(ring, epsmat, 1)/eps
return numpy.transpose(mm)
from at.
Three backticks before the code and three backticks afterwards.
from at.
(Backtick is top-left on the UK keyboard).
from at.
From @bnash on October 11, 2016 15:3
Thanks, next step is to make a version of the amat function (linear normal form, converts matrix to 3 rotations)
https://github.com/willrogers/at/blob/pyat/atmat/atphysics/amat.m
in python.
From there, we can also make generalized lattice functions with Forests 'betaoids' and 'etaoids'
http://journals.aps.org/pre/abstract/10.1103/PhysRevE.58.2481
https://github.com/willrogers/at/blob/pyat/atmat/pubtools/local_lattice_params/find_betaoids.m
We also need to make utilities for computing things at different places around the ring. Many of the functions in Matlab AT accept a set of indices that compute the quantities at those positions in the lattice.
from at.
From @bnash on October 11, 2016 15:7
amat can also be used to compute eigenemittance following computing second moment matrix (Sigma) from ohmi-envelope
https://github.com/willrogers/at/blob/pyat/atmat/atphysics/ohmienvelope.m
Though, I think the eigenvalues of J*Sigma also give you the emittances.
from at.
We now have substantial progress on this so I will close the ticket.
from at.
Related Issues (20)
- pyAT 'Multipole has no attribute PolynomB' exception for loading multipoles from a .mat file with both PolynomB and K value defined HOT 1
- ATX makes matlab crash when Exact* integrators are used. HOT 3
- python get_1d_acceptance: return 0.0 instead of error if no particle survives HOT 2
- np.float gives error in acceptance/touschek.py HOT 1
- Improve element rotation help HOT 1
- python windows version installation HOT 4
- synoptics not visible in atplot when vertical values are above zero HOT 1
- pyat shift_elem ignores R1,R2 and the effect of bending angles HOT 5
- pyAT Distinguish between a sector bending magnet and a rectangular bending magnet HOT 1
- Reduce behaves differently in Matlab and python
- B0 added twice in exactkickrad HOT 2
- python: ringparam not well identified by lattice_load HOT 6
- bug is saving lattice HOT 3
- Bug: atwiggler HOT 13
- problem with display of correctly initialised VariableMultipole element HOT 1
- Change Legend Labels for plot_trajectory() function HOT 12
- fast_ring when having harmonic cavities in the lattice HOT 4
- AT_2_Elegant uses deprecated N_KICKS
- Factor 4 missing in Touschek scattering B2 expression HOT 5
- pyAT Error when calculating damping ring HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from at.