diff --git a/nafuma/electrochemistry/io.py b/nafuma/electrochemistry/io.py index 1963253..e3dd668 100644 --- a/nafuma/electrochemistry/io.py +++ b/nafuma/electrochemistry/io.py @@ -76,13 +76,13 @@ def read_biologic(path): Output: df: pandas DataFrame containing the data as-is, but without additional NaN-columns.''' - with open(path, 'r') as f: + with open(path, 'rb') as f: lines = f.readlines() header_lines = int(lines[1].split()[-1]) - 1 - df = pd.read_csv(path, sep='\t', skiprows=header_lines) + df = pd.read_csv(path, sep='\t', skiprows=header_lines, encoding='cp1252') df.dropna(inplace=True, axis=1) return df diff --git a/nafuma/electrochemistry/plot.py b/nafuma/electrochemistry/plot.py index df977a5..0d3e2cc 100644 --- a/nafuma/electrochemistry/plot.py +++ b/nafuma/electrochemistry/plot.py @@ -161,7 +161,7 @@ def prettify_gc_plot(fig, ax, options=None): 'positions': {'xaxis': 'bottom', 'yaxis': 'left'}, 'x_vals': 'specific_capacity', 'y_vals': 'voltage', 'xlabel': None, 'ylabel': None, - 'units': None, + 'units': {'capacity': 'mAh', 'specific_capacity': r'mAh g$^{-1}$', 'time': 's', 'current': 'mA', 'energy': 'mWh', 'mass': 'g', 'voltage': 'V'}, 'sizes': None, 'title': None }