def masked_outside(region, header, x_size, y_size, expand_factor=1.0):
    '\n    This function ...\n    :param region:\n    :param header:\n    :param x_size:\n    :param y_size:\n    :param expand_factor:\n    :return:\n    '
    region = regions.expand(region, factor=expand_factor)
    mask = np.logical_not(regions.create_mask(region, header, x_size, y_size))
    return mask
This function ...
:param region:
:param header:
:param x_size:
:param y_size:
:param expand_factor:
:return:
def masked_outside(region, header, x_size, y_size, expand_factor=1.0):
    '\n    This function ...\n    :param region:\n    :param header:\n    :param x_size:\n    :param y_size:\n    :param expand_factor:\n    :return:\n    '
    region = regions.expand(region, factor=expand_factor)
    mask = np.logical_not(regions.create_mask(region, header, x_size, y_size))
    return mask