-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edits to test_langmuir #1354
base: main
Are you sure you want to change the base?
edits to test_langmuir #1354
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1354 +/- ##
=======================================
Coverage 97.09% 97.09%
=======================================
Files 73 73
Lines 7165 7165
=======================================
Hits 6957 6957
Misses 208 208
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting these changes! I had a few quick formatting suggestions, and a question about the reason why there were some changes to units in a few tests. I was curious if you found a bug in the code, and if there would need to be a corresponding bugfix. Thank you again!
|
||
value = langmuir._fit_func_lin(self.x, self.x0, self.y0, self.c0) | ||
expect_value = 25 | ||
|
||
errStr = ( | ||
f"Linear fitting function did not return the expected" | ||
f"value {expect_value} and instead returned {value}" | ||
"Linear fitting function did not return the expected value {expect_value} and instead returned {value}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Linear fitting function did not return the expected value {expect_value} and instead returned {value}" | |
"Linear fitting function did not return the expected " | |
f"value {expect_value} and instead returned {value}" |
...since we typically limit lines to ≲88 characters. The second line needs to be an f-string so that the variable names in brackets get replaced with the values of each variable. Good catch on noticing that there was a missing space between expected
and value
.
f"Linear fitting function with inverse slope did not return" | ||
f"the expected value {expect_value} and instead returned" | ||
f"{value}" | ||
f"Linear fitting function with inverse slope did not return the expected value {expect_value} and instead returned {value}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f"Linear fitting function with inverse slope did not return the expected value {expect_value} and instead returned {value}" | |
"Linear fitting function with inverse slope did not return " | |
f"the expected value {expect_value} and instead returned {value}" |
f"use in fitting a bi-Maxwellian electron current growth" | ||
f"region did not return the expected value {expect_value} and" | ||
f"instead returned {value}" | ||
f"Linear fitting function with inverse slope and an offset for use in fitting a bi-Maxwellian electron current growth region did not return the expected value {expect_value} and instead returned {value}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f"Linear fitting function with inverse slope and an offset for use in fitting a bi-Maxwellian electron current growth region did not return the expected value {expect_value} and instead returned {value}" | |
"Linear fitting function with inverse slope and an offset for " | |
"use in fitting a bi-Maxwellian electron current growth " | |
f"region did not return the expected value {expect_value} and " | |
f"instead returned {value}" |
bias_2darr = np.array((np.random.rand(N), np.random.rand(N))) * u.V | ||
bias_2darr = np.array((np.random.rand(N), np.random.rand(N))) * u.A | ||
current_2darr = np.array((np.random.rand(N), np.random.rand(N))) * u.A | ||
|
||
bias_infarr = np.append(np.random.rand(N - 1), np.inf) * u.V | ||
bias_infarr = np.append(np.random.rand(N - 1), np.inf) * u.A * u.V | ||
current_infarr = np.append(np.random.rand(N - 1), np.inf) * u.A | ||
|
||
bias_longarr = np.random.rand(N + 1) * u.V | ||
bias_longarr = np.random.rand(N + 1) * u.A * u.V | ||
current_longarr = np.random.rand(N + 1) * u.A | ||
|
||
current_arr2 = np.random.rand(N) * u.A | ||
current_arr2 = np.random.rand(N) * u.A *u.V |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you say a bit more about why the units are being changed? I'm wondering if there would need to be a bugfix in the corresponding code.
issue #935
Minor changes to braginskii documentation including properly formatting the declaration of docstrings.