Frequency-dependent rotation to constant in-plane k beam #2272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another fix to how we get the beam fields. Now,
points
has been extended to have shape[3, Npoints, Nfreqs]
, and in the case of constant in-plane k wave the points are rotated with the actual theta at every frequency. This made things cleaner and actually allowed me to clean up all of thenp.outer
and[:, None]
type of handling we had in the scalar field functions, as everything just works with regular broadcasting. And of course the main reason for this was to fix the plane wave injection with backward direction, which indeed is now fixed.One last thing that I don't understand about fixed angle is why we don't rotate the points, but then we rotate the fields? That's not super intuitive to me and ideally I would like to generalize things so that the points are always rotated (propagation direction is always z). I actually can understand why we don't rotate the points - in some sense the "actual angle" is zero (and we just modify the kz). But why do we rotate the fields by
angle_theta
?