Skip to content

Commit 8091e26

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9db4156 commit 8091e26

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

Examples/Tests/spacecraft_charging/analysis.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import numpy as np
21
import matplotlib.pyplot as plt
2+
import numpy as np
33
from openpmd_viewer import OpenPMDTimeSeries
44
from scipy.optimize import curve_fit
55

6-
7-
86
ts = OpenPMDTimeSeries('../../../../warpx/Examples/Physics_applications/spacecraft_charging/diags/diag1/')
97
dt = 1.27e-8
108
t=[]
@@ -21,7 +19,7 @@
2119

2220
def func(x, v0, tau):
2321

24-
return v0 * (1-np.exp(-np.array(x) / tau))
22+
return v0 * (1-np.exp(-np.array(x) / tau))
2523

2624

2725

@@ -53,9 +51,4 @@ def func(x, v0, tau):
5351
f = open('results.txt', 'a')
5452
f.write( str(popt[0]) +' ' + str(popt[1] + '\n')
5553
f.close()
56-
assert (diff_v0 < tolerance_v0) and (diff_tau < tolerance_tau), 'Test spacecraft_charging did not pass'
57-
58-
59-
60-
61-
54+
assert (diff_v0 < tolerance_v0) and (diff_tau < tolerance_tau), 'Test spacecraft_charging did not pass'

0 commit comments

Comments
 (0)