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:
AndreaDAmico
2021-07-13 12:50:29 +02:00
committed by Jan Kundrát
parent c469a8d9ba
commit 9f9f4c78fc
2 changed files with 4 additions and 16 deletions

View File

@@ -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):

View File

@@ -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)