Skip to content

Commit

Permalink
Fix units, explain a few things better (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT authored Nov 13, 2024
1 parent b07aaff commit b2fd8d5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
4 changes: 2 additions & 2 deletions battdat/consistency/current.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ def check_subset(self, time_series: pd.DataFrame) -> Optional[str]:
curr_volt_cov = np.cov(stable_window['voltage'], stable_window['test_time'])[0, 1]
if np.sign(curr_volt_cov) != np.sign(stable_window['current'].mean()): # TODO (wardlt): Invert when we flip sign convention
return (f'Potential sign error in current. Average current between test_time={most_stable_time - self.window_length:.1f}s and '
f'test_time={most_stable_time:.1f} is {stable_window["current"].mean():.1e} A and the covariance between the voltage and time '
f'is {curr_volt_cov:.1e} V/s. The current and this covariance should have the same sign.')
f'test_time={most_stable_time:.1f} is {stable_window["current"].mean():.1e} A and the covariance between the voltage and current '
f'is {curr_volt_cov:.1e} V-s. The current and this covariance should have the same sign.')
Loading

0 comments on commit b2fd8d5

Please sign in to comment.