Skip to content

Commit 46ee6f9

Browse files
committed
Fix filtering logic
1 parent 5d1e5ad commit 46ee6f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simphony/simulation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def _monitor(self, power: np.ndarray) -> np.ndarray:
571571
"""
572572
# amplify and filter the signal
573573
signal = power * self.monitor_conversion_gain
574-
if len(signal) > 1:
574+
if len(signal[0][0]) > 1:
575575
signal = self._monitor_filter(signal)
576576

577577
# for every frequency and power, add the electrical noise on top
@@ -605,7 +605,7 @@ def _rf(self, p1: np.ndarray, p2: np.ndarray) -> np.ndarray:
605605
The second signal (in Watts)."""
606606
# amplify and filter the difference
607607
signal = (p1 - p2) * self.rf_conversion_gain
608-
if len(signal) > 1:
608+
if len(signal[0][0]) > 1:
609609
signal = self._rf_filter(signal)
610610

611611
# for every frequency and power, add the electrical noise on top

0 commit comments

Comments
 (0)