Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
97 changes: 52 additions & 45 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exclude = ["docs/", "tools/"]

[tool.poetry.dependencies]
python = ">=3.7.2,<3.11"
lmfit = "^1.0.3"
lmfit = "^1.1.0"
pandas = [
{ version = "1.3.5", python = "<3.8" },
{ version = "^1.5.0", python = ">=3.8" },
Expand Down
6 changes: 2 additions & 4 deletions spectrafit/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,12 @@ def fit_report_as_dict(
and abs(par.correl[name_2]) <= 1.0
):
buffer["correlations"][name_1][name_2] = par.correl[name_2]
try:

if result.covar is not None and result.covar.shape[0] == len(parnames):
for i, name_1 in enumerate(parnames):
buffer["covariance_matrix"][name_1] = {
name_2: result.covar[i, j] for j, name_2 in enumerate(parnames)
}

except (AttributeError, IndexError) as exc:
print(f"{exc}: Covariance Matrix could not be calculated.\n")
return buffer


Expand Down
2 changes: 1 addition & 1 deletion spectrafit/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def make_insight_report(self) -> None:
self.args["confidence_interval"] = conf_interval(
self.minimizer, self.result, **self.args["conf_interval"]
)
except MinimizerException as exc:
except (MinimizerException, ValueError) as exc:
print(f"Error: {exc} -> No confidence interval could be calculated!")
self.args["confidence_interval"] = {}

Expand Down