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

Example notebook for proton radiography custom source capability #1054

Merged
merged 87 commits into from
Mar 12, 2021

Conversation

pheuer
Copy link
Member

@pheuer pheuer commented Mar 3, 2021

This PR adds an example notebook demonstrating how users can use SyntheticProtonRadiograph to create synthetic proton radiographs using custom lists of initialized particles, and how this capability allows the creation of synthetic radiographs with arbitrary source fluence profiles.

(Previously load_particles wasn't used in any of the example notebooks)

This PR also now includes minor changes to the other PRad notebooks too (mostly adding links).

TODO:

  • Figure out the reason the links aren't working
  • Once links are working, add them to the other two PRad notebooks too
  • Create explicit tests for rot_a_to_b() in mathematics. Requires making a test_mathematics.py file.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pheuer pheuer self-assigned this Mar 3, 2021
@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.90%. Comparing base (6e2221b) to head (731bc92).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1054      +/-   ##
==========================================
+ Coverage   96.89%   96.90%   +0.01%     
==========================================
  Files          70       70              
  Lines        6920     6925       +5     
==========================================
+ Hits         6705     6711       +6     
+ Misses        215      214       -1     

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

@pheuer pheuer requested a review from rocco8773 March 5, 2021 01:40
@pheuer
Copy link
Member Author

pheuer commented Mar 5, 2021

@rocco8773 Can you take a look at this one?

@pheuer pheuer marked this pull request as ready for review March 5, 2021 01:41
@rocco8773
Copy link
Member

@pheuer Yes, I'll take a look over it. Give me today/tomorrow to get to it. Thanks.

@rocco8773 rocco8773 self-assigned this Mar 5, 2021
@rocco8773 rocco8773 added plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage docs PlasmaPy Docs at http://docs.plasmapy.org labels Mar 5, 2021
Copy link
Member

@rocco8773 rocco8773 left a comment

Choose a reason for hiding this comment

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

@pheuer Here's a partial review of the notebook. The notebook looks to be in good condition, but there are a few things to address.

  • As you can see in my first cell comment, Sphinx's normal linking mechanisms don't work in notebooks. Instead we have to manually create links using markdown's syntax. Can you go through your notebook and add these links to documentation whenever you're referencing plasmapy's functionality or any external pkgs like numpy.
  • This notebook is long enough that it might warrant making a table of contents at the top of the notebook. If you feel you'd like to go this way, take a look at the Fit Function notebook and/or Floating Potential notebook.
  • Can you please optimize the plot sizes and font sizes? More so the font sizes. The font sizes are a little too small for readability in a web browser. For tips you can again refer to the Fit Function and Floating Potential notebooks.
  • [optional] When plotting the particle distributions, it might be easier for users to interpret the plots if they are normalized to the total number of particles in the distribution N / No / dSigma. If you go this route, No should be included somewhere in the plot.

@pheuer
Copy link
Member Author

pheuer commented Mar 12, 2021

@rocco8773 Great, thanks for the review. I think I've addressed all your comments

changelog/1054.doc.rst Outdated Show resolved Hide resolved
Copy link
Member

@rocco8773 rocco8773 left a comment

Choose a reason for hiding this comment

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

Thanks for sticking with this. Everything looks really good!

That last thing that's needed is a change log entry for rot_a_to_b, so create a 1054.feature.rst for this.

@pheuer
Copy link
Member Author

pheuer commented Mar 12, 2021

No problem - change log entry created!

Copy link
Member

@rocco8773 rocco8773 left a comment

Choose a reason for hiding this comment

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

All looks good. I'm going to wait for the checks to pass and then I'll merge. Thanks for the hard work!

@rocco8773 rocco8773 enabled auto-merge (squash) March 12, 2021 21:54
@rocco8773 rocco8773 merged commit bf36ae9 into PlasmaPy:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http://docs.plasmapy.org plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants