Changed calculation so that it uses either the angle or the eclipsed intensity to set the bgIntensity.