Skip to content

Scale Rayleigh power in the final partial cell - #118

Merged
ameoli merged 1 commit into
mainfrom
fix-rayleigh-partial-cell
Nov 6, 2026
Merged

ameoli merged 1 commit into
mainfrom
fix-rayleigh-partial-cell

Conversation

@ameoli

@ameoli ameoli commented Nov 6, 2026

Copy link
Copy Markdown
Owner

A fiber shorter than one spatial cell received the same Rayleigh power as a full cell. The final cell now scales its complex amplitude by the square root of the occupied fraction, so a fiber of length dz/100 has 1% of the full-cell power. Scaling happens before discrete reflectors are added and applies to every core and to segment-specific Rayleigh coefficients.

Updated the theory guide and added regression tests for short fibers, a partially filled final cell, multiple cores, segment overrides and an end-face reflector. All 200 selected fiber, reflector-path, sampling and validation tests passed locally; one HDF5 test needed a rerun outside the sandbox because pytest could not create its temporary directory.

@ameoli
ameoli merged commit 1a4aea5 into main Nov 6, 2026
6 checks passed
@ameoli
ameoli deleted the fix-rayleigh-partial-cell branch November 6, 2026 21:44
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