def aoi(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth):
projection = aoi_projection(surface_tilt, surface_azimuth,<EOL>solar_zenith, solar_azimuth)<EOL>aoi_value = np.rad2deg(np.arccos(projection))<EOL>try:<EOL><INDENT>aoi_value.name = '<STR_LIT>'<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>return aoi_value<EOL>
Calculates the angle of incidence of the solar vector on a surface.
This is the angle between the solar vector and the surface normal.

Input all angles in degrees.

Parameters
----------
surface_tilt : numeric
    Panel tilt from horizontal.
surface_azimuth : numeric
    Panel azimuth from north.
solar_zenith : numeric
    Solar zenith angle.
solar_azimuth : numeric
    Solar azimuth angle.

Returns
-------
aoi : numeric
    Angle of incidence in degrees.