Skip to content

Commit

Permalink
Merge branch 'changes' of ssh://github.com/TeledyneLeCroy/SignalInteg…
Browse files Browse the repository at this point in the history
…rity
  • Loading branch information
PetePupalaikis committed Nov 30, 2018
2 parents 8a7ba3e + e541154 commit eaf332d
Show file tree
Hide file tree
Showing 364 changed files with 169,362 additions and 3,642 deletions.
2 changes: 1 addition & 1 deletion Doc/SignalIntegrityLinux
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = SignalIntegrity
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.0.5
PROJECT_NUMBER = 1.1.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Doc/SignalIntegrityWindows
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = SignalIntegrity
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.0.5
PROJECT_NUMBER = 1.1.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
222 changes: 0 additions & 222 deletions SignalIntegrity/App/CalculationProperties.py

This file was deleted.

80 changes: 80 additions & 0 deletions SignalIntegrity/App/CalculationPropertiesDialog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
"""
CalculationPropertiesDialog.py
"""
# Copyright (c) 2018 Teledyne LeCroy, Inc.
# All rights reserved worldwide.
#
# This file is part of SignalIntegrity.
#
# SignalIntegrity is free software: You can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation, either
# version 3 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>

from SignalIntegrity.App.CalculationPropertiesProject import PropertiesDialog,CalculationPropertySI,CalculationProperty
from SignalIntegrity.App.ToSI import nextHigher12458
import SignalIntegrity.App.Project

class CalculationPropertiesDialog(PropertiesDialog):
def __init__(self,parent):
PropertiesDialog.__init__(self,parent,SignalIntegrity.App.Project['CalculationProperties'],parent,'Calculation Properties')
self.endFrequencyFrame=CalculationPropertySI(self.propertyListFrame,'End Frequency',self.onendFrequencyEntered,None,self.project,'EndFrequency','Hz')
self.frequencyPointsFrame=CalculationProperty(self.propertyListFrame,'Frequency Points',self.onfrequencyPointsEntered,None,self.project,'FrequencyPoints')
self.frequencyResolutionFrame=CalculationPropertySI(self.propertyListFrame,'Frequency Resolution',self.onfrequencyResolutionEntered,None,self.project,'FrequencyResolution','Hz')
self.userSampleRateFrame=CalculationPropertySI(self.propertyListFrame,'User Sample Rate',self.onuserSampleRateEntered,None,self.project,'UserSampleRate','S/s')
self.baseSampleRateFrame=CalculationPropertySI(self.propertyListFrame,'Base Sample Rate',self.onbaseSampleRateEntered,None,self.project,'BaseSampleRate','S/s')
self.timePointsFrame=CalculationProperty(self.propertyListFrame,'Time Points',self.ontimePointsEntered,None,self.project,'TimePoints')
self.impulseResponseLengthFrame=CalculationPropertySI(self.propertyListFrame,'Impulse Response Length',self.onimpulseLengthEntered,None,self.project,'ImpulseResponseLength','s')
self.Finish()

def onendFrequencyEntered(self,event):
self.project['EndFrequency']=nextHigher12458(self.project['EndFrequency'])
self.project['FrequencyPoints']=int(nextHigher12458(self.project['EndFrequency']/self.project['FrequencyResolution']))
self.project['FrequencyPoints']=max(1,self.project['FrequencyPoints'])
self.UpdateStrings()

def onfrequencyPointsEntered(self,event):
self.project['FrequencyPoints']=max(1,self.project['FrequencyPoints'])
self.UpdateStrings()

def onfrequencyResolutionEntered(self,event):
self.project['FrequencyPoints']=int(nextHigher12458(self.project['EndFrequency']/self.project['FrequencyResolution']))
self.project['FrequencyPoints']=max(1,self.project['FrequencyPoints'])
self.UpdateStrings()

def onuserSampleRateEntered(self,event):
self.project['UserSampleRate']=nextHigher12458(self.project['UserSampleRate'])
self.UpdateStrings()

def onbaseSampleRateEntered(self,event):
self.project['EndFrequency']=nextHigher12458(self.project['BaseSampleRate'])/2.
self.project['FrequencyPoints']=int(nextHigher12458(self.project['EndFrequency']/self.project['FrequencyResolution']))
self.project['FrequencyPoints']=max(1,self.project['FrequencyPoints'])
self.UpdateStrings()

def ontimePointsEntered(self,event):
self.project['FrequencyPoints']=int(nextHigher12458(self.project['TimePoints']/2))
self.project['FrequencyPoints']=max(1,self.project['FrequencyPoints'])
self.UpdateStrings()

def onimpulseLengthEntered(self,event):
self.project['TimePoints']=int(self.project['ImpulseResponseLength']*self.project['BaseSampleRate']+0.5)
self.project['FrequencyPoints']=int(nextHigher12458(self.project['TimePoints']/2))
self.project['FrequencyPoints']=max(1,self.project['FrequencyPoints'])
self.UpdateStrings()

def UpdateStrings(self):
self.project.CalculateOthersFromBaseInformation()
self.endFrequencyFrame.UpdateStrings()
self.frequencyPointsFrame.UpdateStrings()
self.frequencyResolutionFrame.UpdateStrings()
self.userSampleRateFrame.UpdateStrings()
self.baseSampleRateFrame.UpdateStrings()
self.timePointsFrame.UpdateStrings()
self.impulseResponseLengthFrame.UpdateStrings()
Loading

0 comments on commit eaf332d

Please sign in to comment.