@@ -43,7 +43,7 @@ def __init__(self, initial_ppm, amplitude_ppm, period_s):
4343 self .initial_ppm = initial_ppm
4444 self .amplitude_ppm = amplitude_ppm
4545 self .period_s = period_s
46- self .c0 = - 2. * scipy .constants .pi * amplitude_ppm * 1e-6
46+ self .c0 = - amplitude_ppm * 1e-6 * self . period_s / ( 2. * scipy .constants .pi )
4747 self .c1 = 2. * scipy .constants .pi / period_s
4848 self .c2 = initial_ppm * 1e-6
4949
@@ -54,13 +54,6 @@ def __str__(self, *args, **kwargs):
5454 return "TCXOSine: initial_ppm=%f amplitude_ppm=%f period_s=%f" % \
5555 (self .initial_ppm , self .amplitude_ppm , self .period_s )
5656
57- def __repr__ (self ):
58- '''
59- Provides string representation of the object
60- '''
61- return "TCXOSine(%f, %f, %f)" % \
62- (self .initial_ppm , self .amplitude_ppm , self .period_s )
63-
6457 def computeTcxoTime (self , fromSample , toSample , outputConfig ):
6558 '''
6659 Method generates time vector for the given sample index range depending on
@@ -86,13 +79,13 @@ def computeTcxoTime(self, fromSample, toSample, outputConfig):
8679 time0_s = fromSample / outputConfig .SAMPLE_RATE_HZ
8780 timeX_s = toSample / outputConfig .SAMPLE_RATE_HZ
8881
89- timeAll_s = numpy .linspace (time0_s * c1 ,
90- timeX_s * c1 ,
82+ timeAll_s = numpy .linspace (time0_s ,
83+ timeX_s ,
9184 toSample - fromSample ,
9285 endpoint = False ,
9386 dtype = numpy .float )
9487
95- result = numpy .cos (timeAll_s )
88+ result = numpy .cos (timeAll_s * c1 )
9689 result += - 1.
9790 result *= c0
9891 if c2 :
0 commit comments