at.matching.globalfit#

Collection of functions to fit various global parameters such as the tune and the chromaticity

Functions

fit_tune(ring, refpts1, refpts2, newval[, ...])

Fits the tunes using 2 families

fit_chrom(ring, refpts1, refpts2, newval[, ...])

Fit the chromaticities using 2 families

fit_chrom(ring, refpts1, refpts2, newval, tol=1e-12, dp=0, niter=3, regex=False, HStep=None, **kwargs)[source]#

Fit the chromaticities using 2 families

Parameters:
Keyword Arguments:
  • tol – Tolerance for the matching; Default: 1.0e-12

  • dp – Momentum deviation. Default: 0

  • niter – Maximum number of iterations. Default 3

  • regex – Using regular expressions for refpt string matching; Default: False

  • HStep – gradient variation applied to magnets. Default 1e-4

Typical usage: at.fit_chrom(ring, refpts1, refpts2, [10,5])

fit_tune(ring, refpts1, refpts2, newval, tol=1e-12, dp=0, niter=3, regex=False, KStep=None, **kwargs)[source]#

Fits the tunes using 2 families

Parameters:
Keyword Arguments:
  • tol – Tolerance for the matching; Default: 1.0e-12

  • dp – Momentum deviation. Default: 0

  • niter – Maximum number of iterations. Default 3

  • fit_integer – bool (default=False), use integer tune

  • regex – Using regular expressions for refpt string matching; Default: False

  • KStep – gradient variation applied to magnets. Default 1e-5

Typical usage: at.fit_tune(ring, refpts1, refpts2, [0.1,0.25])