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

Address JOSS comments + prepare for v1.0 release #123

Merged
merged 47 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9d068af
refactor: Add `preprocess` and `noise` options to `load_test_dataset`
ma-sadeghi Jun 20, 2024
c403e29
refactor: Move `preprocess_impedance_data` to utils
ma-sadeghi Jun 20, 2024
efa43a4
refactor: Make matplotlib args in `plot_nyquist` and `plot_bode funct…
ma-sadeghi Jun 20, 2024
401cd74
refactor: Add `is_iterable` and `is_nested_iterable` helpers to utils
ma-sadeghi Jun 20, 2024
b78b8a0
refactor: Add `InferenceResult` and `ImpedanceData` container classes
ma-sadeghi Jun 20, 2024
09f3dd2
refactor: Add whole bunch of objects validators: circuit, p0, priors,…
ma-sadeghi Jun 20, 2024
beba800
refactor: Major refactor of `perform_bayesian_inference`, now can do …
ma-sadeghi Jun 20, 2024
2a763a6
test: Add unit tests for SCSD, MCSD, SCMD inferences
ma-sadeghi Jun 20, 2024
b129f3e
refactor: Replace partial module imports with absolute ones
ma-sadeghi Jun 20, 2024
c7e66e0
refactor: Add `flush_streams` helper to utils.py
ma-sadeghi Jun 24, 2024
a23595b
chore: Fix typo in log warning message
ma-sadeghi Jun 25, 2024
ce896e2
refactor: Add `utils.flush_streams` so progress bars render properly
ma-sadeghi Jun 25, 2024
95c39bd
chore: Improve post-filtering warning message for empty circuits
ma-sadeghi Jun 25, 2024
9e1c1ec
feat: Add `is_ndarray_like` helper function to utils.py
ma-sadeghi Jun 25, 2024
a5a02d6
chore: Update type hints in utils.py to use Iterable instead of list
ma-sadeghi Jun 25, 2024
41bf562
refactor: Remove unused `circuit` from `parse_initial_guess` args
ma-sadeghi Jun 25, 2024
d10179b
feat: Add `get_parameter_bounds` helper to utils.py
ma-sadeghi Jun 25, 2024
418d23b
feat: Add `generate_initial_guess` helper to utils.py
ma-sadeghi Jun 25, 2024
54accb9
refactor: Propagate recent refactors
ma-sadeghi Jun 25, 2024
5f4015a
refactor: Update `fit_circuit_parameters` based on recent API changes
ma-sadeghi Jun 25, 2024
e204300
refactor: Standardize plotting functions to return ax object(s)
ma-sadeghi Jun 26, 2024
47907b3
docs: Better error message
ma-sadeghi Jul 22, 2024
757b62f
refactor: Deep copy circuits dataframe to avoid modifying original
ma-sadeghi Jul 22, 2024
551d887
bug: p0 must be replicated for distribute_task to work
ma-sadeghi Jul 22, 2024
f9931e3
bug: Handle edge case where p0 was not found
ma-sadeghi Jul 22, 2024
b61037b
refactor: Ensure seed is a list for MCMD compatibility
ma-sadeghi Jul 22, 2024
94d9525
refactor: Propagate recent API changes throughout the codebase
ma-sadeghi Jul 22, 2024
c46b393
docs: Update docs to include new example notebooks + update basic usage
ma-sadeghi Jul 22, 2024
292ee80
docs: Add new example notebooks
ma-sadeghi Jul 22, 2024
20ae908
refactor: Update `perform_full_analysis` per recent API changes
ma-sadeghi Jul 22, 2024
60de4f6
docs: Remove moved function from docstrings
ma-sadeghi Jul 22, 2024
0af90a1
feat: Add new toy dataset (battery cycling)
ma-sadeghi Jul 22, 2024
612d8f0
bug: Fixed edge case where handling R1 messed up with R10, etc.
ma-sadeghi Jul 22, 2024
8f4b71e
refactor: `validate_parameter` now optionally raises Exception
ma-sadeghi Jul 22, 2024
99bd911
refactor: Implement repr for `InferenceResult`
ma-sadeghi Jul 22, 2024
16bb5cd
refactor: `variables` is now inferred from dict keys rather than pass…
ma-sadeghi Jul 22, 2024
ee94198
refactor: Use 'converged' instead of 'success' for consistency
ma-sadeghi Jul 22, 2024
88f3491
test: Update unit test per recent API changes
ma-sadeghi Jul 22, 2024
7853839
feat: Forgot to add battery dataset assets
ma-sadeghi Jul 22, 2024
b1965b1
Use impedance.py fork until made compatible with NumPy 2.0
ma-sadeghi Jul 22, 2024
2766ab2
refactor: Fix typo
ma-sadeghi Jul 22, 2024
583e302
refactor: Don't clutter circuits dataframe with unnecessary columns
ma-sadeghi Jul 23, 2024
3bc75dc
refactor: Don't sort circuits dataframe, breaks indexing later
ma-sadeghi Jul 23, 2024
30b5830
bug: Fix edge case where priors is still None when private SCSD funct…
ma-sadeghi Jul 23, 2024
c4451f6
refactor: `print_inference_results` should rank circuits internally (…
ma-sadeghi Jul 23, 2024
0c67ccb
docs: Update basic workflow example notebook based on recent API changes
ma-sadeghi Jul 23, 2024
abd2e1e
docs: Use more sensible default args in the example notebook to not t…
ma-sadeghi Jul 23, 2024
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
13 changes: 8 additions & 5 deletions doc/basic_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ ae.visualization.plot_impedance_combo(freq, Z)

# Perform automated EIS analysis
circuits = ae.perform_full_analysis(freq, Z, iters=24, parallel=True)
print(circuits)

# Print summary of the results
mcmcs, status = circuits["MCMC (chain)"], circuits["MCMC (status)"]
for mcmc, stat, circuit in zip(mcmcs, status, circuits.circuitstring):
if stat == 0:
# Print summary of the inference for each circuit model
for i, row in circuits.iterrows():
circuit = row["circuit"]
mcmc = row["MCMC"]
if row["success"]:
ae.visualization.print_summary_statistics(mcmc, circuit)

# Print summary of all circuit models
ae.visualization.print_inference_results(circuits)
```

