-
Notifications
You must be signed in to change notification settings - Fork 308
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParticleTracker mechanics refactoring (again!) #1096
base: main
Are you sure you want to change the base?
ParticleTracker mechanics refactoring (again!) #1096
Conversation
Check out this pull request on聽 See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report
@@ Coverage Diff @@
## master #1096 +/- ##
==========================================
- Coverage 96.91% 96.13% -0.78%
==========================================
Files 70 71 +1
Lines 6928 7084 +156
==========================================
+ Hits 6714 6810 +96
- Misses 214 274 +60
Continue to review full report at Codecov.
|
Sounds great, looking forward to this! Looking for any easy optimization opportunities in A few comments/ideas on top of your list above:
# Create arrays of E and B as required by push algorithm
E = np.array([Ex.to(u.V / u.m).value, Ey.to(u.V / u.m).value, Ez.to(u.V / u.m).value] )
E = np.moveaxis(E, 0, -1)
B = np.array([Bx.to(u.T).value, By.to(u.T).value, Bz.to(u.T).value])
B = np.moveaxis(B, 0, -1)
In addition, here's some longer-term brainstorming.
<sarcasm> I don't think anyone other than cryptocurrency miners are able to get GPUs anymore. Maybe it would be better to optimize around some more ubiquitous architecture. Maybe smart speakers.</sarcasm> |
Just don't look at the code yet! :D |
@StanczakDominik what's the status of this PR in light of #2245? |
Tackles, but does not close, #936 just a little.
It's officially Q2 of 2021 and I already feel the roadmap backlog pressure (thank you once again, @rocco8773 馃槈 ), so I'm starting out with the particle tracker refactoring again. I brought over changes from #675 and made them at least a little more self contained. At this point I have a bad reimplementation of a terrible first implementation.
What I intend to do with this from now on:
diagnostics/proton_radiography.py
(some great ideas and an actual use case! that really helps flesh out a code 馃槅 )run_lite
or some such, that provides a simpler interface without all the trajectory saving.I also recently had the idea of using google/jax with this. I'm not sure how much of an issue (as usual...) fields calculations would be with that; but I'd like to at least try. Automatically running this on GPUs would be pretty sweet. But that's definitely a future PR.