Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

edits to test_langmuir #1354

wants to merge 2 commits into from

Conversation

mason5git
Copy link

@mason5git mason5git commented Dec 13, 2021

issue #935
Minor changes to braginskii documentation including properly formatting the declaration of docstrings.

@github-actions github-actions bot added the plasmapy.formulary Related to the plasmapy.formulary subpackage label Dec 13, 2021
@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #1354 (b4b1524) into main (8099b8d) will not change coverage.
The diff coverage is n/a.

❗ Current head b4b1524 differs from pull request most recent head e91a9f6. Consider uploading reports for the commit e91a9f6 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1354   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files          73       73           
  Lines        7165     7165           
=======================================
  Hits         6957     6957           
  Misses        208      208           
Impacted Files Coverage Δ
plasmapy/formulary/braginskii.py 99.72% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8099b8d...e91a9f6. Read the comment docs.

@mason5git mason5git changed the title minor edits to braginskii documentation edits to braginskii documentation Dec 13, 2021
@github-actions github-actions bot added the plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage label Dec 14, 2021
@mason5git mason5git changed the title edits to braginskii documentation edits to test_langmuir Dec 15, 2021
Copy link
Member

@namurphy namurphy left a 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}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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}"

Comment on lines -74 to +77
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
Copy link
Member

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.

@namurphy namurphy added the status: dormant PRs that are stalled label May 26, 2023
@namurphy namurphy added this to the Future milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage plasmapy.formulary Related to the plasmapy.formulary subpackage status: dormant PRs that are stalled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants