-
Notifications
You must be signed in to change notification settings - Fork 2
Draft: Attempt on waveplates and polarizing splitters #27
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #27 +/- ##
==========================================
+ Coverage 71.57% 72.16% +0.59%
==========================================
Files 57 59 +2
Lines 2881 2968 +87
==========================================
+ Hits 2062 2142 +80
- Misses 819 826 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…er formalism implementation
|
@StackEnjoyer Please have a look at the recent changes. I have thought about the API and was not happy anymore with the structure introduced in #25 Therefore the last commit introduced the following changes:
Note: While in my test cases you can use the wave plates and splitter fine for splitting beams based on polarization, the issue remains that we cannot properly track the electric field strength through components with n != 1.0 and so normalizing output against input power leads to violation of energy conservation 😲. |
This is a general issue with the "1D"- As long as all components are non-imaging, some form of "power conservation" should apply however. Is this true for your testcases? |
|
Some todo's for myself
|
|
"Energy" seems to be maintained for the PCBS testcase, minus the losses via the Fresnel coefficients at the air-glass-air interfaces. |
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.
I now had time to review these changes in detail. The waveplate features seem logical. However, there are some major issue regarding the newly introduced beamsplitters. I have primarily review the RectangularPolarizingPlateBeamsplitter and PolarizingCubeBeamsplitter.
PolarizingBeamSplitter
I think the pi phase jump must be considered when splitting the beams. This is not relevant for the Ray implementation of the splitter, but important here.
RectangularPolarizingPlateBeamsplitter
This type uses the API of the non-polarizing plate splitter but there are some issues with this approach. The PBS API bypasses coating-substrate refraction by directly calculating refraction. This is fine for non-polarized rays, however, for the E0 field vector an entire Yun-calculus step is missed, including Fresnel losses. Critically, this leads to "Ray dir. and E0 must be orthogonal." for n > 1.
PolarizingCubeBeamsplitter
I would expect this type to work out of the box with the cube splitter interface, since it is programmed more "elegantly". But I also got odd behavior here for n > 1. More investigation is necessary.
Conclusion
I think we need to consider the polarization calculus steps in more detail before we can ship theses components. The underlying thin polarizing splitter API seems fine so far and maybe we can unify the thin splitter interact3d methods by dispatching on Ray and PolarizedRay.
The robustness of the current PBS API can be improved, which should eliminate the errors that plague the RectangularPolarizingPlateBeamsplitter
Initial attempt to use the recent polarization improvements for waveplates and polarizing splitters.