Jonathan Schillings 0d684af470 Add loop_from_file and timestamp_from_file functions
to extract loop_index and timestamp from the temporary _LOOP.txt and .mpl files during MPRfile initialization
Added unit tests but cannot upload test files due to LFS quota exceeded

Edited by Chris Kerr to fix flake8 warnings and resolve my comments from
the original PR https://github.com/echemdata/galvani/pull/102
2025-07-30 15:24:22 +03:00
2013-11-29 13:05:58 -08:00
2025-03-23 14:51:52 +02:00
2023-08-18 10:21:02 +01:00

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:

pip install git+https://codeberg.org/echemdata/galvani

Development installation and contributing

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

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

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

Description
Read proprietary file formats from electrochemical test stations
Readme GPL-3.0 13 MiB
Languages
Python 100%