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

Plot global plasma parameters vs time #617

Merged
merged 6 commits into from
Dec 23, 2024

Conversation

anteplu
Copy link
Collaborator

@anteplu anteplu commented Dec 18, 2024

This PR adds a few more plasma parameters to be calculated by the post-processing script and makes a new plot config to plot them vs time.
New parameters in post-processing:

  • volume average electron and main ion temperatures
  • volume average electron and main ion densities
  • q95 (+ a function to calculate q95)

It would be nice to have an option to remove a time slider for plots that show parameters only vs time.
Issue open: #616

Example of the plot output with torax/plotting/configs/global_params_plot_config.py:
Figure_2_gl_plt

@anteplu anteplu requested a review from jcitrin December 18, 2024 12:15
Copy link

google-cla bot commented Dec 18, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@jcitrin jcitrin left a comment

Choose a reason for hiding this comment

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

Looks good and great to have your first PR in :)

After the minor changes requested and signing the CLA, we'll bring this in.

figure_size_factor=5,
title_fontsize=12,
axes=(
# For chi, set histogram percentile for y-axis upper limit, due to
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment can be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done 4929853.

cols=3,
tick_fontsize=8,
axes_fontsize=8,
default_legend_fontsize=7,
Copy link
Collaborator

Choose a reason for hiding this comment

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

looking at the example plot pasted in the PR, it feels like either all fontsizes can be increased or the figure_size_factor reduced. Should experiment with that a bit more and find more optimal values for clear plots

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done 4929853.
The example plot was updated too.

@jcitrin
Copy link
Collaborator

jcitrin commented Dec 23, 2024

Looks great, thanks, will bring it in

@anteplu anteplu requested a review from jcitrin December 23, 2024 12:11
Copy link
Collaborator

@jcitrin jcitrin left a comment

Choose a reason for hiding this comment

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

A few minor changes have been done on our end before merging, noticed by the linter, and will be visible in the merge commit.

No action needed from you, but mentioning for visibility.

  1. The tuple typehint is not necessary for a single output in the q95 function. Could just be array_typing.ScalarFloat.
    2. There were a couple of stray comments removed, related to IPython.embed (sorry, that wasn't true, confusion on my end)
  2. Various formatting issues raised by the linter. I recommended installing and embedding pylint within your VScode to catch these ahead of time.

@copybara-service copybara-service bot merged commit 2af8b67 into main Dec 23, 2024
19 of 20 checks passed
@jcitrin
Copy link
Collaborator

jcitrin commented Dec 23, 2024

Merged with 2af8b67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants