You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a validation example/test that reproduces the circular-polarization Bragg stopband of a structurally chiral (helicoidal) medium and compares it against the expected behavior from the literature. Optionally add a graded-index antireflection-coating check against an analytic result. This is the physics-validation capstone of the graded/chiral feature set.
Scope: this issue validates the chiral physics — stopband center/depth and handedness selection. Correctness of the linear→circular basis transform itself is owned by issue #84 (circular-polarization basis output); this issue consumes that output rather than re-testing it.
Context
Depends on the helicoidal/chiral preset constructor issue (which builds a chiral medium on top of the graded-layer piecewise-uniform expansion) and on issue #84 ("Add circular-polarization basis output to transfer()"). The defining signature of a chiral film is that it strongly reflects one circular polarization (matching the structure's handedness) within a wavelength band centered near λ ≈ n̄ · pitch (with n̄ an average in-plane index) and bandwidth set by the in-plane birefringence — while transmitting the opposite handedness. Demonstrating this requires reporting reflectance/transmittance in a circular basis, which is what issue #84 adds; today transfer returns only linear p/s (and cross) terms in TransferResult (src/general_TMM.jl:99-108, calculate_tr at src/general_TMM.jl:460-491).
The project already ships worked examples in docs/src/guide/ (quickstart.md, tutorial.md, validation.md) and validation tests under test/ — this issue follows that pattern.
Why
Unit tests in the preceding split issues confirm the graded/chiral machinery runs and that degenerate cases reduce correctly, but they do not confirm the headline physics. A literature-grounded circular-Bragg check is what proves the implementation is physically correct and gives users a citable, reproducible reference. The graded-index AR-coating check provides a second, analytic cross-validation for non-chiral graded media.
Proposed approach
Add a chiral / cholesteric validation example under docs/src/guide/ (e.g. a new section in validation.md or a dedicated page) that constructs a helicoidal medium with the preset, sweeps wavelength at normal incidence, and plots/tabulates reflectance for both circular polarizations using the circular-basis output from issue Add circular-polarization basis output to transfer() #84.
Assert the expected qualitative and quantitative signatures: near-unity reflection of the co-handed circular polarization across the Bragg band, near-unity transmission of the cross-handed polarization, the band centered at the predicted λ_Bragg and with the predicted bandwidth from the chosen indices and pitch. Use a sufficiently large nslices (per the convergence-control issue) so the result is converged.
Add a corresponding regression test in test/ (new test/graded_validation.jl wired into runtests.jl) checking the stopband center, depth, and that handedness selection flips when the preset's handedness flips.
(Optional) Add a graded-index AR-coating example: a smooth index ramp between two media should suppress reflectance over a broad band; compare against the analytic expectation for a known profile (e.g. a quintic/Klopfenstein-style taper) and assert the reflectance is below a stated bound.
For non-absorbing test cases, exercise the existing validate=true energy-conservation check (transfer(...; validate=true), _validate_physics at src/general_TMM.jl:606-667) to confirm R + T ≈ 1.
Acceptance criteria
A chiral/helicoidal example reproduces the circular-polarization Bragg stopband: co-handed reflectance is high across the band, cross-handed reflectance is low, band center matches the literature prediction within a stated tolerance.
Flipping the preset handedness flips which circular polarization is reflected.
A regression test in test/ encodes the stopband center/depth and handedness selection.
(If included) the graded-index AR example reproduces the analytic broadband reflectance suppression within a stated bound.
Caveats / risks
Re-derive the Bragg-band center and bandwidth from Mackay & Lakhtakia and validate; do not transcribe expected numbers or formulas from any third-party implementation. Cite the exact relations used (e.g. λ_Bragg ≈ n̄·pitch, bandwidth from the in-plane index contrast) so the assertions are auditable.
Quantitative agreement depends on adequate slicing — ensure nslices is converged (per the convergence-control issue) before tightening tolerances, otherwise a failing assertion may reflect under-resolution rather than a bug.
Keep CI lean: validation sweeps can be wavelength-heavy. Use a modest grid sufficient to resolve the band, consistent with the project's Ubuntu-only CI policy.
References
Mackay & Lakhtakia, The Transfer-Matrix Method in Electromagnetics and Optics (2020), DOI 10.1007/978-3-031-02022-3 — circular-Bragg phenomenon of structurally chiral mediums.
Summary
Add a validation example/test that reproduces the circular-polarization Bragg stopband of a structurally chiral (helicoidal) medium and compares it against the expected behavior from the literature. Optionally add a graded-index antireflection-coating check against an analytic result. This is the physics-validation capstone of the graded/chiral feature set.
Scope: this issue validates the chiral physics — stopband center/depth and handedness selection. Correctness of the linear→circular basis transform itself is owned by issue #84 (circular-polarization basis output); this issue consumes that output rather than re-testing it.
Context
Depends on the helicoidal/chiral preset constructor issue (which builds a chiral medium on top of the graded-layer piecewise-uniform expansion) and on issue #84 ("Add circular-polarization basis output to transfer()"). The defining signature of a chiral film is that it strongly reflects one circular polarization (matching the structure's handedness) within a wavelength band centered near
λ ≈ n̄ · pitch(withn̄an average in-plane index) and bandwidth set by the in-plane birefringence — while transmitting the opposite handedness. Demonstrating this requires reporting reflectance/transmittance in a circular basis, which is what issue #84 adds; todaytransferreturns only linear p/s (and cross) terms inTransferResult(src/general_TMM.jl:99-108,calculate_tratsrc/general_TMM.jl:460-491).The project already ships worked examples in
docs/src/guide/(quickstart.md,tutorial.md,validation.md) and validation tests undertest/— this issue follows that pattern.Why
Unit tests in the preceding split issues confirm the graded/chiral machinery runs and that degenerate cases reduce correctly, but they do not confirm the headline physics. A literature-grounded circular-Bragg check is what proves the implementation is physically correct and gives users a citable, reproducible reference. The graded-index AR-coating check provides a second, analytic cross-validation for non-chiral graded media.
Proposed approach
docs/src/guide/(e.g. a new section invalidation.mdor a dedicated page) that constructs a helicoidal medium with the preset, sweeps wavelength at normal incidence, and plots/tabulates reflectance for both circular polarizations using the circular-basis output from issue Add circular-polarization basis output to transfer() #84.λ_Braggand with the predicted bandwidth from the chosen indices and pitch. Use a sufficiently largenslices(per the convergence-control issue) so the result is converged.test/(newtest/graded_validation.jlwired intoruntests.jl) checking the stopband center, depth, and that handedness selection flips when the preset's handedness flips.validate=trueenergy-conservation check (transfer(...; validate=true),_validate_physicsatsrc/general_TMM.jl:606-667) to confirmR + T ≈ 1.Acceptance criteria
test/encodes the stopband center/depth and handedness selection.Caveats / risks
λ_Bragg ≈ n̄·pitch, bandwidth from the in-plane index contrast) so the assertions are auditable.nslicesis converged (per the convergence-control issue) before tightening tolerances, otherwise a failing assertion may reflect under-resolution rather than a bug.TransferResult, but that is harder to interpret.References
docs/src/guide/validation.md,test/, and thevalidate=truepath (src/general_TMM.jl:606-667).