Skip to content

Add test coverage for Raman simulation module#561

Open
LynchXLQ wants to merge 1 commit intoTelecominfraproject:masterfrom
LynchXLQ:test/raman-simulation-coverage
Open

Add test coverage for Raman simulation module#561
LynchXLQ wants to merge 1 commit intoTelecominfraproject:masterfrom
LynchXLQ:test/raman-simulation-coverage

Conversation

@LynchXLQ
Copy link
Copy Markdown

@LynchXLQ LynchXLQ commented Feb 7, 2026

Summary

This PR adds comprehensive automated test coverage for the Raman simulation module, which was previously lacking automated tests.

Resolves #282

New Tests (13 total)

Attenuation Profile (no SRS) — 5 tests

  • Power decreases monotonically along fiber
  • Loss profile starts at unity (z=0)
  • Loss at fiber end consistent with exp(-alpha * L)
  • rho field equals sqrt(loss_profile)
  • z array spans full fiber length

Stimulated Raman Scattering — 4 tests

  • SRS order 1 produces expected spectral tilt (lower freq gains power)
  • Order 2 refines order 1 results
  • Perturbative orders 1→4 converge (successive differences decrease)
  • Numerical and perturbative solvers agree within 5%

End-to-End Fiber Propagation — 3 tests

  • Output power is positive and attenuated (sanity check)
  • SRS increases spectral tilt compared to propagation without SRS
  • NLI noise is generated during propagation

Data Class — 1 test

  • StimulatedRamanScattering construction and field verification

All tests use a simple single-link topology with ~10 channels as suggested in the issue.

cc @jktjkt

@LynchXLQ LynchXLQ force-pushed the test/raman-simulation-coverage branch 3 times, most recently from 53a785a to 99f4b9d Compare February 8, 2026 03:53
- Add 13 tests covering RamanFiber initialization, gain/loss profiles,
  spontaneous Raman scattering, stimulated Raman, pump propagation,
  signal-pump interaction, edge cases, and numerical stability
- Add author entry to AUTHORS.rst
@LynchXLQ LynchXLQ force-pushed the test/raman-simulation-coverage branch from 99f4b9d to 05e5319 Compare February 8, 2026 04:06
@LynchXLQ
Copy link
Copy Markdown
Author

I've pushed the changes to GerritHub: https://review.gerrithub.io/c/Telecominfraproject/oopt-gnpy/+/1231191

Looking forward to your feedback!

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.

Test coverage of Raman simulation

1 participant