Skip to main content

Tools for analysing data from the flow battery lab at Empa

Project description

🌊 PyFlowBatt

This Python package contains functions and a CLI for analysing data from the flow battery lab at Empa.

Installation

Use Python >3.10, and install with pip:

pip install git+https://github.com/empaeconversion/pyflowbatt.git

Usage

Use in a terminal (e.g. Command Prompt or PowerShell).

To analyse data and get a full summary and ro-crate, use pyflowbatt --folder="path/to/your/folder".

To zip everything at the end (e.g. to upload to Zenodo), use pyflowbatt --folder="path/to/your/folder" --zip.

You can also navigate to a folder e.g.

cd path/to/your/folder
pyflowbatt

PyFlowBatt will automatically scan for files like GCPL, EIS, LSV, CV, as well as BattInfo Converter .xlsx files, process the data, convert to battery data format, produce summary graphs and excel reports, create a BattInfo JSON-LD metadata file, and a top level ro-crate metadata file.

A full analysis can take a while. You can do a 'dry run' to check what files would be analysed:

pyflowbatt --dry
pyflowbatt --dry --folder="path/to/your/folder" --zip

This is useful for checking everything is in order before running a long analysis.

You can override some settings by adding a pyflowbatt.toml file to a sample folder, parent folder, or your home folder. Use pyflowbatt init to create a template file and see what can be modified.

Using in Python

You can also use the functions in Python, e.g.

# Use individual functions
from pyflowbatt import gcpl, lsv, cv
from pyflowbatt.read import read_to_bdf

df = read_to_bdf("path/to/my/gcpl-file")
df, cycle_df = gcpl.analyse(df)

cv_df = read_to_bdf("path/to/my/cv-file")
cv_df, cv_cycle_df, capacitance_mF = cv.analyse(cv_df)

lsv_df = read_to_bdf("path/to/my/lsv-file")
lsv_result_dict = lsv.analyse(lsv_df)

# Or run the full analysis on folders
from pyflowbatt.analysis import analyse_sample, analyse_all_samples
analyse_sample("path/to/sample/folder")
analyse_all_samples("path/to/parent/folder/of/many/samples")

For contributors

If you find bugs, or want new features, open an issue on the GitHub page.

If you want to directly contribute to the project, first clone the repo and install it as editable with developer dependencies:

git clone https://github.com/empaeconversion/pyflowbatt.git

cd pyflowbatt

pip install -e .[dev]

Then open this folder in an editor like VSCode.

You should always create a new branch before making edits, main is only for tested, working code that everyone can use.

E.g. make and switch to a new branch with

git checkout -b new-feature

You have now branched off the main PyFlowBatt into your own branch called e.g. new-feature. Now you can do whatever you like and it won't affect the main branch.

When you have made and committed some changes that add a feature or fix a problem, and you want to put them into main, open a pull request on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyflowbatt-0.2.0rc1.tar.gz (194.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyflowbatt-0.2.0rc1-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file pyflowbatt-0.2.0rc1.tar.gz.

File metadata

  • Download URL: pyflowbatt-0.2.0rc1.tar.gz
  • Upload date:
  • Size: 194.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyflowbatt-0.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 52d976246349937383a2f397d14f9d6f9ba613a4b67e0497885971fe5e64a13e
MD5 d79e57a8b829cbe16552795f5e922325
BLAKE2b-256 e2936fe471e95b0fcdd34bb1558ae3732332edd23e9b91a0e3ec659a435d3454

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyflowbatt-0.2.0rc1.tar.gz:

Publisher: CI.yml on EmpaEconversion/PyFlowBatt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyflowbatt-0.2.0rc1-py3-none-any.whl.

File metadata

  • Download URL: pyflowbatt-0.2.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyflowbatt-0.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 df7017c72b38e20b5599966d8ceb9c93929c0e00795522d2e0dd05af3a12bb37
MD5 3826c56501ef5c2122d3ec294b9f5847
BLAKE2b-256 ab94eaf59ab5d72a478a5fd644cb84c5b044fa8419fd19a026f5e150785aabdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyflowbatt-0.2.0rc1-py3-none-any.whl:

Publisher: CI.yml on EmpaEconversion/PyFlowBatt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page