at.physics.nonlinear#
Non-linear optics
Functions
|
Computes the tunes for a sequence of amplitudes |
|
Computes the non-linear chromaticities |
|
Generates a detuning element |
|
Generates a range of tunes for varying x, y, or z amplitudes |
- chromaticity(ring, method='linopt', dpm=0.02, npoints=11, order=3, dp=0, **kwargs)[source]#
Computes the non-linear chromaticities
This function computes the tunes for the specified momentum offsets. Then it fits this data and returns the chromaticity up to the given order (npoints>order)
- Parameters:
ring (Lattice) – Lattice description
'linopt'(dfault) returns the tunes from thelinopt6()function,'fft'tracks a single particle and computes the tunes with fft,'laskar'tracks a single particle and computes the tunes with NAFF.
- Returns:
fit (ndarray) – Horizontal Vertical polynomial coefficients from
numpy.polyfitof shape (2, order+1)dpa – dp array of shape (npoints,)
qz – tune array of shape (npoints, 2)
- detuning(ring, xm=3e-05, ym=3e-05, npoints=3, nturns=512, **kwargs)[source]#
Computes the tunes for a sequence of amplitudes
This function uses
tunes_vs_amp()to compute the tunes for the specified amplitudes. Then it fits this data and returns the detuning coefficiant dQx/dx, dQy/dx, dQx/dy, dQy/dy and the qx, qy arrays versus x, y arrays- Parameters:
- Returns:
q0 (ndarray) – qx, qy from horizontal and vertical amplitude scans. Fit results with shape (2, 2)
q1 (ndarray) – Amplitude detuning coefficients with shape (2, 2)
[[dQx/dx, dQy/dx], [dQx/dy, dQy/dy]]x (ndarray) – x amplitudes (npoints, )
q_dx (ndarray) – qx, qy tunes as a function of x amplitude (npoints, 2)
y (ndarray) – y amplitudes (npoints, )
q_dy (ndarray) – qx, qy tunes as a function of y amplitude (npoints, 2)
- tunes_vs_amp(ring, amp=None, dim=0, nturns=512, **kwargs)[source]#
Generates a range of tunes for varying x, y, or z amplitudes
- Parameters:
ring (Lattice) – Lattice description
amp (Optional[Sequence[float]]) – Oscillation amplitude. If amp is None the tunes are calculated from
linopt6()else tracking is usedmethod –
'laskar'or'fft'. Default:'laskar'num_harmonics – Number of harmonic components to compute (before mask applied)
fmin – Lower bound for tune
fmax – Upper bound for tune
hann – Turn on Hanning window. Default:
False
- Returns:
tunes (ndarray) – Array of tunes qx, qy with shape (len(amp), 2)