Merge "Raise error when type_def for Edfa is not recognized"

This commit is contained in:
Jan Kundrát
2021-01-01 19:52:45 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -687,8 +687,6 @@ class Edfa(_Node):
nf_avg = pin_ch - polyval(nf_model.nf_coef, pin_ch) + 58
elif type_def == 'advanced_model':
nf_avg = polyval(nf_fit_coeff, -dg)
else:
assert False, "Unrecognized amplifier type, this should have been checked by the JSON loader"
return nf_avg + pad, pad
def _calc_nf(self, avg=False):

View File

@@ -210,6 +210,8 @@ class Amp(_JsonThing):
except KeyError:
raise EquipmentConfigError(f'missing preamp/booster variety input for amplifier: {type_variety} in equipment config')
dual_stage_def = Model_dual_stage(preamp_variety, booster_variety)
else:
raise EquipmentConfigError(f'Edfa type_def {type_def} does not exist')
json_data = load_json(config)