Giter Site home page Giter Site logo

usnistgov / tafel-fitter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meg-lbnl/tafel_fitter

0.0 2.0 0.0 443 KB

fork of https://github.com/MEG-LBNL/Tafel_Fitter, which is the reference implementation for https://dx.doi.org/10.1021/acs.jpcc.9b06820

Python 100.00%

tafel-fitter's Introduction

tafel-fitter

A Tafel analysis library based on 10.1021/acs.jpcc.9b06820. This repository is a fork of the reference implementation https://github.com/MEG-LBNL/Tafel_Fitter.

Example:

df = pd.read_csv("Input_files/test1.csv")

x = df["overpotential"].values
y = df["current"].values
u = tafel.estimate_overpotential(x, y)
tafel_data, fits = tafel.tafel_fit(u, y, windows=np.arange(0.025, 0.25, 0.001))


plt.plot(u, np.log10(np.abs(y)), marker="o")
lims = plt.gca().get_ylim()

colors = ["g", "m"]
for idx, (segment, best_fit) in enumerate(tafel_data.items()):

    plt.plot(u, np.log10(best_fit["j0"]) + best_fit["dlog(j)/dV"]*u, color=colors[idx])
    plt.axhline(np.log10(best_fit["j0"]), label=f"j0 {segment}", color=colors[idx])
    plt.axvline(best_fit["window_min"], color='k', alpha=0.2, linestyle="--")
    plt.axvline(best_fit["window_max"], color='k', alpha=0.2, linestyle="--")

plt.ylim(*lims)
plt.xlabel("overpotential (V)")
plt.ylabel("log current")
plt.legend(loc="lower right")

plt.axvline(0, color="k", alpha=0.5)
plt.show()

tafel-fitter's People

Contributors

bdecost avatar hjoress avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.