vyrjana/pyimpspec — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Python package for working with electrochemical impedance spectroscopy data. I want researchers to be able to use it from Python code and from a command line tool.

It should read impedance spectrum files, parse the frequency and complex impedance data, check whether spectra look valid using Kramers Kronig style tests and Z HIT, and let users define equivalent circuits using simple circuit description strings. It should also support custom circuit elements, fit circuit models to measured data with complex nonlinear least squares, estimate relaxation time distributions, simulate spectra from circuits, and make useful plots of spectra and analysis results.

Please make it feel like a real installable research library, with clear examples, sensible errors, tests for the important parts, and documentation showing a basic workflow from loading data through validation, fitting, simulation, and plotting. Keep it lightweight to import when possible.

Want more depth? Deep Reverse