Make PixelAperture.area an abstract method and a lazyproperty#241
Make PixelAperture.area an abstract method and a lazyproperty#241larrybradley wants to merge 4 commits intoastropy:masterfrom larrybradley:aperture-area
Conversation
There was a problem hiding this comment.
Can you make this an intersphinx link like we do for all other functions / classes from Astropy?
`~astropy.utils.lazyproperty`
I see this has moved form misc.py to decorators.py ... it's now here:
http://astropy.readthedocs.org/en/latest/api/astropy.utils.decorators.lazyproperty.html?highlight=lazyproperty
But this intersphinx-link should work for the old or new version, no?
|
I looked up what >>> a = photutils.CircularAperture((1,2), 3)
>>> a.area()
28.274333882308138
>>> a.r = 3.0
>>> a.area()
5541.769440932395With this change, users would get incorrect results if they access @larrybradley Maybe it's simpler to re-compute |
Note that placing
@lazypropertyon the@abc.abstractmethoddoesn't require it to be a lazyproperty in the subclasses. I couldn't find a way to to that, but@abc.abstractmethodwill at least require anareamethod in any pixel Aperture subclasses.This PR incorporates @cdeil's commit in #223 to make
area()and abstract method.