Skip to content

Commit 266b6c6

Browse files
committed
Move epsilon
1 parent c4eba1e commit 266b6c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/diffpy/morph/morphs/morphrgrid.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, Morph
2121

22-
# roundoff tolerance for selecting bounds on arrays.
23-
epsilon = 1e-8
24-
2522

2623
class MorphRGrid(Morph):
2724
"""Resample to specified r-grid.
@@ -71,6 +68,8 @@ def morph(self, x_morph, y_morph, x_target, y_target):
7168
self.rmax = rmaxinc
7269
if self.rstep is None or self.rstep < rstepinc:
7370
self.rstep = rstepinc
71+
# roundoff tolerance for selecting bounds on arrays.
72+
epsilon = self.rstep / 2
7473
# Make sure that rmax is exclusive
7574
self.x_morph_out = numpy.arange(
7675
self.rmin, self.rmax - epsilon, self.rstep

0 commit comments

Comments
 (0)