-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
WIP/ENH: wavefront class #68
Conversation
pmd_beamphysics/wavefront.py
Outdated
# _z_min, z_max = self.ranges[sum_axis] | ||
# dz = self.grid_spacing[sum_axis] | ||
# dat = np.sum(dat, axis=sum_axis) * dz / (2.0 * z_max) | ||
img = ax.imshow(np.mean(dat, axis=sum_axis), cmap=cmap, extent=extent) |
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.
sum_axis
implies a sum, but here np.mean
is called.
For power, it should probably be a sum. Others are questionable.
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.
Chris **hates** them with a passion
Co-authored-by: Christopher Mayes <[email protected]>
This is going to resurface in a very different form than it is here. I'll open a new PR when we are ready for that effort to move forward. |
Add a Wavefront class
Entirely based on code from @balticfish and many discussions with @ChristopherMayes
Remaining work
property
for.rspace
and.kspace
as their calculation can take a long time, and IPython auto-completion can automatically evaluate these when you don't want it to (double-check where this was coming from in Jedi; is it still an issue in 2024?)fs
->s
xyz
is desirable. Is there any benefit toz,x,y
? Benchmark some operations to verify?t
->m
(z=c*t
)propagate
todrift
plot("x", "z")
plot_spectrum()
(this is from G.S.; Chris will supply it)Ex
with openpmd, for example)