ENH: _crop_mask(...): new function to crop mask