Skip to content

Commit 61e951a

Browse files
committed
add a total lumped loss in metrics
1 parent 37b4f50 commit 61e951a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gnpy/core/elements.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ def to_response_element_json(self):
474474
{ 'metric-type': 'Total Loss', 'metric-unit': 'dB', 'metric-value': self.loss},
475475
{ 'metric-type': 'Connection In', 'metric-unit': 'dB', 'metric-value': self.params.con_in},
476476
{ 'metric-type': 'Connection Out + EOL', 'metric-unit': 'dB', 'metric-value': self.params.con_out},
477+
{ 'metric-type': 'Lumped Losses', 'metric-unit': 'dB', 'metric-value': sum(array([lumped['loss'] for lumped in self.params.lumped_losses]))},
477478
{ 'metric-type': 'Power Out Per Channel', 'metric-unit': 'dBm', 'metric-value': self.pch_out_db}
478479
]
479480

0 commit comments

Comments
 (0)