mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-30 01:32:21 +00:00
Small change on Raman pump parameters
Getter and setter removed from the class PumpParams. The propagation direction is cast to lower case string within the PumpParams constructor. Change-Id: Ice28affe8bcffbf8adcebb5cb096be8100081511
This commit is contained in:
committed by
Jan Kundrát
parent
c469a8d9ba
commit
9f9f4c78fc
@@ -28,21 +28,9 @@ class Parameters:
|
||||
|
||||
class PumpParams(Parameters):
|
||||
def __init__(self, power, frequency, propagation_direction):
|
||||
self._power = power
|
||||
self._frequency = frequency
|
||||
self._propagation_direction = propagation_direction
|
||||
|
||||
@property
|
||||
def power(self):
|
||||
return self._power
|
||||
|
||||
@property
|
||||
def frequency(self):
|
||||
return self._frequency
|
||||
|
||||
@property
|
||||
def propagation_direction(self):
|
||||
return self._propagation_direction
|
||||
self.power = power
|
||||
self.frequency = frequency
|
||||
self.propagation_direction = propagation_direction.lower()
|
||||
|
||||
|
||||
class RamanParams(Parameters):
|
||||
|
||||
@@ -282,7 +282,7 @@ class RamanSolver:
|
||||
for pump in raman_pumps:
|
||||
pow_array = append(pow_array, pump.power)
|
||||
f_array = append(f_array, pump.frequency)
|
||||
direction = +1 if pump.propagation_direction.lower() == 'coprop' else -1
|
||||
direction = +1 if pump.propagation_direction == 'coprop' else -1
|
||||
propagation_direction = append(propagation_direction, direction)
|
||||
noise_bandwidth_array = append(noise_bandwidth_array, ref_bw)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user