Comments (3)
yep. It's a known issue. You're going to have to make the circuit fit a numpy value
from pyeis.
You might just want to grab n-block's version. He seems to be on top of things
(https://github.com/n-bock/PyEIS)
from pyeis.
I've fixed the this issue, but have no authority of "pull request"
but I've tested attached code, works well.
Reason why issue happened is self.KK_circuit_fit[i].real and self.KK_circuit_fit[i].imag not aligned to array data format.
so it should be changed following
(I'm in office so not possible to upload the screen shot and code)
#changed by Gim
length_of_kk_circuit_fit = len(self.KK_circuit_fit[i])
KK_circuit_fit_real = []
KK_circuit_fit_imag = []
for idx in range(length_of_kk_circuit_fit):
KK_circuit_fit_real.append(self.KK_circuit_fit[i][idx+length_of_kk_circuit_fit].real)
KK_circuit_fit_imag.append(self.KK_circuit_fit[i][idx + length_of_kk_circuit_fit].imag)
KK_circuit_fit_real = np.array(KK_circuit_fit_real)
KK_circuit_fit_imag = np.array(KK_circuit_fit_imag)
self.KK_rr_re.append(residual_real(re=self.df[i].re, fit_re=KK_circuit_fit_real, fit_im=-KK_circuit_fit_imag))#relative residuals for the real part
self.KK_rr_im.append(residual_imag(im=self.df[i].im, fit_re=KK_circuit_fit_real, fit_im=-KK_circuit_fit_imag)) #relative residuals for the imag part
# changed by Gim
#self.KK_rr_re.append(residual_real(re=self.df[i].re, fit_re=self.KK_circuit_fit[i].real, fit_im=-self.KK_circuit_fit[i].imag)) #relative residuals for the real part
#self.KK_rr_im.append(residual_imag(im=self.df[i].im, fit_re=self.KK_circuit_fit[i].real, fit_im=-self.KK_circuit_fit[i].imag)) #relative residuals for the imag part
from pyeis.
Related Issues (11)
- Numpy Type Error when using freq_gen function HOT 5
- AttributeError: 'Series' object has no attribute 'real' using EIS_plot method HOT 6
- Print or show plots
- Add requirements.txt and install_requires into setup.py
- Please let me know how to fit the type of dataframe with EIS_fit
- UnboundLocalError: local variable 'R' referenced before assignment HOT 1
- Typing issues when using fitting='on' HOT 2
- Unable to load .mpt file (EIS imported) HOT 4
- Unable to load .mpt
- EIS parameters used for simulation does not match fitted parameters from the same EIS spectra
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyeis.