From 2e37948fc1c9a75b9da084b63459c00145763f0d Mon Sep 17 00:00:00 2001 From: Runze Date: Fri, 5 Apr 2024 15:28:47 -0400 Subject: [PATCH 1/3] Add instructions on input data format --- doc/IO_formating.md | 0 doc/index.rst | 1 + 2 files changed, 1 insertion(+) create mode 100644 doc/IO_formating.md diff --git a/doc/IO_formating.md b/doc/IO_formating.md new file mode 100644 index 00000000..e69de29b diff --git a/doc/index.rst b/doc/index.rst index d4fc4a07..80753b4f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -27,5 +27,6 @@ Contents installation.md basic_usage.md + IO_formating.md circuit.md modules.rst From 306e8fd45f291e538fa8c95ecc8e15c51397d771 Mon Sep 17 00:00:00 2001 From: Runze Date: Fri, 12 Apr 2024 17:25:14 -0400 Subject: [PATCH 2/3] add instructions on input formats --- doc/IO_formating.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/IO_formating.md b/doc/IO_formating.md index e69de29b..bd12fa44 100644 --- a/doc/IO_formating.md +++ b/doc/IO_formating.md @@ -0,0 +1,41 @@ +# AutoEIS Input Data Format Guide + +As demonstrated in the [example notebook](https://github.com/AUTODIAL/AutoEIS/blob/main/examples/demos/basic_workflow.ipynb), AutoEIS requires access to two specific features from the measured EIS data: +- **Impedance Data (Complex Values)**: Denoted as *Z* in the sample file. +- **Measurement Frequencies**: Denoted as *freq*. + +Due to the variety of devices and settings used for EIS analysis, the collected data often comes in different formats, presenting challenges for developing a universal data loading function. To address this, we suggest users customize their data loading process as described below. + +## General Formats +For common EIS data formats, you can load them using the following methods: +- **CSV (.csv)**: `pandas.read_csv` +- **JSON (.json)**: `pandas.read_json` or `json.load()` +- **Spreadsheets (.xls, .xlsx)**: `pandas.read_excel` +- **Text file (.txt)**: `numpy.loadtxt` + +## Device-Specific Formats +For specific formats provided by measurement devices, consider using additional packages such as [pyimpspec](https://vyrjana.github.io/pyimpspec/index.html): +- **BioLogic**: (.mpt) +- **Eco Chemie**: (.dfr) +- **Gamry**: (.dta) +- **Ivium**: (.idf) and (.ids) + +## The `pyimpspec` Package +[`pyimpspec`](https://vyrjana.github.io/pyimpspec/index.html) is a Python library designed to handle and process spectroscopic data. It supports loading EIS data from various proprietary formats and converting them into a format compatible with AutoEIS, facilitating easy data access. + +## Example Usage +Below is an example demonstrating how to use `pyimpspec` to load a proprietary EIS data format and access the impedance data. + +```python +# !pip install pyimpspec + +from pyimpspec import DataSet, parse_data + +# Load EIS data from a proprietary format +data: DataSet +for eis_data in parse_data("path/to/your/data.dta"): + loaded_eis = eis_data.to_dataframe() + + # Extract frequency and complex impedance data + freq = loaded_eis["f (Hz)"].values + impedance = loaded_eis["Re(Z) (ohm)"].values + loaded_eis["Im(Z) (ohm)"].values * 1j From 8182ff081f64b27b2435734c2c2e973d13a08c1c Mon Sep 17 00:00:00 2001 From: Runze Date: Sat, 13 Apr 2024 14:36:32 -0400 Subject: [PATCH 3/3] Revise the documentation of inputs --- doc/IO_formating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/IO_formating.md b/doc/IO_formating.md index bd12fa44..2b75e7c2 100644 --- a/doc/IO_formating.md +++ b/doc/IO_formating.md @@ -38,4 +38,4 @@ for eis_data in parse_data("path/to/your/data.dta"): # Extract frequency and complex impedance data freq = loaded_eis["f (Hz)"].values - impedance = loaded_eis["Re(Z) (ohm)"].values + loaded_eis["Im(Z) (ohm)"].values * 1j + Z = loaded_eis["Re(Z) (ohm)"].values + loaded_eis["Im(Z) (ohm)"].values * 1j