The Loco main classΒΆ
The main Loco
class can be imported from accinv.loco
.
Details for its usage are available in the API documentation.
The following aspects are worth pointing out.
The most general way for specifying fit parameters is via parameters
.
The argument should be a list of parameter groups. These are available
from the parameters module.
However, there are a few shorthand arguments for specifying quadrupole,
multipole and gain error parameters:
quadrupoles
: expects the names of thick quadrupoles as specified in the model; this a shorthand for Quadrupoles.multipoles
: expects the name of thin multipoles as specified in the model; this a shorthand for Multipoles.fit_gain_errors
: expects a true or false value; if true, then it will automatically add those BPM/steerer gain errors which are not already present inparameters
.
With customize_residuals
and customize_jacobian
, the user can supply two functions
which allow to modify the computed residuals and Jacobian before they are passed to the
optimizer.
The Loco.run
method allows to specify the maximum number of Jacobian evaluations
via maxiter
. Typically, it is a good idea to limit these. Otherwise, the convergence
will be determined by the underlying optimizer.