Corrfitter

Latest version: v8.2

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

Scan your dependencies

Page 3 of 6

6.0.2

==========================
The only change in this version is in the documentation, which now includes
instructions on how to use gvar.dataset.svd_diagnosis (gvar v8.3.1) to
set SVD cuts (before fitting): see the section on Accurate Fits --- SVD Cuts.

6.0.1

=========================
Fixed bug in Corr3 when using tmin. Thanks Chris!

6.0

============================
Although this version involves a substantial rewrite of the code (and
some of the documentation), the functionality is mostly the same. The
new code is mostly backwards compatible, but it has new features
and is generally more robust and better tested than before. Class CorrFitter
is a slightly specialized version of lsqfit.MultiFitter, which is a new
feature of lsqfit inspired by the original corrfitter.

- This corrfitter version requires up-to-date versions of
gvar (v8.2 or greater) and lsqfit (v9.1.1 or later).

- Corr3 keyword transposed_V is no longer supported. The same functionality
is provided using new keyword reverse, which time-reverses the data;
code is simpler with the new keyword. reverse is also available for Corr2.
transposed_V still works but its days are numbered.

- CorrFitter.simulated_data_iter is replaced by
CorrFitter.simulated_pdata_iter, which returns processed data (for use
with keyword pdata in CorrFitter.lsqfit and CorrFitter.chained_lsqfit).

- chained_lsqfit keyword parallel no longer exists. To fit models m1, m2 ...
in parallel set models=[[m1, m2, m3]].

- Corrfitter.lsqfit option print_fit no longer exists. It isn't clear
what to print for chained fits, and, in any case, it is rude of software to
print stuff out without permission. Chained fits have an option:
print(fit.formatall()) prints out fit information for all the fits in the
chain. This also works for non-chain fits, but is the same as
print(fit) in that case.

- Chained fits now return the last fit in the chain. They used to return
a hybrid object that didn't make a whole lot of sense. The parameter
values from the last fit represent the cummulative result of all the
fits.

- Corr3 keywords tpa and tpb no longer do anything. They never made sense
and so have been disabled. They can still be set, for backwards
compatibility, but they are ignored.

- Keyword otherdata is preferred to the older othertags, though the latter
still works for now.

- Corr3 has a new keyword reverseddata that allows you to combine data for
b->V->a with data for a->V->b in a single Corr3. reverseddata is also
available for Corr2.

- Instead of specifying tdata and tfit in Corr2, one can now specify just
tmin, and tp and/or tmax. This is simpler but only works if the associated
data includes results for all t values in order, starting with t=0
(which is very often the case). In Corr3, only T and tmin need be
specified; tdata and tfit are generated automatically in that case.

- Given a dataset dset, pdata = process_dataset(dset, model_list) creates
*processed data* customized to the models in list model_list. This is
fed into CorrFitter.lsqfit using argument pdata=pdata rather than data=data.
Doing things this way makes a difference if the models are discarding large
amounts of input data since those data are discarded before averaging
is done (and in particular before the covariance matrix is calculated).
Fits can run substantially faster when the total amount of data is
reduced by a large factor.

- In a chained fit of [m1, m2, m3 ...], any of the models m1, m2 ... can
be replaced by a tuple of models (s1, s2, ...), which indicates that
s1, s2, ... are to be fit together simultaneously, in a single fit. This is
a new feature. In the past any of m1, m2 ... could be replaced by
a list [p1, p2, ...] of models to be fit separately but in parallel. This
is still supported.

- Corr2 and Corr3 have a new parameter ncg (default is ncg=1). When fitting
with ncg>1, correlators are coarse-grained by breaking them up into bins
of ncg values and replacing each bin by its average. The bin averages are
then fit by a coarse-grained version of the fit function. So, for example,
a correlator array [G[0], G[1], ...] is replaced by a new array
[ (G[0] + G[1])/2, (G[2] + G[3])/ 2 ... ] when ncg=2. The same
transformation is applied to the fit function as to the data, so the
meaning of the fit parameters is unchanged. In some cases coarse graining
does not much affect the accuracy of the fit results, and then is
desirable because it reduces the amount of data being fit.

5.0.1

==========================
- Made tests, examples and documentation compatible with lsqfit 8.0. You
can no longer use, for example, logdE as a parameter name in place
of log(dE) when log-normal prior is desired for dE. The parentheses are
essential. lsqfit8.0 allows you to define new distributions if you wish,
beyond log-normal and sqrt-normal.

FIX FOR LEGACY CODE: To help convert legacy code with logdE etc,
there is a new utility function that adds the needed parentheses: use

prior = gvar.add_parameter_parentheses(prior)

to add parentheses to keys in dictionary prior of the form logdE or sqrta
(which become log(dE) or sqrt(a)) in dictionary prior.

- 'make time' times the example codes. Is around 60s on my oldish MacBook Air.
This is only somewhat reliable, especially if comparing different
machine architectures.

Versions 5.0 2015-07-01
========================
This is an update so corrfitter works with the most recent lsqfit (v7.0).
It also replaces corrfitter.fastfit with something much more useful, but
incompatible with previous code (hence v5.0, by the rules of
semantic versioning).

- corrfitter.fastfit has been rewritten with a much simpler interface,
making it much easier to use. It is a (significantly) souped-up effective
mass calculation. It is easier to use than canonical effective masses
because one needn't worry about plateaus (since fastfit includes
marginalized excited states and so should work for arbitrarily small
values of t). The new interface is incompatible with the old interface.

- corrfitter.read_dataset() has new option binsize which causes it to
bin data when binsize > 1.

- Some ancient undocumented hacks have been removed. This might affect
legacy codes, but shouldn't be an issue for anything written recently.

- Added a fastfit example to the first Annotated Example (etas fitting).
Also added a short discussion about correlated data and binning.

- Added an annotated example for meson-meson mixing, at the end
of the Annotated Example on transition form factors.
The sample code is in examples/Ds-Ds.py.

4.1.1

===========================
Very minor fixes.

- Fixed tests so that they are compatible with gvar v7.0 and greater.

- EigenBasis.tabulate(p) now works for fit.p as well as fit.transformed_p. It
also works for priors that it creates.

- Fixed some examples that became inconsistent with numpy's new rule about
random number seeds.

4.1

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

- Additions/refinements to EigenBasis including a new method, Eigenbasis.svd,
which transforms data to the eigen-basis, applies an svd cut, and then
transforms the data back to the original basis. Applying svd cuts in
the eigen-basis can sometimes improve fit stability.

- Added save option to CorrFitter.display_plots so it can save copies of the
plots in (separate) files.

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.