Skip to main content

OECT (Organic Electrochemical Transistor) data processing infrastructure for experiment management, feature engineering, and analysis

Project description

OECT-Infra

A comprehensive data processing infrastructure for OECT (Organic Electrochemical Transistor) experiments

PyPI version Python 3.11+ License: MIT

Overview

OECT-Infra is an end-to-end platform that transforms raw experimental data into high-performance structured formats, providing standardized feature engineering, visualization, and reporting capabilities for OECT research.

Key Features

  • 🔄 Data Conversion: Parallel batch conversion from CSV/JSON to standardized HDF5 format
  • 📊 Lazy-Loading API: Efficient access to experimental metadata and measurement data with intelligent caching
  • 🔧 Feature Engineering:
    • V1: Extract transfer characteristics (gm, Von, |I|, etc.) in columnar HDF5 format
    • V2: Advanced DAG-based extraction with YAML configs, Parquet storage, and HuggingFace-style API
  • 📁 Unified Data Catalog: SQLite-based indexing with bidirectional file↔database sync
  • 📈 Visualization: High-performance plotting with animation/video export
  • 📄 Automated Reporting: Configurable PowerPoint generation for stability analysis
  • 📉 Degradation Analysis: 17+ power law models with multi-metric comparison framework

Installation

pip install oect-infra

Requirements

  • Python 3.11 or higher
  • Core dependencies: h5py, pandas, numpy, matplotlib, pydantic, scipy, scikit-learn, PyYAML

Quick Start

Using the Unified Interface

from infra.catalog import UnifiedExperimentManager

# Initialize manager
manager = UnifiedExperimentManager('catalog_config.yaml')

# Get an experiment
exp = manager.get_experiment(chip_id="#20250804008", device_id="3")

# Access data
transfer_data = exp.get_transfer_data()
features = exp.get_features(['gm_max_forward', 'Von_forward'])

# Visualization
fig = exp.plot_transfer_evolution()

Using the Command-Line Interface

# Initialize catalog system
catalog init --auto-config

# Scan and index HDF5 files
catalog scan --path data/raw --recursive

# Synchronize data
catalog sync --direction both

# Query experiments
catalog query --chip "#20250804008" --output table

# Extract Features V2
catalog v2 extract-batch --feature-config v2_ml_ready --workers 4

Features V2 Extraction

# Single experiment with V2
exp = manager.get_experiment(chip_id="#20250804008", device_id="3")
result_df = exp.extract_features_v2('v2_transfer_basic', output_format='dataframe')

# Batch extraction
experiments = manager.search(chip_id="#20250804008")
result = manager.batch_extract_features_v2(
    experiments=experiments,
    feature_config='v2_ml_ready',
    save_format='parquet',
    n_workers=4
)

Architecture

Layered Design

Core Foundation (L0)

  • csv2hdf: Data conversion
  • experiment: Data access
  • oect_transfer: Transfer characteristics analysis
  • features: Feature storage

Business Application (L1)

  • features_version: Feature workflows V1
  • features_v2: Feature engineering V2 system
  • visualization: Plotting tools

Application Integration (L2)

  • catalog: Unified management
  • stability_report: Report generation

Data Flow Pipeline

CSV/JSON → csv2hdf → Raw HDF5 → experiment (lazy-loading)
         → [V1] oect_transfer & features_version → Feature HDF5
         → [V2] features_v2 (DAG compute graph) → Feature Parquet
         → catalog (indexing + workflow metadata) → visualization/stability_report

Configuration

OECT-Infra uses YAML configuration files. Create a catalog_config.yaml:

roots:
  raw_data: "data/raw"
  features_v1: "data/features"
  features_v2: "data/features_v2"

database:
  path: "catalog.db"

sync:
  conflict_strategy: "keep_newer"

Documentation

  • Complete Documentation
  • Package documentation included in the installed package
  • See infra/ subdirectory for detailed module documentation

Examples

Check out example notebooks in the source repository:

  • Example notebooks and scripts included in package
  • Comprehensive API documentation in module docstrings

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use OECT-Infra in your research, please cite:

@software{oect_infra,
  author = {lidonghao},
  title = {OECT-Infra: Data Processing Infrastructure for OECT Experiments},
  year = {2025},
  url = {https://github.com/Durian-leader/oect-infra-package}
}

Support

For issues and questions:

Acknowledgments

This project was developed for OECT (Organic Electrochemical Transistor) research, providing tools for efficient data management, analysis, and visualization in materials science and electrochemistry research.

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

oect_infra-1.0.10.tar.gz (296.5 kB view details)

Uploaded Source

Built Distribution

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

oect_infra-1.0.10-py3-none-any.whl (363.1 kB view details)

Uploaded Python 3

File details

Details for the file oect_infra-1.0.10.tar.gz.

File metadata

  • Download URL: oect_infra-1.0.10.tar.gz
  • Upload date:
  • Size: 296.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for oect_infra-1.0.10.tar.gz
Algorithm Hash digest
SHA256 91f0f257fbe5bf1e4be1a8a4cee6ba3cdd82695cca5b6abaa606710038658e25
MD5 e80eac2cdd3d7de39c395c13c006c8e9
BLAKE2b-256 2210749591f4a4362bac443ddbfd8e0a8e1c8c1e9bda02d312a50c56f282a5f3

See more details on using hashes here.

File details

Details for the file oect_infra-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: oect_infra-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 363.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for oect_infra-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 5376ff2d9ad9fb41083893bc24ae6763060d4d414231ac78353db0e5425ca285
MD5 36d89776dccfccf97040538c2d03d106
BLAKE2b-256 de0996c16b8cfac0ff2e9e81fa6e94153fb41b4c5df6eeb4b75a9a6328c617fd

See more details on using hashes here.

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