Skip to content

Commit

Permalink
allow empty charge or discharge data for get_cap
Browse files Browse the repository at this point in the history
  • Loading branch information
jepegit committed Dec 25, 2023
1 parent 4b105d5 commit 7ccb8a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cellpy/readers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,10 @@ def interpolate_y_on_x(
else:
# TODO: @jepe - make this better (and safer)
if isinstance(new_x, tuple):
print("EXPERIMENTAL FEATURE - USE WITH CAUTION")
x_min, x_max, number_of_points = new_x
new_x = np.linspace(x_min, x_max, number_of_points, dtype=float)
logging.critical("EXPERIMENTAL FEATURE - USE WITH CAUTION")
logging.critical(f"start, end, number_of_points = {new_x}")
_x_min, _x_max, _number_of_points = new_x
new_x = np.linspace(_x_min, _x_max, _number_of_points, dtype=float)

new_y = f(new_x)

Expand Down

0 comments on commit 7ccb8a7

Please sign in to comment.