Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plots #76

Merged
merged 17 commits into from
May 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions anvil/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ def fit_zero_momentum_correlator(
pass

n_boot = zero_momentum_correlator.shape[-1]
failures = n_boot - len(optimised_parameters)
if failures > 0:
log.warning(
f"Failed to fit cosh to correlation function for {failures}/{n_boot} members of the bootstrap ensemble."
)
if failures >= n_boot - 1:
log.warning("Too many failures: no fit parameters will be returned.")
return None
n_fits = len(optimised_parameters)
log.info(
f"Cosh fit succeeded for {n_fits}/{n_boot} members of the bootstrap ensemble."
)
if n_fits < 2:
log.warning("Too few successful fits: no fit parameters will be returned.")
return None
jmarshrossney marked this conversation as resolved.
Show resolved Hide resolved

xi, A, c = np.array(optimised_parameters).transpose()
return xi, A, c
Expand Down