Skip to content

Commit

Permalink
getTbin raises error if no period is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlam committed Jan 25, 2021
1 parent 01e0aaa commit dc39780
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pypulse/singlepulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,9 @@ def getTbin(self):
""" Return the time unit of one phase bin """
if self.getPeriod() is not None:
return self.getPeriod()/self.getNbins()
else:
raise ValueError("Cannot get bin time; period is not set")


def plot(self, show=True):
"""
Expand Down

0 comments on commit dc39780

Please sign in to comment.