display channel count information when running transmission_main

Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
This commit is contained in:
Jean-Luc Auge
2018-11-02 11:59:39 +01:00
committed by EstherLerouzic
parent a46c8c5398
commit ca97cba18b
2 changed files with 9 additions and 6 deletions

View File

@@ -524,8 +524,11 @@ class Edfa(Node):
elif self.params.type_def == 'fixed_gain':
nf_avg = self.params.nf_model.nf0
elif self.params.type_def == 'openroadm':
print('openroadm',self.pin_db - lin2db(self.nch) )
nf_avg = polyval(self.params.nf_model.nf_coef, self.pin_db - lin2db(self.nch))
pin_ch = self.pin_db - lin2db(self.nch)
# model NF = f(Pin)
nf_avg = polyval(self.params.nf_model.nf_coef, pin_ch)
# model OSNR = f(Pin)
#nf_avg = pin_ch - nf_avg + 58
else:
nf_avg = polyval(self.params.nf_fit_coeff, -dg)
if avg:

View File

@@ -198,10 +198,10 @@ def trx_mode_params(equipment, trx_type_variety='', trx_mode='', error_message=F
trx_params['frequency']['max'],
trx_params['spacing'])
trx_params['power'] = db2lin(default_si_data.power_dbm)*1e-3
# trx_params['nb_channel'] = automatic_nch(trx_params['frequency']['min'],
# trx_params['frequency']['max'],
# trx_params['spacing'])
# print('N channels = ', trx_params['nb_channel'])
nch = automatic_nch(trx_params['frequency']['min'],
trx_params['frequency']['max'],
trx_params['spacing'])
print(f'There are {nch} channels propagating')
return trx_params
def automatic_spacing(baud_rate):