Skip to content

Commit

Permalink
change the way ellipses set their param limits, to help LogRadius/Rex
Browse files Browse the repository at this point in the history
  • Loading branch information
dstndstn committed Oct 28, 2016
1 parent 62b2cc1 commit 252fb6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion test/test_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ def test_gal(self):
self.assertTrue(np.all(np.logical_or(np.abs(diff) < 1e-9,
diff < 0)))


# Assert that wrap-around exists for PixelizedPsf model

diff = np.diff(m21[:imx+1])
Expand Down
18 changes: 6 additions & 12 deletions tractor/ellipses.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ def getNamedParams():
def __init__(self, *args, **kwargs):
super(EllipseE, self).__init__(*args, **kwargs)
self.stepsizes = [0.01]*3
self.lowers[0] = 0.
self.lowers[1] = -1.
self.uppers[1] = 1.
self.lowers[2] = -1.
self.uppers[2] = 1.

# Parameter limits
self.lowers = [0., -1., -1.]
self.uppers = [None, 1., 1.]

@staticmethod
def fromEllipseESoft(esoft, maxe=0.999999):
re = esoft.re
Expand Down Expand Up @@ -183,12 +181,8 @@ def __init__(self, *args, **kwargs):
super(EllipseESoft, self).__init__(*args, **kwargs)
# Have to override this because the superclass has parameter limits,
# but this class does not.
self.lowers[0] = None
self.lowers[1] = None
self.lowers[2] = None
self.uppers[0] = None
self.uppers[1] = None
self.uppers[2] = None
self.lowers = [None, None, None]
self.uppers = [None, None, None]

@staticmethod
def fromEllipseE(ell, maxe=0.999999):
Expand Down

0 comments on commit 252fb6f

Please sign in to comment.