-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
The masking functionality currently has several issues:
Functional problems
- In
circandrectmodes, if more than one set of coordinates is supplied, only the first one is used. On one hand, this is fine, because only one point is needed to define these shape. However, maybe it would be a good idea to at least let the user know that the other coordinates are ignored. - Contrarily, in
polymode, if only one or two sets of coordinates are supplied, aPolygonSkyRegionis still created. This does not make sense, because at least three points are needed to define a polygon. An error should be raised and the region skipped if less than three points are supplied in this mode. - Also in
polymode, thesizesub-dictionary is completely ignored (as it's not necessary for defining a polygon), however, not supplying this will raise an error. This should be the other way around: print a warning if a size is specified, informing the user that it is ignored; but not supplying a size should not cause any problems. -
RectangleSkyRegioncan take an additional argumentangle, which allows to specify the rotation of the rectangle with respect to the coordinate system. This currently cannot be used with the masking API.
Future considerations to investigate
- Numpy has a built-in module
numpy.mato deal with array masking. Maybe it would make sense to use this instead of manually implementing masking.
Documentation / UX issues
- How to masking #12
- Similar to other config files: provide a solid way to distribute an example / template for using this functionality.
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right