Browse files

Fixed timing check to allow tiny but non-zero values

  • Loading branch information...
1 parent 655c149 commit ee7e62051de72b3856a03b6bf0f954a90c94cce3 @scottransom committed Jan 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/python/prepfold.py
View
3 lib/python/prepfold.py
@@ -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
@@ -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

0 comments on commit ee7e620

Please sign in to comment.