Lumen to Candela online calculator & Python code

[to-calculator-info][/to-calculator-info]

[calculator]

[calculator-input name=“phi_v” label=“luminous flux” unit=“lm”][/calculator-input]

[calculator-input name=“theta” label=“apex angle” unit="°"][/calculator-input]

[calculator-expression name=“omega_sr” formula=“2*PI*(1-cos((theta*PI/180.0)/2.0))” unit=“sr”] [calculator-expression name=“Iv” formula=“phi_v/omega_sr” unit=“sr”] [calculator-output name=“luminous intensity” unit=“cd”] A light source with <%= format(phi_v, “lm”) %> over an angle of <%= format(theta, “°”) %> has a luminous intensity of <%= format(Iv, “cd”) %> [/calculator-output]

[/calculator]

Formula

$$\Omega_{sr} = 2\cdot\pi\cdot(1-\cos(\frac{\theta}{2}))$$$$I_{v} = \frac{\Phi_v}{\Omega_{sr}}$$

where:

Python code

You can use the UliEngineering library like this:

from UliEngineering.Physics.Light import lumen_to_candela_by_apex_angle
from UliEngineering.EngineerIO import auto_format, auto_print

# These are equivalent:
intensity = lumen_to_candela_by_apex_angle("25 lm", "120°") # intensity = 7.9577 (cd)
intensity = lumen_to_candela_by_apex_angle(25.0, 120.0) # intensity = 7.9577 (cd)

# ... or get out a human-readable value:
intensity_str = auto_format(lumen_to_candela_by_apex_angle, "25 lm", "120°") # "7.96 cd"
# ... or print directly
auto_print(lumen_to_candela_by_apex_angle, "25 lm", "120°") # prints "7.96 cd"

In case you can’t use UliEngineering, use this Python function:

import math

def lumen_to_candela_by_apex_angle(flux, angle):
    """
    Compute the luminous intensity from the luminous flux,
    assuming that the flux of <flux> is distributed equally around
    a cone with apex angle <angle>.

    Keyword parameters
    ------------------
    flux : value, engineer string or NumPy array
        The luminous flux in Lux.
    angle : value, engineer string or NumPy array
        The apex angle of the emission cone, in degrees
        For many LEDs, this is 

    >>> lumen_to_candela_by_apex_angle(25., 120.)
    7.957747154594769
    """
    solid_angle = 2*math.pi*(1.-math.cos((angle*math.pi/180.)/2.0))
    return flux / solid_angle

# Usage example
print(lumen_to_candela_by_apex_angle(25., 120.)) # Prints 7.957747154594769 (cd)