:::{seealso}
Expand Down
2 changes: 2 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ AutoEIS is still under development, and we will add more examples as we make pro
:maxdepth: 1

examples/circuit_basics
examples/circuit_generation
examples/basic_workflow
examples/parallel_inference
744 changes: 387 additions & 357 deletions examples/basic_workflow.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions examples/circuit_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Circuit models 101\n",
"# Circuit Models 101\n",
"\n",
"In this notebook, we will explore the basics of circuit models in AutoEIS. We will start by importing the necessary libraries."
]
Expand Down Expand Up @@ -311,11 +311,11 @@
{
"data": {
"text/plain": [
"array([1.31224604-3.15463527e+02j, 1.30870746-6.79460179e+01j,\n",
" 1.35630867-1.45662084e+01j, 1.45656166-3.12402983e+00j,\n",
" 1.44771251-7.23602325e-01j, 1.34794177-2.66541669e-01j,\n",
" 1.21918839-1.06364114e-01j, 1.17811049-4.72247543e-02j,\n",
" 1.14814457-3.18940068e-02j, 1.12181823-2.52094831e-02j])"
"array([0.85089852-1.64798029e+02j, 0.85081614-3.54974344e+01j,\n",
" 0.85810555-7.61382811e+00j, 0.94485726-1.56968312e+00j,\n",
" 1.00846777-3.85588331e-01j, 0.88255519-1.91496795e-01j,\n",
" 0.77938056-9.66334080e-02j, 0.71046522-6.71223724e-02j,\n",
" 0.65790512-4.10276536e-02j, 0.63191817-2.00368082e-02j])"
]
},
"execution_count": 10,
Expand Down
11,873 changes: 11,873 additions & 0 deletions examples/circuit_generation.ipynb

Large diffs are not rendered by default.

11,632 changes: 11,632 additions & 0 deletions examples/parallel_inference.ipynb

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ dependencies = [
"click",
"deprecated",
"dill",
"impedance",
# "impedance",
"impedance @ git+https://github.com/ma-sadeghi/impedance.py@fix-numpy2",
"ipython",
"ipykernel",
"ipywidgets",
Expand Down Expand Up @@ -102,6 +103,9 @@ path = "src/autoeis/version.py"
[tool.hatch.build.targets.sdist]
include = ["src/autoeis"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -vv --durations=5"
Expand Down
Binary file added src/autoeis/assets/battery_data.npy
Binary file not shown.
Loading
Loading