-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Line{Circle|Sky}Region #129
Conversation
""" | ||
|
||
def __init__(self, start, end, meta=None, visual=None): | ||
self.start = PixCoord._validate(start, name='start', expected='scalar') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a better way to instantiate PixCoord
s? It seems weird to use private methods (_validate
) here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small things, but ready to merge.
""" | ||
def __init__(self, start, end, meta=None, visual=None): | ||
# TODO: test that start, end is a 0D SkyCoord | ||
self.start = start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we merge without having the is_coord
check? Or just add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and also the PixCoord._validate issue) are unrelated to this PR - the same issue is present for all regions at the moment. So I would go for merging this and fixing the input validation separately.
@property | ||
def area(self): | ||
"""Region area (`~astropy.units.Quantity`)""" | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0*u.sr
?
regions/shapes/line.py
Outdated
raise NotImplementedError() | ||
|
||
else: | ||
raise ValueError('mode should be one of local/affine/full') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is mode irrelevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not! All modes do the same.
@keflavich , others : Currently the line |
One step towards fixing #45