Vectorial EM field model
Very nice work! Does your library support a vectorial representation of the EM field accounting for polarization, and if not can it be simply extended?
Hi SebastienTs.
Yes, it is possible to extend it for the vectorial representation easily, and also to integrate everything with transfer matrix methods. I already have an implementation, but I still need to integrate it with the diffractsim interface. Is there any specific problem you are targeting?
Hi Rafael,
Nothing specific, I'm teaching microcopy in University and was exploring the library. I like its simplicity! Let me know if you can when you have it integrated, ideally with one of your nice blog article or some documentation!
Great work! Best, S.
On Fri, Sep 19, 2025, 5:39 PM Rafael de la Fuente @.***> wrote:
rafael-fuente left a comment (rafael-fuente/diffractsim#69) https://github.com/rafael-fuente/diffractsim/issues/69#issuecomment-3312682242
Hi SebastienTs.
Yes, it is possible to extend it for the vectorial representation easily, and also to integrate everything with transfer matrix methods. I already have an implementation, but I still need to integrate it with the diffractsim interface. Is there any specific problem you are targeting?
— Reply to this email directly, view it on GitHub https://github.com/rafael-fuente/diffractsim/issues/69#issuecomment-3312682242, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTFCUEEBW5ER3SI4CN2OH33TQPSDAVCNFSM6AAAAACG3HJ3ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMJSGY4DEMRUGI . You are receiving this because you authored the thread.Message ID: @.***>
is this bounty active now ?
if we can't work on this. then why put a bounty ?
Hi, I was testing a function in Algora and accidentally set it as a bounty.
I have an integrated vectorial implementation of diffractsim, integrated with TMM. What I wanted to do with Algora was to raise some funding to deploy the implementation to the repository by the interested person setting the bounty
Hi, I was testing a function in Algora and accidentally set it as a bounty.
I have an integrated vectorial implementation of diffractsim, integrated with TMM. What I wanted to do with Algora was to raise some funding to deploy the implementation to the repository by the interested person setting the bounty
Hey @rafael-fuente
In that case, you need to send the sponsor of the bounty instructions on how to setup a bounty in your repository. This page in the Algora docs: https://algora.io/docs/bounties/in-other-projects should be a good start.
Once the sponsor links their GitHub account with Algora, they can the fund the bounty amount and invite you to complete the bounty using 2 Algora commands.
The first command is to make an /attempt #<issue-number> against the bounty. When you open a PR that satisfies the bounty, all you then need to do is include the command /claim #<issue-number> anywhere in the body of your PR description. The sponsor can then award you the bounty once the PR is merged.
"Hi @rafael-fuente, I'm interested in working on this feature to calculate light intensity at specific coordinates. I'm already looking into the codebase to implement an efficient way to extract this data. I'll update you soon with a proposal."
I have analyzed the request and I can implement a get_intensity_at(x, y) method. This function will map physical coordinates to the intensity matrix indices and return the precise value. Should I proceed with a Pull Request including this feature and perhaps a small example?"
Don't bother the website is a scam
On Tue, Jan 20, 2026, 8:25 PM naderarhomam-Solvers @.***> wrote:
naderarhomam-Solvers left a comment (rafael-fuente/diffractsim#69) https://github.com/rafael-fuente/diffractsim/issues/69#issuecomment-3775827895
I have analyzed the request and I can implement a get_intensity_at(x, y) method. This function will map physical coordinates to the intensity matrix indices and return the precise value. Should I proceed with a Pull Request including this feature and perhaps a small example?"
— Reply to this email directly, view it on GitHub https://github.com/rafael-fuente/diffractsim/issues/69#issuecomment-3775827895, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCIXKRXQU56VQ3O5FVX3MOD4H3PQBAVCNFSM6AAAAACG3HJ3ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTONZVHAZDOOBZGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
/attempt #69
Generated at: 2026-02-11 14:20 UTC Target: Vectorial EM field model URL: https://github.com/rafael-fuente/diffractsim/issues/69 Estimated bounty: $1,000 Internal score: 84.0
Draft proposal: I understand the task is to extend diffractsim with a vectorial electromagnetic field model that fully accounts for polarization, moving beyond the current scalar approximation.
My delivery plan:
- Analyze the existing codebase to design a vector field class supporting polarization states (Jones vectors, circular/linear).
- Implement the model, integrate it with core diffraction algorithms, and provide validation examples and documentation.
To align perfectly with your vision, could you please specify the acceptance criteria—such as required polarization bases, performance benchmarks, and any integration constraints?
Generated at: 2026-02-11 14:20 UTC Target: Vectorial EM field model URL: https://github.com/rafael-fuente/diffractsim/issues/69 Estimated bounty: $1,000 Internal score: 84.0
Draft proposal: Application for Bounty: Vectorial EM field model
I understand the task is to extend diffractsim with a vectorial representation of electromagnetic fields that accounts for polarization, moving beyond scalar approximations.
My delivery plan:
- Implement vector field classes that manage polarization states and propagate through existing diffraction kernels.
- Integrate the model into the simulation pipeline and provide validation examples demonstrating polarization‑aware results.
Please provide acceptance criteria—e.g., required accuracy benchmarks, polarization fidelity metrics, and any specific test cases.
@rafael-fuente your bounty is still active on Algora. You mind removing it from there?
Hi @rafael-fuente — I’d like to take this bounty.
I can implement the vectorial EM field model with:
- core physics implementation + numerical validation
- benchmarks and regression tests
- docs/examples for reproducibility
I can post a technical plan first and then deliver in iterative PRs. If approved, I can start right away.
Thanks for the suggestion! I explored what would be needed and opened a concrete implementation path.
Current status
At the moment diffractsim propagates a scalar complex field E(x,y) (single component), so polarization is not represented.
Minimal extension path (backward-compatible)
A practical first step is to support a Jones-vector field in the transverse plane:
- represent field as
(Ex, Ey)on the same grid - keep existing scalar APIs unchanged
- add optional vector-aware propagation and plotting helpers
Concretely:
- Add a new class (e.g.
VectorMonochromaticField) holdingEx,Ey - Reuse current scalar propagators by applying them component-wise (for isotropic media and scalar DOEs)
- Add polarization utilities (linear/circular/elliptic sources, Stokes maps)
- Optionally add vector DOEs (Jones matrices) in a second phase
This would already cover many polarization use-cases while preserving current workflows.
Notes on full vector diffraction
A full EM treatment (including longitudinal components and high-NA vector focusing) is possible, but is significantly more involved and should likely be a separate phase.
If maintainers are interested, I can prepare an initial PR with the backward-compatible Jones-vector foundation (phase 1).
/attempt #69