def expand_request_pixels(request, radius=1):
    """ Expand request by `radius` pixels. Returns None for non-vals requests
    or point requests. """
    if request['mode'] != 'vals':
        return None
    width, height = request['width'], request['height']
    x1, y1, x2, y2 = request['bbox']
    pwidth, pheight = x2 - x1, y2 - y1
    if pwidth == 0 or pheight == 0:
        return None
    amount_x = pwidth / width * radius
    amount_y = pheight / height * radius
    new_request = request.copy()
    new_request['bbox'
        ] = x1 - amount_x, y1 - amount_x, x2 + amount_y, y2 + amount_y
    new_request['width'] += 2 * radius
    new_request['height'] += 2 * radius
    return new_request
