From fe6943dd42abb262f953089938715d2f0d75a52d Mon Sep 17 00:00:00 2001 From: PetePupalaikis Date: Wed, 1 Sep 2021 16:19:46 -0400 Subject: [PATCH] Updates during help system generation --- .../App/Examples/HDMICable/PRBSTest.si | 10 +++------ SignalIntegrity/App/EyeDiagram.py | 10 ++++----- .../App/EyeDiagramPropertiesDialog.py | 22 ++++++------------- SignalIntegrity/App/PreferencesFile.py | 8 +++---- 4 files changed, 18 insertions(+), 32 deletions(-) diff --git a/SignalIntegrity/App/Examples/HDMICable/PRBSTest.si b/SignalIntegrity/App/Examples/HDMICable/PRBSTest.si index 800d717e5..5485cb674 100644 --- a/SignalIntegrity/App/Examples/HDMICable/PRBSTest.si +++ b/SignalIntegrity/App/Examples/HDMICable/PRBSTest.si @@ -542,16 +542,12 @@ 200 True - 2.0 4e-12 - 2.0 4e-12 False - 0 - 100 - -6 - 20 + 0 + -12 100000.0 0.03 @@ -560,7 +556,7 @@ 200 20.0 75.0 - 200.0 + 150.0 3 1.0 diff --git a/SignalIntegrity/App/EyeDiagram.py b/SignalIntegrity/App/EyeDiagram.py index 9f36eec5b..7480a0281 100644 --- a/SignalIntegrity/App/EyeDiagram.py +++ b/SignalIntegrity/App/EyeDiagram.py @@ -353,7 +353,7 @@ def CalculateEyeDiagram(self,callback=None): WH=int(math.floor(math.floor(2.*10.*(deterministicJitter+jitterSigma)/deltaT/2.)*2.)+1.) WV=int(math.floor(math.floor(2.*10.*noiseSigma/deltaY/2.)*2.)+1.) - maxPixels = int(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.MaxWindowPixels']) + maxPixels = int(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.MaxKernelPixels']) if WH*WV > maxPixels: if not self.headless: self.parent.statusbar.set('***** warning - limiting window to : '+str(maxPixels)+' *****') WH=int(math.floor((WH*math.sqrt(float(maxPixels)/float(WH*WV))-1)/2))*2+1 @@ -378,11 +378,11 @@ def CalculateEyeDiagram(self,callback=None): if SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.LogIntensity']: total=sum([sum([bitmap[r][c] for c in range(C)]) for r in range(R)]) bitmap=[[bitmap[r][c]/total*C for c in range(C)] for r in range(R)] - minBER=max(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MinBERExponent'],-20) - maxBER=max(minBER,SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MaxBERExponent']) + minBER=max(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MinExponent'],-20) + maxBER=max(minBER,SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MaxExponent']) minValue=pow(10.,minBER-1) - minSat=SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MinBERSaturationPercent']/100. - maxSat=SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MaxBERSaturationPercent']/100. + minSat=0 + maxSat=1. m=(maxSat-minSat)/(maxBER-minBER) b=minSat-minBER*m diff --git a/SignalIntegrity/App/EyeDiagramPropertiesDialog.py b/SignalIntegrity/App/EyeDiagramPropertiesDialog.py index 84ed52c88..bb427d418 100644 --- a/SignalIntegrity/App/EyeDiagramPropertiesDialog.py +++ b/SignalIntegrity/App/EyeDiagramPropertiesDialog.py @@ -54,15 +54,13 @@ def __init__(self,parent,project): self.JitterSeconds=CalculationPropertySI(self.JitterNoiseFrame,'Random Jitter (s)',self.onUpdateJitterSeconds,None,project,'EyeDiagram.JitterNoise.JitterS','s') self.JitterDeterministicPkS=CalculationPropertySI(self.JitterNoiseFrame,'Deterministic Jitter (s, pk)',self.onUpdateDeterministicJitterSeconds,None,project,'EyeDiagram.JitterNoise.JitterDeterministicPkS','s') self.Noise=CalculationPropertySI(self.JitterNoiseFrame,'Noise',self.onUpdateNoise,None,project,'EyeDiagram.JitterNoise.Noise','V') - self.MaxWindowWidthHeightPixels=CalculationPropertySI(self.JitterNoiseFrame,'Max Window Dimensions',self.onUpdateMaxWindowWidthHeightPixels,None,project,'EyeDiagram.JitterNoise.MaxWindowPixels','pixels') + self.MaxWindowWidthHeightPixels=CalculationPropertySI(self.JitterNoiseFrame,'Max Kernel Pixels',self.onUpdateMaxWindowWidthHeightPixels,None,project,'EyeDiagram.JitterNoise.MaxKernelPixels','pixels') self.Invert=CalculationPropertyTrueFalseButton(self.EyeFrame,'Invert Plot',self.onUpdateInvert,None,project,'EyeDiagram.Invert') self.LogIntensityFrame=tk.Frame(self.JitterNoiseFrame) self.LogIntensityFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.LogIntensity=CalculationPropertyTrueFalseButton(self.LogIntensityFrame,'Log Intensity',self.onUpdateLogIntensity,None,project,'EyeDiagram.JitterNoise.LogIntensity.LogIntensity') - self.MinBERExponent=CalculationProperty(self.LogIntensityFrame,'Min BER exponent',self.onUpdateMinBERExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MinBERExponent') - self.MinBERSaturation=CalculationProperty(self.LogIntensityFrame,'Min BER saturation',self.onUpdateMinBERSaturation,None,project,'EyeDiagram.JitterNoise.LogIntensity.MinBERSaturationPercent') - self.MaxBERExponent=CalculationProperty(self.LogIntensityFrame,'Max BER exponent',self.onUpdateMaxBERExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MaxBERExponent') - self.MaxBERSaturation=CalculationProperty(self.LogIntensityFrame,'Max BER saturation',self.onUpdateMaxBERSaturation,None,project,'EyeDiagram.JitterNoise.LogIntensity.MaxBERSaturationPercent') + self.MinExponent=CalculationProperty(self.LogIntensityFrame,'Min Exponent',self.onUpdateMinExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MinExponent') + self.MaxExponent=CalculationProperty(self.LogIntensityFrame,'Max Exponent',self.onUpdateMaxExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MaxExponent') self.SaveToPreferencesFrame=tk.Frame(self.propertyListFrame,relief=tk.RIDGE, borderwidth=5) self.SaveToPreferencesFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.SaveToPreferencesButton = tk.Button(self.SaveToPreferencesFrame,text='Save Properties to Global Preferences',command=self.onSaveToPreferences,width=CalculationProperty.entryWidth) @@ -125,10 +123,8 @@ def UpdateStrings(self,calculate=True): self.LogIntensity.Show(jitterNoiseMode) self.LogIntensityFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) logIntensity=self.project['EyeDiagram.JitterNoise.LogIntensity.LogIntensity'] - self.MinBERExponent.Show(jitterNoiseMode and logIntensity) - self.MinBERSaturation.Show(jitterNoiseMode and logIntensity) - self.MaxBERExponent.Show(jitterNoiseMode and logIntensity) - self.MaxBERSaturation.Show(jitterNoiseMode and logIntensity) + self.MinExponent.Show(jitterNoiseMode and logIntensity) + self.MaxExponent.Show(jitterNoiseMode and logIntensity) def onUpdateJitterSeconds(self,_): self.UpdateStrings() def onUpdateDeterministicJitterSeconds(self,_): @@ -137,13 +133,9 @@ def onUpdateNoise(self,_): self.UpdateStrings() def onUpdateMaxWindowWidthHeightPixels(self,_): self.UpdateStrings() - def onUpdateMinBERExponent(self,_): + def onUpdateMinExponent(self,_): self.UpdateStrings() - def onUpdateMinBERSaturation(self,_): - self.UpdateStrings() - def onUpdateMaxBERExponent(self,_): - self.UpdateStrings() - def onUpdateMaxBERSaturation(self,_): + def onUpdateMaxExponent(self,_): self.UpdateStrings() def onUpdateInvert(self,_): self.UpdateStrings() diff --git a/SignalIntegrity/App/PreferencesFile.py b/SignalIntegrity/App/PreferencesFile.py index 6efb49ade..6c6e3686f 100644 --- a/SignalIntegrity/App/PreferencesFile.py +++ b/SignalIntegrity/App/PreferencesFile.py @@ -33,10 +33,8 @@ class EyeLogIntensityConfiguration(XMLConfiguration): def __init__(self): super().__init__('LogIntensity') self.Add(XMLPropertyDefaultBool('LogIntensity',False)) - self.Add(XMLPropertyDefaultFloat('MinBERExponent',-12)) - self.Add(XMLPropertyDefaultFloat('MinBERSaturationPercent',20)) - self.Add(XMLPropertyDefaultFloat('MaxBERExponent',-6)) - self.Add(XMLPropertyDefaultFloat('MaxBERSaturationPercent',100)) + self.Add(XMLPropertyDefaultFloat('MinExponent',-12)) + self.Add(XMLPropertyDefaultFloat('MaxExponent',0)) class EyeJitterNoiseConfiguration(XMLConfiguration): def __init__(self): @@ -44,7 +42,7 @@ def __init__(self): self.Add(XMLPropertyDefaultFloat('JitterS',0)) self.Add(XMLPropertyDefaultFloat('JitterDeterministicPkS',0)) self.Add(XMLPropertyDefaultFloat('Noise',0.0)) - self.Add(XMLPropertyDefaultInt('MaxWindowPixels',100000)) + self.Add(XMLPropertyDefaultInt('MaxKernelPixels',100000)) self.SubDir(EyeLogIntensityConfiguration()) class EyeConfiguration(XMLConfiguration):