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

Diffractive detector & Multi frequency phasor #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

txdai
Copy link
Contributor

@txdai txdai commented Feb 20, 2025

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 new DiffractiveDetector class and modifications to the PhasorDetector class to support multiple frequencies. Also, the "wavelength" parameter is changed to "frequency" due to wavelength being variable in mediums.

New Features:

  • Diffractive Detector:
    • Introduced a new 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:

  • Phasor Detector:
    • Added support for analyzing multiple frequencies by introducing a frequencies attribute. This allows the PhasorDetector to compute phasor representations at specified frequencies, enabling more detailed frequency-domain analysis.
    • Removed the wavelength attribute and the frequency property, replacing them with precomputed angular frequencies for vectorized calculations. This simplifies the phasor computation process.
    • Updated the _shape_dtype_single_time_step method to account for the new frequencies attribute, ensuring the shape includes the number of frequencies.
    • Modified the 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]

This detector functions as a monitor for the diffraction orders for the nearfield, treating periodic devices as a 2D grating. As wavelength is not well defined and can be varying, I modified to use frequency as the defining parameter. In addition, phasor now supports multiple frequencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant