Skip to content

Commit

Permalink
minor improvement, transformations now reflected in update to SBProfi…
Browse files Browse the repository at this point in the history
…le.__class__

(#195)
  • Loading branch information
barnabytprowe committed Aug 10, 2012
1 parent 293f3e9 commit ee87f59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions galsim/base.py
Expand Up @@ -224,7 +224,8 @@ class for details).
if not isinstance(ellipse, galsim.Ellipse):
raise TypeError("Argument to applyTransformation must be a galsim.Ellipse!")
self.SBProfile.applyTransformation(ellipse._ellipse)
self._add_transformation(ellipse)
self.SBProfile.__class__ = galsim.SBTransform # update for accuracy
self._add_transformation(ellipse) # store transform to ordered list

def applyDilation(self, scale):
"""@brief Apply a dilation of the linear size by the given scale.
Expand Down Expand Up @@ -297,7 +298,8 @@ def applyRotation(self, theta):
if not isinstance(theta, galsim.Angle):
raise TypeError("Input theta should be an Angle")
self.SBProfile.applyRotation(theta)
self._add_transformation(theta)
self.SBProfile.__class__ = galsim.SBTransform # update for accuracy
self._add_transformation(theta) # store transform to ordered list

def applyShift(self, dx, dy):
"""@brief Apply a (dx, dy) shift to this object.
Expand Down

0 comments on commit ee87f59

Please sign in to comment.