Skip to content

Commit

Permalink
Rename new eclab field
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Feb 4, 2024
1 parent 0a68749 commit cf8841a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion navani/echem.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ def bio_state(x):
df["Time"] = df["time/s"]

# Adding current column that galvani can't export for some reason
if ('time/s' in df.columns) and ('dQ/mA.h' in df.columns):
if ('time/s' in df.columns) and ('dQ/mA.h' in df.columns or 'dq/mA.h' in df.columns):
df['dt'] = np.diff(df['time/s'], prepend=0)
if 'dQ/mA.h' not in df.columns:
df.rename(columns = {'dq/mA.h': 'dQ/mA.h'}, inplace = True)
df['Current'] = df['dQ/mA.h']/(df['dt']/3600)

if np.isnan(df['Current'].iloc[0]):
Expand Down

0 comments on commit cf8841a

Please sign in to comment.