Modernised and extended implementation of matrixfit
new_matrixfit(cf, t1, t2, parlist, sym.vec = rep(1, cf$nrObs),
neg.vec = rep("cosh", cf$nrObs), useCov = FALSE, model = "single",
boot.fit = TRUE, fit.method = "optim", autoproceed = FALSE, par.guess,
every, higher_states = list(val = numeric(0), boot = matrix(nrow = 0, ncol
= 0), ampl = numeric(0)), ...)
Object of class cf
with cf_meta
and cf_boot
.
Integer, start time slice of fit range (inclusive).
Integer, end time slie of fit range (inclusive).
Numeric vector, list of parameters for the model function.
Integer, numeric or vectors thereof specifying the symmetry
properties of the correlation functions stored in cf
. See
matrixfit for details.
Integer or integer vector of global signs, see matrixfit for details.
Boolean, specifies whether a correlated chi^2 fit should be performed.
String, specifies the type of model to be assumed for the correlator. See below for details.
Boolean, specifies if the fit should be bootstrapped.
String, specifies which minimizer should be used. See matrixfit for details.
Boolean, if TRUE, specifies that if inversion of the covariance matrix fails, the function should proceed anyway assuming no correlation (diagonal covariance matrix).
Numeric vector, initial values for the paramters, should be
of the same length as parlist
.
Integer, specifies a stride length by which the fit range should
be sparsened, using just every
th time slice in the fit.
List with elements val
and boot
. Only used in the
n_particles
fit model. The member val
must have the central energy
values for all the states that are to be fitted. The boot
member will be
a matrix that has the various states as columns and the corresponding
bootstrap samples as rows. The length of val
must be the column number of
boot
. The row number of boot
must be the number of samples.
Further parameters.
See bootstrap.nlsfit.
There are different fit models available. The models generally depend on one or multiple energies \(E\) and amplitudes \(p_i\) which for a general matrix are row- and column-amplitudes. The relative sign factor \(c \in \{-1, 0, +1\}\) depends on the chosen symmetry of the correlator. It is a plus for a <U+201C>cosh<U+201D> symmetry and a minus for a <U+201C>sinh<U+201D> symmetry. If the back propagating part is to be neglected (just <U+201C>exp<U+201D> model), it will be zero.
When the back propagating part is not taken into account, then the
single
, shifted
and weighted
model become the same except for changes
in the amplitude.
single
: The default model for a single state correlator is
$$\frac{1}{2} p_i p_j (\exp(-p_1 t) \pm c \exp(-p_2 (T-t))) \,.$$
shifted
: If the correlator has been shifted (using
takeTimeDiff.cf, then the following model is applicable: $$p_i
p_j (\exp(-p_1 (t+1/2)) \mp c \exp(-p_1 (T-(t+1/2)))) \,.$$
weighted
: Works similarly to the shifted
model but includes the
effect of the weight factor from removeTemporal.cf.
pc
: In case only a single principal correlator from a GEVP is to be
fitted this model can be used. It implements $$\exp(-p_1(t-t_0))(p_2 +
(1-p_2)\exp(-p_3 (t-t_0))$$ with \(t_0\) the reference timesclice of the
GEVP. See bootstrap.gevp for details.
two_amplitudes
: Should there be a single state but different amplitudes
in the forward and backwards part, the following method is applicable.
$$\frac{1}{2} (p_2 \exp(-p_1 t) \pm c p_3 \exp(p_1 t))$$ This only
works with a single correlator at the moment.
single_constant
: Uses the single
model and simply adds \(+ p_3\) to
the model such that a constant offset can be fitted. In total the model is
$$\mathrm{single}(p_1, p_2) + p_3 \,.$$
n_particles
: A sum of single
models with independent energies and
amplitudes: $$\sum_{i = 1}^n \mathrm{single}(p_{2n-1}, p_{2n}) \,.$$ Use
the higher_states
parameter to restrict the thermal states with priors to
stabilize the fit.