add scalar detection diagram