pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/PlasmaPy/PlasmaPy/pull/2749

60.css" /> Add examples in ForceFreeRluxRopes docstring by AndrewSykes1 · Pull Request #2749 · PlasmaPy/PlasmaPy · GitHub
Skip to content

Comments

Add examples in ForceFreeRluxRopes docstring#2749

Open
AndrewSykes1 wants to merge 1 commit intoPlasmaPy:mainfrom
AndrewSykes1:documentation_example_addition
Open

Add examples in ForceFreeRluxRopes docstring#2749
AndrewSykes1 wants to merge 1 commit intoPlasmaPy:mainfrom
AndrewSykes1:documentation_example_addition

Conversation

@AndrewSykes1
Copy link

Adds examples demonstrating how to use ForceFreeFluxRope and it's associated methods.

Closes #2531

@AndrewSykes1 AndrewSykes1 requested a review from a team as a code owner July 8, 2024 20:34
@AndrewSykes1 AndrewSykes1 requested review from ejohnson-96 and removed request for a team July 8, 2024 20:34
@github-actions
Copy link

github-actions bot commented Jul 8, 2024

Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱

Our contributor guide has information on:

Important

PlasmaPy recently switched to an src layout. The source code previously in plasmapy/ is now in src/plasmapy/. Tests are now in tests/. If you have previously done an editable installation, it will likely need to be re-done (i.e., with pip install -e .[tests,docs] in the top-level directory of the repository). The former plasmapy/ directory will need to be deleted manually in old clones because git does not track directories.

The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our chat room or weekly community meeting & office hours. Here are some tips:

  • Try fixing CI / Python 3.12 test failures first.
  • Most pre-commit.ci - pr failures can be automagically fixed by commenting pre-commit.ci autofix below, followed by a git pull to bring the changes back to your computer. Please also see our pre-commit troubleshooting guide.
  • If pre-commit.ci - pr says that a function is too long or complex, try breaking up that function into multiple short functions that each do one thing. See also these tips on writing clean scientific software.
  • If the CI / Documentation check ends with a cryptic error message, check out our documentation troubleshooting guide.
  • For a documentation preview, click on Details next to docs/readthedocs.org:plasmapy.

If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder.

Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples.

We thank you once again!

@github-actions github-actions bot added plasmapy.plasma Related to the plasmapy.plasma subpackage python Pull requests that update Python code labels Jul 8, 2024
@codecov
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.21%. Comparing base (c34e206) to head (8f5b786).
⚠️ Report is 598 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2749      +/-   ##
==========================================
+ Coverage   94.42%   95.21%   +0.78%     
==========================================
  Files         107      107              
  Lines        9496     9496              
  Branches     2189     2189              
==========================================
+ Hits         8967     9042      +75     
+ Misses        342      273      -69     
+ Partials      187      181       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 doing this! I made a few fairly minor suggestions, and it looks almost ready to merge. The last remaining steps will be to:

  • Add a changelog entry at changelog/2749.doc.rst
  • Add yourself as an author in CITATION.cff. (There are instructions if you click on "Details" next to the corresponding check below.)

Thank you once again! 🌱

--------
>>> import astropy.units as u
>>> B0 = 1 * u.T
>>> alpha = 1 * 1 / u.m
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
>>> alpha = 1 * 1 / u.m
>>> alpha = 1 / u.m

Comment on lines +68 to +70
>>> r = [5, 3, 9] * u.m
>>> fr.B_theta(r)
<Quantity [-0.32757914, 0.33905896, 0.24531179] T>
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
>>> r = [5, 3, 9] * u.m
>>> fr.B_theta(r)
<Quantity [-0.32757914, 0.33905896, 0.24531179] T>
>>> r = [3, 5, 9] * u.m
>>> fr.B_theta(r)
<Quantity [0.33905896, -0.32757914, 0.24531179] T>

...since I suspect that for most applications the radii will be monotonically increasing or decreasing.

--------
>>> import astropy.units as u
>>> B0 = 1 * u.T
>>> alpha = 1 * 1 / u.m
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
>>> alpha = 1 * 1 / u.m
>>> alpha = 1 / u.m

Comment on lines +101 to +103
>>> r = [1, 5, 4] * u.m
>>> fr.B_z(r)
<Quantity [0.76519769, -0.17759677, -0.39714981] T>
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
>>> r = [1, 5, 4] * u.m
>>> fr.B_z(r)
<Quantity [0.76519769, -0.17759677, -0.39714981] T>
>>> r = [1, 4, 5] * u.m
>>> fr.B_z(r)
<Quantity [0.76519769, -0.39714981, -0.17759677] T>

--------
>>> import astropy.units as u
>>> B0 = 1 * u.T
>>> alpha = 1 * 1 / u.m
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
>>> alpha = 1 * 1 / u.m
>>> alpha = 1 / u.m

@namurphy namurphy removed the request for review from ejohnson-96 July 10, 2024 23:53
@namurphy namurphy added this to the v2024.10.0 milestone Jul 22, 2024
@namurphy namurphy removed this from the v2024.10.0 milestone Oct 29, 2024
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

This pull request will be closed in 60 days due to a year of inactivity unless the stale label or comment is removed.

@github-actions github-actions bot added the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label Nov 1, 2025
@namurphy namurphy removed the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plasmapy.plasma Related to the plasmapy.plasma subpackage python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add examples to docstring of ForceFreeFluxRope

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy