def __new__(cls, mask_2d, pixel_scales=None, sub_size=1, origin=(0.0, 0.0),
    *args, **kwargs):
    """ A mask, which is applied to data to extract a set of unmasked image pixels (i.e. mask entry         is *False* or 0) which are then fitted in an analysis.

        The mask retains the pixel scale of the array and has a centre and origin.

        Parameters
        ----------
        mask_2d: ndarray
            An array of bools representing the mask.
        pixel_scales: (float, float)
            The arc-second to pixel conversion factor of each pixel.
        origin : (float, float)
            The (y,x) arc-second origin of the mask's coordinate system.
        centre : (float, float)
            The (y,x) arc-second centre of the mask provided it is a standard geometric shape (e.g. a circle).
        """
    mask_2d = mask_2d.astype('bool')
    obj = mask_2d.view(cls)
    obj.sub_size = sub_size
    obj.pixel_scales = pixel_scales
    obj.origin = origin
    return obj
