Skip to content

Commit

Permalink
update compound regions
Browse files Browse the repository at this point in the history
  • Loading branch information
joleroi committed May 12, 2016
1 parent 274cea0 commit ecb8a8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion regions/core/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def to_mask(self, mode='center'):
def to_sky(self, wcs, mode='local', tolerance=None):
raise NotImplementedError("")

def as_patch(self, **kwargs):
raise NotImplementedError("")

def __repr__(self):
return "({0} {1} {2})".format(self.region1, self.operator, self.region2)

Expand All @@ -41,9 +44,12 @@ def contains(self, skycoord):
def to_pixel(self, wcs, mode='local', tolerance=None):
raise NotImplementedError("")

def as_patch(self, ax, **kwargs):
raise NotImplementedError("")

def __repr__(self):
return "({0}\n{1}\n{2})".format(self.region1, self.operator, self.region2)

@property
def area(self):
raise NotImplementedError("")
raise NotImplementedError("")
3 changes: 2 additions & 1 deletion regions/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def __xor__(self, other):
return self.symmetric_difference(other)

def __contains__(self, coord):
# Todo: only works for scalar cases, test for this?
if not coord.isscalar:
raise ValueError('{} must be scalar'.format(coord))
return self.contains(coord)


Expand Down

0 comments on commit ecb8a8b

Please sign in to comment.