bicarlsen / easy-biologic

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

IRange problem in CP #11

Closed chemyibinjiang closed 2 years ago

chemyibinjiang commented 2 years ago

In CP, the maximum current is obtained according toi_max = max( currents ), which determines the IRange later. But if the currents are passed as negative values (e.g., to reduce metallic salt in working electrode), the IRange would not be correct. Maybe measuring the maximum of the absolute values of currents can be the solution. Something like:

currents = [abs(current) for current in currents]
i_max = max( currents )
bicarlsen commented 2 years ago

Great catch. I have updated this in commit 6d95f8e.