Mcs 13jun
Image.mask_region(), Image.mask_ellipse(), Image.subimage(), Cube.mask_region(), Cube.mask_ellipse(), and Cube.subcube() now all use the bounding_box() function to select which pixels belong to a specified region. This ensures that they operate compatibly.
A new function called Cube.mask_polygon() has been added, which is the Cube equivalent of Image.mask_polygon().
Both Image.mask_region() and Cube.mask_region() now include support for rotated rectangular regions.
Rewrote Cube.truncate(), which now takes advantage of the new Cube.mask_polygon() function, instead of implementing its own masking code.
Modified and documented some of the unit-test functions associated with the Cube functions that were mentioned above.
Added documentation and comments to various functions in cube.py.