BudgetOptics
Itemised coupling, splice and connector losses, and where they sit
9/9 passed in 1ms
| Test | What it does | Result |
|---|---|---|
test_born_in_span | Raman photons are born inside the span: Bob's 1.5 dB leaves their input-referred noise unchanged, while Alice's inflates it and costs key. | ✅ pass |
test_link_budget | res.budget totals the xi the rate used, one row per source, and answers .at() over the run's chain; a click family reports None. | ✅ pass |
test_link_chain | A Link folds the declared chain into T: 7.12 dB of link costs key against 5.0 dB of fibre, and res.budget names every optic. | ✅ pass |
test_loss_asymmetry | 1.5 dB at Alice's output and at Bob's input give one T and one detector-plane referral but different channel-output and span-born input referrals. | ✅ pass |
test_loss_multiplies | Every declared optic multiplies into T and the decibels add: two 0.25 dB connectors, six 0.02 dB splices and a 1.5 dB coupling take 5.0 dB to 7.12. | ✅ pass |
test_loss_optional | A budget declaring no optics keeps its T, rows and totals, prints no loss section, and collapses the channel-output and detector planes. | ✅ pass |
test_loss_pinned | Itemised losses on a pinned q.Channel are refused by run() and explain(). | ✅ pass |
test_loss_refuses | A duplicate descriptor at one site, a non-loss component, a negative loss and an unknown site are refused, and splices at two sites keep two lines. | ✅ pass |
test_raman_span | assemble()'s Raman row refers in by launch*span where every other row uses the total T, as a q.Link run does. | ✅ pass |