Skip to content

Commit 2789ba1

Browse files
committed
BUG: Fix translate interface from Phantom and Feature to Geometry.
1 parent f4f13b5 commit 2789ba1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

xdesign/feature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def volume(self):
108108
"""Returns the volume of the Feature"""
109109
return self.geometry.volume
110110

111-
def translate(self, x, y):
111+
def translate(self, vector):
112112
"""Translates the geometry. Translating the property functions is not supported."""
113-
self.geometry.translate(x, y)
113+
self.geometry.translate(vector)
114114

115115
def rotate(self, theta, point=None, axis=None):
116116
"""Rotate the geometry around an axis that passes through the given point. Rotating property functions is not supported."""

xdesign/phantom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ def sprinkle(self, counts, radius, gap=0, region=None, mass_atten=1,
230230
return n_added
231231

232232
# GEOMETRIC TRANSFORMATIONS
233-
def translate(self, dx, dy):
233+
def translate(self, vector):
234234
"""Translate phantom."""
235235
for m in range(self.population):
236-
self.feature[m].translate(dx, dy)
236+
self.feature[m].translate(vector)
237237

238238
def rotate(self, theta, origin=Point([0.5, 0.5]), axis=None):
239239
"""

0 commit comments

Comments
 (0)