def screen(a, b, max_possible=255):
    """Blend two arrays together using the 'screen' mode.

    Good for combining color-tinted fluorescence images with brightfield, for example.
    Parameter 'max_possible' refers to the brightest-possible value in the array.
    E.g. 1 for images scaled from 0 to 1, or 255 for images scaled from 0 to 255.
    """
    a = a.astype(float)
    b = b.astype(float)
    return max_possible - (((max_possible - a)*(max_possible - b))/max_possible)