Skip to main content

Open and process battery charger log data files

Project description

galvani

Read proprietary file formats from electrochemical test stations.

Usage

Bio-Logic .mpr files

Use the MPRfile class from BioLogic.py (exported in the main package)

from galvani import BioLogic
import pandas as pd

mpr_file = BioLogic.MPRfile('test.mpr')
df = pd.DataFrame(mpr_file.data)

Arbin .res files

Use the ./galvani/res2sqlite.py script to convert the .res file to a sqlite3 database with the same schema, which can then be interrogated with external tools or directly in Python. For example, to extract the data into a pandas DataFrame (will need to be installed separately):

import sqlite3
import pandas as pd
from galvani.res2sqlite import convert_arbin_to_sqlite
convert_arbin_to_sqlite("input.res", "output.sqlite")
with sqlite3.connect("output.sqlite") as db:
    df = pd.read_sql(sql="select * from Channel_Normal_Table", con=db)

This functionality requires MDBTools to be installed on the local system.

Installation

The latest galvani releases can be installed from PyPI via

pip install galvani

The latest development version can be installed with pip directly from GitHub (see note about git-lfs below):

GIT_LFS_SKIP_SMUDGE=1 pip install git+https://github.com/echemdata/galvani

Development installation and contributing

[!WARNING]

This project uses Git Large File Storage (LFS) to store its test files, however the LFS quota provided by GitHub is frequently exceeded. This means that anyone cloning the repository with LFS installed will get failures unless they set the GIT_LFS_SKIP_SMUDGE=1 environment variable when cloning. The full test data from the last release can always be obtained by downloading the GitHub release archives (tar or zip), at https://github.com/echemdata/galvani/releases/latest

If you wish to add test files, please ensure they are as small as possible, and take care that your tests work locally without the need for the LFS files. Ideally, you could commit them to your fork when making a PR, and then they can be converted to LFS files as part of the review.

If you wish to contribute to galvani, please clone the repository and install the testing dependencies:

git clone git@github.com:echemdata/galvani
cd galvani
pip install -e .\[tests\]

Code can be contributed back via GitHub pull requests and new features or bugs can be discussed in the issue tracker.

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

galvani-0.5.0.tar.gz (37.4 kB view details)

Uploaded Source

File details

Details for the file galvani-0.5.0.tar.gz.

File metadata

  • Download URL: galvani-0.5.0.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for galvani-0.5.0.tar.gz
Algorithm Hash digest
SHA256 da0e3b34b114bf615caf3061fc72ef0ab59d2e175bbfd580a22977c290928270
MD5 6bc620bc385d05af801581c9f10132e6
BLAKE2b-256 af3a8ab1095fb888534540bca21e0c15065819331f3d42a156eac799aa6816ab

See more details on using hashes here.

Supported by

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