zout[-size:, size:-size] = band + np.abs(z[-2:-size - 2:-1, :] - band)