def clearness_index(H_dn, H_ea):
    """
    Compute clearness index defined as:
    
    :math:`Kt=\\dfrac{H_{dn}}{H_{ea}}`
    
    where 
    :math:`H_{dn}` is the direct-normal insolation (kWh/m2)
    :math:`H_{ea}` is the extraterrestrial insolation (kWh/m2)
    over the same time frame.
    Extraterrestrial irradiation can be computed using ``pvlib.irradiance.extraradiation``.  
    Irradiation can be converted to insolation using ``pecos.pv.insolation``.
    
    Parameters
    -----------
    H_dn : pandas Series or float
        Direct normal insolation
    
    H_ea : pandas Series or float
        Extraterrestrial insolation
        
    Returns
    -------
    pandas Series or float
        Clearness index in a pandas Series (if H_dn or H_ea are Series) or 
        float (if H_dn and H_ea are floats) 
    """
    Kt = H_dn / H_ea
    return Kt
