single freq noise_freq
@@ -1248,9 +1248,17 @@ class Network(object):
if not self.noisy:
raise ValueError('network does not have noise')
+ if self.noise_freq.f.size > 1 :
noise_real = interp1d(self.noise_freq.f, self.noise.real, axis=0, kind=Network.noise_interp_kind)
noise_imag = interp1d(self.noise_freq.f, self.noise.imag, axis=0, kind=Network.noise_interp_kind)
return noise_real(self.frequency.f) + 1.0j * noise_imag(self.frequency.f)
+ else :
+ noise_real = self.noise.real
+ noise_imag = self.noise.imag
+ return noise_real + 1.0j * noise_imag
+
+
+
@property
def f_noise(self):
