-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adds feature "plot current sheet" #143
base: main
Are you sure you want to change the base?
Conversation
pre-commit.ci autofix |
@wzq215 I do not have write access to your fork so I do not think I can request an autofix; but if you comment |
pre-commit.ci autofix |
We might also want to add some tests for |
Hi, I wrote a test (test current sheet) but fail to run any tests in the script... The error message is:
|
pre-commit.ci autofix |
1 similar comment
pre-commit.ci autofix |
@wzq215 To run tests locally you may need to download some or all of the extra dependencies in setup.cfg:
|
I pushed an update that fixes the main CI failure and tweaks the image generation flags needed for pytest. You will have to either merge in upstream/main or press the update branch button at the bottom of the pull request (I assume anyone with write access can see it). |
for more information, see https://pre-commit.ci
But fail to run any tests in the folder. message: "_jb_pytest_runner.py: error: unrecognized arguments: --doctest-rst"
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
7e22da5
to
7ade888
Compare
7ade888
to
6f3e509
Compare
@@ -509,6 +510,31 @@ def color_func(field_line): | |||
|
|||
self._add_mesh_to_dict(block_name="field_lines", mesh=spline) | |||
|
|||
def plot_current_sheet(self, pfss_out, **kwargs): | |||
""" | |||
Plot current sheet "(Br=0)". |
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.
Is this the definition of a current sheet in a PFSS model?
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.
Hi @wzq215
We have recently forked pfsspy and made sunkit-magex so I am looking over related things again. Is this PR something you are interested in coming back to, or would you like me to adopt it?
**kwargs : | ||
Keyword arguments are passed to `pyvista.Plotter.add_mesh`. | ||
""" | ||
sc_vect = pfss_out.grid.sc |
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.
Is the way we are loading the output here the same as in #72?
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.
Not sure but it should be looked at. I would hope we can that code instead.
If we can expand the code in 72 to work for all frames and return all the surfaces, we can then change this to plot a surface based on user input.
PR Description
Adds feature 'plot_current_sheet.' (#53)
Extracts the current sheet (isosurface where Br=0) from pfsspy output by pyvista.
current_sheet.py is an example script that plots the current sheet, gong map, and field lines together.