Skip to content

Commit

Permalink
Fixed timing check to allow tiny but non-zero values
Browse files Browse the repository at this point in the history
  • Loading branch information
scottransom committed Jan 5, 2012
1 parent 655c149 commit ee7e620
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/python/prepfold.py
Expand Up @@ -272,6 +272,7 @@ def freq_offsets(self, p=None, pd=None, pdd=None):
# Get frequency and frequency derivative offsets
f_diff = bestf - foldf
fd_diff = bestfd - foldfd
print bestfd, foldfd
# bestpdd=0.0 only if there was no searching over pdd
if bestpdd != 0.0:
fdd_diff = bestfdd - foldfdd
Expand All @@ -293,7 +294,7 @@ def use_for_timing(self):
with it.
"""
# If any of the offsets are non-zero, then prepfold searched
if any(self.freq_offsets()):
if max(Num.fabs(Num.asarray(self.freq_offsets()))) > 2e-16:
return False
else:
return True
Expand Down

0 comments on commit ee7e620

Please sign in to comment.