space align __str__ output
@@ -85,7 +85,7 @@ class Roadm(Node):
def __str__(self):
return '\n'.join([f'{type(self).__name__} {self.uid}',
- f' loss: {self.loss:.2f}'])
+ f' loss (dB): {self.loss:.2f}'])
def propagate(self, *carriers):
attenuation = db2lin(self.loss)
@@ -118,8 +118,8 @@ class Fiber(Node):
def __str__(self):
return '\n'.join([f'{type(self).__name__} {self.uid}',
- f' length: {self.length:.2f}',
- f' loss: {self.loss:.2f}'])
+ f' length (m): {self.length:.2f}',
+ f' loss (dB): {self.loss:.2f}'])
def lin_attenuation(self):
attenuation = self.length * self.loss_coef
