Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/epsilon.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* MorphRGrid can now handle grids denser than 1e-08. Previously, it was possible that multiple points on the intersection range could be excluded.

**Security:**

* <news item>
5 changes: 2 additions & 3 deletions src/diffpy/morph/morphs/morphrgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

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

# roundoff tolerance for selecting bounds on arrays.
epsilon = 1e-8


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