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

Proton Radiography Module #895

Merged
merged 200 commits into from
Feb 22, 2021

Conversation

pheuer
Copy link
Member

@pheuer pheuer commented Sep 8, 2020

Proton radiography is an increasingly common diagnostic technique used to interrogate the electric and magnetic fields inside high energy density plasmas. The plasma of interest is positioned between a bright pulsed source of protons and a detector plane. Electric and magnetic fields in the plasma deflect the protons, producing patterns on the detector. Since this represents a non-linear and line-integrated measurement of the fields, the interpretation of these "proton radiographs" is a complicated business. The goal of this module is to provide tools for planning these experiments and analyzing their results.

Eventually, this new module should contain two type different types of functions:

  1. Functions that construct synthetic proton radiographs given simulated or calculated fields, either for planning an experiment or analyzing the results of one.

  2. Functions that use assumptions about symmetries etc. to "invert" experimental radiographs to recover the magnitudes of
    the fields that created them.

The SyntheticProtonRadiograph object contained in this initial PR belongs to the first category. The SyntheticProtonRadiograph object is initialized with a plasmapy.plasma.grid.AbstractGrid subclass containing electric and magnetic fields, as well as the locations of the proton source and detector. A particle tracing algorithm is then run to determine the trajectories of the protons, and the resulting positions in the detector plane are used to create a synthetic radiograph (2D histogram).

This function can currently support field data on either regular or non-uniform (although the former is much faster) to support complicated simulation meshes. Time steps are computed in an adaptive manner based on both the fields currently experienced by the particles and the grid resolution. Source and detector positions can be specified anywhere in Cartesian, cylindrical, or spherical coordinates systems to re-create geometric effects.

The example fields generated within the function for testing and demonstration are intentionally simple, but this technique can re-create complicated structures, such as this off-axis radiograph of a cylindrical, radial electric field:

SimPrad

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@pheuer pheuer added the plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage label Sep 8, 2020
@pheuer pheuer self-assigned this Sep 8, 2020
@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

Merging #895 (a4e1433) into master (6f163e0) will increase coverage by 0.40%.
The diff coverage is 99.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #895      +/-   ##
==========================================
+ Coverage   96.62%   97.02%   +0.40%     
==========================================
  Files          64       65       +1     
  Lines        6249     6559     +310     
==========================================
+ Hits         6038     6364     +326     
+ Misses        211      195      -16     
Impacted Files Coverage Δ
plasmapy/diagnostics/proton_radiography.py 99.65% <99.65%> (ø)
plasmapy/plasma/grids.py 98.32% <100.00%> (+3.65%) ⬆️
plasmapy/particles/ionization_state_collection.py 91.10% <0.00%> (-0.12%) ⬇️
plasmapy/utils/decorators/checks.py 100.00% <0.00%> (ø)
plasmapy/particles/ionization_state.py 93.52% <0.00%> (+0.15%) ⬆️
plasmapy/particles/particle_class.py 98.71% <0.00%> (+0.24%) ⬆️

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 6f163e0...a4e1433. Read the comment docs.

pheuer and others added 16 commits February 22, 2021 09:40
Copy link
Member

@StanczakDominik StanczakDominik left a comment

Choose a reason for hiding this comment

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

LGTM! Something got messed up with unicode in the notebook, which is weird; but we can merge it with these two fixes :)

docs/notebooks/proton_radiography_particle_tracing.ipynb Outdated Show resolved Hide resolved
docs/notebooks/proton_radiography_particle_tracing.ipynb Outdated Show resolved Hide resolved
@StanczakDominik
Copy link
Member

This feature is large enough that hey, might warrant 0.6 in a few weeks' time (I'm swamped until then)!

@pheuer pheuer mentioned this pull request Feb 22, 2021
@pheuer
Copy link
Member Author

pheuer commented Feb 22, 2021

@StanczakDominik YAY! clinks virtual champagne Thanks for all your help!

Getting this functionality onto the release branch sounds great to me: I have lots of people I'm planning on sharing it with, but it's definitely easier for people to install from release!

@StanczakDominik
Copy link
Member

StanczakDominik commented Feb 22, 2021

Sure, but unless you wanna try handling the release... hope you can wait!

I should be able to get it out between March 6 and 14. I'll raise the topic at the telecon tomorrow.

@pheuer
Copy link
Member Author

pheuer commented Feb 22, 2021

Hahaha no no no sometime in March sounds good to me!

@namurphy namurphy mentioned this pull request Feb 23, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants