Use it from Python
Every result on this site comes from ictdesigntools, an open-source (MIT) Python library.
pip install ictdesigntools
from ictdesigntools.optical.budget import LossInput, calculate_loss
r = calculate_loss(
LossInput(
1310,
length_km=12,
connector_count=4,
splice_count=6,
splitter="1x32",
budget_db=28,
)
)
round(r.nominal_db, 2) # 24.8
round(r.total_db, 2) # 27.8
r.passes # True
round(r.remaining_db, 2) # 0.2
[(i.label, round(i.loss_db, 2)) for i in r.items]
# [('Fibre', 4.8), ('Connectors (mated pairs)', 2.0), ('Splices', 0.6), ('Splitter 1:32', 17.4)]
Leave attenuation_db_per_km, connector_loss_db and splice_loss_db as None for the
planning values, or give your data sheets' figures. Input it can't use raises OpticalError,
whose message says what to fix.
Result fields
| Field | Example | Notes |
|---|---|---|
inp |
LossInput(…) |
The input, as given |
attenuation_db_per_km |
0.4 |
The coefficient used |
items |
(LossItem, …) |
Each with label, quantity, unit and loss_db |
nominal_db |
24.8 |
The optical path, without margin |
margin_db, total_db |
3.0, 27.8 |
total_db includes the margin |
budget_db, passes |
28, True |
passes is True when no budget is given |
remaining_db, used_pct |
0.2, 99.3 |
Negative remaining when over |
formula |
'A = α·L + …' |
The formula with the numbers |
Web API
A web API with the same inputs and results is planned as an invite-only beta. Until then, a result's link is the way to share one.