From caf1b82abb3a8b3993fa2e7e1898cad74e9e5394 Mon Sep 17 00:00:00 2001 From: PetePupalaikis Date: Tue, 27 Apr 2021 10:29:21 -0400 Subject: [PATCH] fixed resampling bug in calibrations - was not resampling the measurements which led to failure when improper numbers of points entered in measurement files. --- SignalIntegrity/Lib/Measurement/Calibration/Calibration.py | 4 +++- SignalIntegrity/Lib/Parsers/CalibrationParser.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SignalIntegrity/Lib/Measurement/Calibration/Calibration.py b/SignalIntegrity/Lib/Measurement/Calibration/Calibration.py index 43acc34e1..adbc6ff46 100644 --- a/SignalIntegrity/Lib/Measurement/Calibration/Calibration.py +++ b/SignalIntegrity/Lib/Measurement/Calibration/Calibration.py @@ -254,7 +254,9 @@ def _CalculateUnknownThruErrorTerms(self,measurements): else Sestsp[max(n-1,0)],driven,other) Sest=SParameters(self.f,Sestsp) Sest=Sest.LimitImpulseResponseLength(meas.limit) - Sest.WriteToFile('RecoveredThru') + # pragma: silent exclude + #Sest.WriteToFile('RecoveredThru') + # pragma: include measurements[other][driven].append( ThruCalibrationMeasurement( meas.Smeasured.FrequencyResponse(1,1), diff --git a/SignalIntegrity/Lib/Parsers/CalibrationParser.py b/SignalIntegrity/Lib/Parsers/CalibrationParser.py index 57187cd33..2858cd2f1 100644 --- a/SignalIntegrity/Lib/Parsers/CalibrationParser.py +++ b/SignalIntegrity/Lib/Parsers/CalibrationParser.py @@ -65,7 +65,7 @@ def _ProcessCalibrationLine(self,line): if tokenValue == 'None': self.m_spc[tokenValue] = None elif not tokenValue in self.m_spc: - self.m_spc[tokenValue] = SParameterFile(tokenValue) + self.m_spc[tokenValue] = SParameterFile(tokenValue).Resample(self.m_f) measDict['std']=self.m_spc[tokenValue] elif tokenName == 'pn': measDict['driven']=port=int(tokenValue)