Skip to content

Commit

Permalink
Tighten tolerance to pass tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
brittonsmith committed Mar 7, 2018
1 parent 5950483 commit 4f09460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt/utilities/cosmology.py
Expand Up @@ -428,7 +428,7 @@ def path_length_function(self, z):
def path_length(self, z_i, z_f):
return trapzint(self.path_length_function, z_i, z_f)

def z_from_t(self, t, tolerance=1e-6):
def z_from_t(self, t, tolerance=1e-12):
"""
Compute the redshift from time after the big bang.
Expand Down Expand Up @@ -548,6 +548,6 @@ def quan(self):
registry = self.unit_registry)
return self._quan

def trapzint(f, a, b, bins=10000):
def trapzint(f, a, b, bins=1000):
zbins = np.logspace(np.log10(a + 1), np.log10(b + 1), bins) - 1
return np.trapz(f(zbins[:-1]), x=zbins[:-1], dx=np.diff(zbins))

0 comments on commit 4f09460

Please sign in to comment.