@decorator_util.jit()<EOL>def unmasked_sparse_to_sparse_from_mask_and_pixel_centres(mask, unmasked_sparse_grid_pixel_centres,<EOL>total_sparse_pixels):
total_unmasked_sparse_pixels = unmasked_sparse_grid_pixel_centres.shape[<NUM_LIT:0>]<EOL>unmasked_sparse_to_sparse = np.zeros(total_unmasked_sparse_pixels)<EOL>pixel_index = <NUM_LIT:0><EOL>for unmasked_sparse_pixel_index in range(total_unmasked_sparse_pixels):<EOL><INDENT>y = unmasked_sparse_grid_pixel_centres[unmasked_sparse_pixel_index, <NUM_LIT:0>]<EOL>x = unmasked_sparse_grid_pixel_centres[unmasked_sparse_pixel_index, <NUM_LIT:1>]<EOL>unmasked_sparse_to_sparse[unmasked_sparse_pixel_index] = pixel_index<EOL>if not mask[y, x]:<EOL><INDENT>if pixel_index < total_sparse_pixels - <NUM_LIT:1>:<EOL><INDENT>pixel_index += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>return unmasked_sparse_to_sparse<EOL>
Determine the mapping between every pixelization-grid pixel and masked pixelization-grid pixel. This is
    performed by checking whether each pixelization-grid pixel is within the regular-masks, and mapping the indexes.

    Pixelization pixels are paired with the next masked pixel index. This may mean that a pixel is not paired with a
    pixel near it, if the next pixel is on the next row of the grid. This is not a problem, as it is only
    unmasked pixels that are referened when computing image_to_pix, which is what this array is used for.

    Parameters
    -----------
    total_sparse_pixels : int
        The total number of pixels in the pixelization grid which fall within the regular-masks.
    mask : ccd.masks.Mask
        The regular-masks within which pixelization pixels must be inside
    unmasked_sparse_grid_pixel_centres : ndarray
        The centres of the unmasked pixelization grid pixels.