Skip to content

Commit

Permalink
Merge pull request #204 from mhuser/master
Browse files Browse the repository at this point in the history
Fix network.plot_s_db_time() issue
  • Loading branch information
arsenovic committed Mar 8, 2018
2 parents 7f25c48 + b6cce34 commit b2c37d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion skrf/frequency.py
Expand Up @@ -518,7 +518,14 @@ def t(self):
t_period = 1/f_step
'''
return linspace(-.5/self.step , .5/self.step, self.npoints)
n = 2 * (self.npoints - 1)
if n % 2 == 0:
t = npy.flipud(npy.linspace(.5 / self.step, -.5 / self.step, n, endpoint=False))
else:
t = npy.flipud(npy.linspace(.5 / self.step, -.5 / self.step, n + 1, endpoint=False))
t = t[:-1]
#return linspace(-.5/self.step , .5/self.step, self.npoints)
return t

@property
def t_ns(self):
Expand Down
2 changes: 1 addition & 1 deletion skrf/plotting.py
Expand Up @@ -1245,7 +1245,7 @@ def plot_reciprocity2(self, db=False, *args, **kwargs):


def plot_s_db_time(self,*args,**kwargs):
return self.windowed().plot_s_time_db(*args,**kwargs)
return self.windowed(center_to_dc=True).plot_s_time_db(*args,**kwargs)


# plotting
Expand Down

0 comments on commit b2c37d5

Please sign in to comment.