Corrfitter

Latest version: v8.2

Safety actively analyzes 682487 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

4.0

=========================
The main change here is the new EigenBasis class.

- A series of Annotated Examples have been added to the documentation.
Each describes in detail a specific fit code and its results. Code
and data for each example are included in the examples/ file. There
are three Annotated Examples right now. Eventually there may be one
or two more. These are meant to provide code templates for various
types of problem. They might also be useful for people who don't like
to read documentation. The code that used to be in the examples/
directory is now gone. Going forward this directory will be for
Annotated Examples only.

- A new class EigenBasis is provided for fits that involve matrix correlators.
It does a generalized eigenanalysis of the correlator at moderate values of
t, and uses that information to create priors for the amplitudes and
energies associated with the matrix correlator. These "eigen-priors" can
significantly improve the quality of results for the excited states in the
matrix correlator. They are easily combined with priors for other sorts of
correlators, and so can be used, for example, in joint fits of 2-point and
3-point correlators. They tend to stabilize the low-lying excited states in
a fit, discouraging the appearance of spurious states with near-zero
amplitudes. Introducing an eigen-prior into an existing code is generally
trivial, requiring just a few lines of code (and usually removing many
more, since EigenBasis creates a prior for the matrix correlator parameters).

See the Annotated Example on matrix correlators in the documentation for
a code example.

This class merges the advantages of multi-exponential fitting with those of
the Generalized Eigenvalue approach (which is easily implement using
EigenBasis, if desired). It makes fewer assumptions than the latter and
these assumptions are readily checked and altered. The interface for this
class is experimental; it may change in the near future as we gain
experience with it.

This class also requires the scipy library for Python, in addition to
numpy.

- The print_fit option to lsqfit can be a dictionary containing arguments
for lsqfit.nonlinear_fit.format(). Alternatively it is True or False,
as before.

- Beginning with this version of corrfitter, version numbers will be consistent
with the rules of "semantic versioning" (http://semver.org). The most
important consequence is that any change that is *not* backwards compatible
with the current interface (as defined by the documentation) will be signaled
by a change in the major version number, where the full version number has the
format major.minor.patch (so the major version number is 4 for version 4.0).
A side effect of this is that increases in the major version number can
be triggered by relatively obscure changes in the interface that will have
no effect whatsoever on almost all existing codes.

3.7.1

===========================
Small updates.

- Allow tol=(reltol,abstol) in CorrFitter so relative and absolute
fit tolerances can be set separately. In the past tol was a single
number which was used for both reltol and abstol. This is still
supported but one can instead use a tuple to specify them separately.
The default tolerance (1e-10) is probably smaller than it should be;
1e-4 is probably good enough for many applications.

- New function corrfitter.read_dataset(files) reads Monte Carlo data
for correlators into a gvar.dataset.Dataset. Instead of writing

dset = gvar.dataset.Dataset(files)

one can now write

dset = corrfitter.read_dataset(files)

Either method works, but the second method supports a new file format
for correlator data. A lot of simulation code dumps each correlator
into a separate file, with each line having a t and G(t). This format
can be read by read_data directly, without having to convert to the
traditional gvar.dataset.Dataset format. To use this format, argument
files has to be a dictionary. Each key k is the name (datatag) of a correlator,
and files[k] is the name of the file containing that correlator's data.

3.7

=========================
This version was modified to make it consistent with lsqfit v4.8. The
main change here is that option svdnum is no longer supported (use svdcut
instead).

- Corrected typo in documentation (annotated example).

3.6.3

===========================

Small changes in chained_lsqfit to accommodate changes made in
lsqfit v4.6.1.

3.6.2

==========================

- Fixed (rare?) bug that caused lsqfit and chained_lsqfit to crash
sometimes when nterm was set in the call to lsqfit/chained_lsfit.

3.6.1

==========================

- Fixed bug in CorrFitter causing it sometimes to ignore othertags in models.

- Added attribute all_datatags to models. This is a list containing the
datatag and any tags included in othertags.

- Changes to correct test and example output for changes introduced in
lsqfit v4.5.2.

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.