java.lang.Object
simpa.acc.api.utils.FrequencyAnalysis.FrequencyAnalysisBuilder
- Enclosing class:
FrequencyAnalysis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the FrequencyAnalysis instance.setAperture
(Aperture aperture) setDiskRadius
(double diskRadius) Set the disk radius for the observer disk.setDpOp
(double dpop) setEndQh
(double endQh) setEndQv
(double endQv) setHEmittance
(double hEmittance) setNumberOfThreadsUsed
(int nThreads) By default all threads are used.Sets the output directory for the phase space coordinate files produced by the tracking during the tune scan.setPrototypeParticle
(Particle prototypeParticle) setReferenceOrbit
(ReferenceOrbit referenceOrbit) Sets the reference orbit of the ring.setSampleTunes
(List<Tune> sampleTunes) This method is used for setting a list of tunes corresponding to resonance free working points in the tune diagram.setScalings
(Map<String, Double> scalings) Set the scaling map containing the elements in the ring.setStartQh
(double startQh) setStartQv
(double startQv) setStepsQh
(int stepsQh) setStepsQv
(int stepsQv) setTuneModel
(TuneModel tuneModel) Sets an the tune model to be used for the frequency analysis.setTurns
(int turns) setVEmittance
(double vEmittance)
-
Constructor Details
-
FrequencyAnalysisBuilder
public FrequencyAnalysisBuilder()
-
-
Method Details
-
setDpOp
- Parameters:
dpop
- The momentum spread to be used while determining the optics for the interpolation of optics parameters.- Returns:
- The builder object.
-
setSampleTunes
This method is used for setting a list of tunes corresponding to resonance free working points in the tune diagram. The tunes are used to calculate an interpolation table which is used to calculate the initial conditions for the tracking, such that the initial single particle emittances are equal to the specified values approximately.- Parameters:
sampleTunes
- A list of tunes corresponding to resonance free working points in the tune diagram- Returns:
- The builder object.
-
setAperture
- Parameters:
aperture
- The physical aperture to be used during the pracking.- Returns:
- The builder object.
-
setPrototypeParticle
- Parameters:
prototypeParticle
- A prototype for particles to be tracked. The phase space variables will be used only at the stage of constructing the Tune- TwissParameters interpolation table.- Returns:
- The builder object.
-
setTurns
- Parameters:
turns
- Number of turns to be used for the tracking. Must be a power of two. The default is 256.- Returns:
- The builder object.
-
setNumberOfThreadsUsed
By default all threads are used. Since the scan must keep a field map in memory for each thread, the memory consumption can be very high. This method can be used to keep memory consumption within the available memory size.- Parameters:
nThreads
- Number of threads to be used during the scan.- Returns:
- The builder object.
-
setOutDir
Sets the output directory for the phase space coordinate files produced by the tracking during the tune scan.- Parameters:
outdir
- The output directory- Returns:
- The builder object.
-
setDiskRadius
Set the disk radius for the observer disk. Should be big enough to cover the aperture of the ring, but small enough to not intersect the beam region twice.- Parameters:
diskRadius
- - The radius of the observer disk.- Returns:
- The builder object.
-
setReferenceOrbit
Sets the reference orbit of the ring.- Parameters:
referenceOrbit
- The reference orbit- Returns:
- The builder object.
-
setTuneModel
Sets an the tune model to be used for the frequency analysis.- Parameters:
tuneModel
- An implementation of theTuneModel
interface.- Returns:
- The builder object.
-
setScalings
Set the scaling map containing the elements in the ring. During the tune scan the scaling factor of the elements which are part of theTuneModel
will be replaced by the scaling factors given by theTuneModel
, so their value is irrelevant ( you can set to zero for example). However these elements should be also present in the map. You can save quite some memory to prepare a field map containing all elements except the elements in theTuneModel
already scaled properly and add this field map to the scaling map with scaling factor one.- Parameters:
scalings
- Field map containing all elements.- Returns:
- The builder object.
-
setStartQh
- Parameters:
startQh
- The staring horizontal tune of the tune scan. This can be the fractional of the full tune, depending how theTuneModel
is implemented.- Returns:
- The builder object.
-
setEndQh
- Parameters:
endQh
- The end horizontal tune of the tune scan.This can be the fractional of the full tune, depending how theTuneModel
is implemented.- Returns:
- The builder object.
-
setStartQv
- Parameters:
startQv
- The staring vertical tune of the tune scan. This can be the fractional of the full tune, depending how theTuneModel
is implemented.- Returns:
- The builder object.
-
setEndQv
- Parameters:
endQv
- The staring vertical tune of the tune scan. This can be the fractional of the full tune, depending how theTuneModel
is implemented.- Returns:
- The builder object.
-
setStepsQh
- Parameters:
stepsQh
- Number of horizontal steps during the tune scan.- Returns:
- The builder object.
-
setStepsQv
- Parameters:
stepsQv
- Number of vertical steps during the tune scan.- Returns:
- The builder object.
-
setHEmittance
- Parameters:
hEmittance
- The the single particle horizontal emittance for the tune scan. This value will be kept approximately constant during the tune scan.- Returns:
- The builder object.
-
setVEmittance
- Parameters:
vEmittance
- The the single particle vertical emittance for the tune scan.This value will be kept approximately constant during the tune scan.- Returns:
- The builder object.
-
build
Builds the FrequencyAnalysis instance.- Returns:
- The FrequencyAnalysis instance.
- Throws:
IOException
-