Diffractive detector & Multi frequency phasor #19
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.
This pull request introduces significant updates to the
fdtdx
package, specifically enhancing the functionality of the diffractive and phasor detectors. The changes include the addition of a newDiffractiveDetector
class and modifications to thePhasorDetector
class to support multiple frequencies. Also, the "wavelength" parameter is changed to "frequency" due to wavelength being variable in mediums.New Features:
DiffractiveDetector
class for computing Fourier transforms of fields at specific frequencies and diffraction orders. This detector can measure diffraction in either positive or negative direction along the propagation axis.Enhancements to Existing Features:
frequencies
attribute. This allows thePhasorDetector
to compute phasor representations at specified frequencies, enabling more detailed frequency-domain analysis.wavelength
attribute and thefrequency
property, replacing them with precomputed angular frequencies for vectorized calculations. This simplifies the phasor computation process._shape_dtype_single_time_step
method to account for the newfrequencies
attribute, ensuring the shape includes the number of frequencies.update
method to handle multiple frequencies, performing vectorized calculations for phasors at each frequency. This includes changes to the computation of phase angles and the application of complex exponentials. [1] [2] [3]