java.lang.Object
simpa.acc.api.utils.DynamicAperture
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicAperture
(ReferenceOrbit refOrbit, PotentialProvider potProvider, String outDir, double diskRadius, TwissParameters twiss, double momentum) Constructor with the reference orbit, potential provider, output directory, disk radius, twiss parameters and momentum. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Before calling this method the tracking must be done with the track method.int
double
getEmMax()
double
getEmMin()
int
int
double
int
getTurns()
void
setAngleSteps
(int angleSteps) void
setEmMax
(double emMax) void
setEmMin
(double emMin) void
setnThreads
(int nThreads) void
setRadialSteps
(int radialSteps) void
setStepSize
(double stepSize) void
setTurns
(int turns) void
track
(int turns) First it sets up the particle for the frequency analysys, then tracks particles for the specified number of turns.
-
Constructor Details
-
DynamicAperture
public DynamicAperture(ReferenceOrbit refOrbit, PotentialProvider potProvider, String outDir, double diskRadius, TwissParameters twiss, double momentum) throws Exception Constructor with the reference orbit, potential provider, output directory, disk radius, twiss parameters and momentum. The reference orbit must be closed for dynamic aperture. The additinal parameters has some resonable default values whivh can be changed.- Parameters:
refOrbit
- A closed`reference orbit.potProvider
- A potential provider for the tracking.outDir
- Output directory. The phase space observer will write files into this directory.diskRadius
- The disk radius for the observer.twiss
- The twiss parameters at the longitudinal position of the reference orbit, where theparticles are inserted into the ring. The twiss pparameters object containt a field for the longitudinal position which will be used to determine the insertion point.momentum
-- Throws:
Exception
-
-
Method Details
-
track
First it sets up the particle for the frequency analysys, then tracks particles for the specified number of turns.- Throws:
FileNotFoundException
- If some input file is missing.IOException
OutOfApertureException
KnownFatalException
-
calculate
Before calling this method the tracking must be done with the track method. Calculates the dynamic aperture using the normal form formula B5 in: https://link.aps.org/doi/10.1103/PhysRevE.53.4067 The method used here a bit different,we get the emittance with phase space ellipse fitting. The invariant rho in B5 eq. is half of the emittance. It writes a file named lastConnectedEmittances.txt into the output directory containing the last connected emittances for each angle step.- Returns:
- Throws:
IOException
-
getTurns
public int getTurns() -
setTurns
public void setTurns(int turns) -
getnThreads
public int getnThreads() -
setnThreads
public void setnThreads(int nThreads) -
getStepSize
public double getStepSize() -
setStepSize
public void setStepSize(double stepSize) -
getAngleSteps
public int getAngleSteps() -
setAngleSteps
public void setAngleSteps(int angleSteps) -
getRadialSteps
public int getRadialSteps() -
setRadialSteps
public void setRadialSteps(int radialSteps) -
getEmMin
public double getEmMin() -
setEmMin
public void setEmMin(double emMin) -
getEmMax
public double getEmMax() -
setEmMax
public void setEmMax(double emMax)
-