Code Monkey home page Code Monkey logo

pyimpspec's People

Contributors

vyrjana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyimpspec's Issues

multiprocessing

Dear vyrjana,
I'm trying to accelerated processing the circuit fit when treat batch process, I adopted multiprocess by using 6 num_workers to process a dataset with 20 frequencies and the batch size is 20,the time cost of common loop is 69.77 seconds, and the multiprocess is 22.28 seconds, but it is too long for me?
Do you have some tips for multiprocess for speeding up ?
Thanks a lot!

Lambda values ~>0.0001 DRT fail to calculate

Specifications

  • pyimpspec version: 4.1.1
  • Python version: 3.11.8
  • OS: Windows

Description:
DRT calculations fail at certain lambda values producing the following error:
new = pyimpspec.calculate_drt(data0, method='tr-rbf',lambda_value=lam)
DRTError: Failed to perform calculations! Try tweaking the settings.

This occurs at a lambda value of ~0.0001.

This error only occurs with cvxpy (with the windows specific instructions followed)

With both cvxopt and kvxopt, erroneous DRT distributions are produced with negative values and extra oscillations.
image

Expected behavior
The system is a simple randle cell with a known characteristic time at 10^-1. pyDRTtools produces the correct results at various lambda values.
image

Python 3.11 support

This issue is for keeping track of the status of support for Python 3.11. The test-python-3-11 branch contains modified workflow files and at the moment the build workflow fails. The reason is that cvxopt does not have a wheel for Python 3.11 and pip is unsuccessful when it tries to compile the package. An issue has been opened in the cvxopt repository regarding the availability of Python 3.11 wheels.

dataframe to dataset

Hi, I'm trying to use the function 'dataframe_to_data_sets', trying to convert a dataframe format into dataset to make the circuit fit. I've read the API, which need to input the path where the dataframe located,Is anyway to convert the dataframe into dataset directly?
Thanks!

_calculate_residuals function calculates wrong values

Desktop (please complete the following information):

  • pyimpspec version: 4.1.0
  • Python version: 3.11.4
  • OS: Windows

Describe the bug
current implementation of pyimpspec.analysis.utility.residuals:

def _calculate_residuals(
    Z_exp: ComplexImpedances,
    Z_fit: ComplexImpedances,
) -> ComplexResiduals:
    residuals: ComplexResiduals = empty(Z_exp.shape, dtype=ComplexResidual)
    residuals.real = (Z_exp.real - Z_fit.real) / abs(Z_exp)
    residuals.imag = (Z_exp.imag - Z_fit.imag) / abs(Z_exp)
    return residuals

according to equation [1] in B.A. Boukamp, 1995, J. Electrochem. the denominator is

the vector length (absolute value) of the modeling function

so the equations should be:

residuals.real = (Z_exp.real - Z_fit.real) / abs(Z_fit)
residuals.imag = (Z_exp.imag - Z_fit.imag) / abs(Z_fit)

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.