bicarlsen / easy-biologic

Python library for communicating with Biologic devices.
GNU General Public License v3.0
18 stars 11 forks source link

Question regarding new base program #1

Closed marcusng94 closed 3 years ago

marcusng94 commented 3 years ago

Hi there,

First of all, I'd like to thank you for writing this library, it makes Biologic potentiostat to be more easily integrated to the project I'm currently working on. I was wondering whether you have thought about/ in progress writing the PEIS base program?

Thanks for your time, hope to hear from you soon!

Sincerely, Marcus

bicarlsen commented 3 years ago

Hey Marcus,

Really glad to hear you're finding the package useful. I'm not currently developing that base program. If you'd like to create it and issue a pull request I'd be happy to merge it into the package though. Otherwise I can write it up when I get a chance.

How urgently do you need it?

marcusng94 commented 3 years ago

Hi BICarlsen,

I'm afraid my programming ability is limited.. and EIS has a different set of parameters (frequency range), so I’m not confident enough to write the base program. Would be great if it was done within a week, but I understand if you have other priority in hand..

Sincerely, Marcus

bicarlsen commented 3 years ago

Great :) One of my colleagues is interested in learning how to develop base programs, so he is going to code it up. We'll let you know when it is ready.

marcusng94 commented 3 years ago

Thank you so much! Really appreciate it! I think once EIS is done, the package will be able to do most if not all the techniques required in a typical lab electrochemistry experiment! (: Will be waiting for the news!

Cheers!

vskorjanc commented 3 years ago

Hey Marcus, I'm the colleague that volunteered to write the base program :) Brian and I have tested it and it works, but since we don't have any experience with PEIS measurements we definitely recommend you to test the program thoroughly and let us know if you find any errors. The same goes with the parameter input fields, I'm not sure if I've defined them correctly so I propose you to see how they are used in our code and compare them with the ones defined in the EC-Lab's development package. Good luck with your electrochemisty measurements!

marcusng94 commented 3 years ago

Hey Viktor,

This is fantastic news! I'm glad to hear that, thanks for the prompt reply! I will get back to both of you on how it goes and feedback!

By the way, have you guys tested the CP and CA technique? I have tested before and it seemed to work fine for short duration, but when I try to apply constant voltage (CA) or constant current (CP) for long period > 20 h, it seemed to stop, it could just be problem from my part but I was just wondering have you guys tested it.

bicarlsen commented 3 years ago

I just put the updated package on PyPI. If you have a chance to test it, can you comment here on how it works for you. If there are any further bugs we'll resolve them, otherwise I'll mark this Issue closed.


In regards to CA and CP we don't use them directly, but the MPP_Tracking base program uses CALimit, and we have let that run for about a week without issue.

If you continue to have problems with it, you can open another Issue, and I'll see if I can sort it out. If you do that, try to provide as much info as possible.

vskorjanc commented 3 years ago

To follow up on Brian's reply, we were having problems with our program freezing when running MPP_tracking base program. Pressing enter would unfreeze it and the program would continue where it had stopped. We solved this issue by writing the output from the terminal to a file, e. g. python mpp_tracking.py > log.log 2> err.log.

marcusng94 commented 3 years ago

Hello to both of you,

Brian:- That's a good suggestion, I will try that in the future.

Viktor:- I have tested it and it seemed to work fine without any error, however, the output file is not what I'd expect from a PEIS experiment. Typically I'd expect Z''(imaginary in Ohms) and Z(real in Ohms) as the output of the measurement for a Nyquist plot. Instead I get values of: "Process | Time [s] | Voltage [V] | Current [A] | abs( Voltage ) [V] | abs( Current ) [A] | Impendance phase | Voltage_ce [V] | abs( Voltage_ce ) [V] | abs( Current_ce ) [A] | Impendance_ce phase | Frequency [Hz]"`

Am I missing something? I'm unsure what exactly is the Impendance phase and the unit of it in the output of the experiment. There's just minor typo for the Impedance in the code, nothing serious.

bicarlsen commented 3 years ago

We weren't sure what the Impedance phase was either, but that is how the field is described in the developers guide (attached, see Data format section). Because we haven't actually run a PEIS experiment we didn't know what the actual output for that field was, so just copied the name given in the guide.

Our best guess is that instead of returning the data as the imaginary and real parts, it returns the modulus and phase, from which you have to reconstruct the imaginary and real. If this is the case, I think we'll opt to return the raw data, and leave the use to manipulate how they desire.

peis.pdf

marcusng94 commented 3 years ago

I'll look more into the manipulation then! Thanks for the reply and all the help, I really appreciate it! 💯

Cheers!