def lamPoint(numLams, lambdas, lam):

    """Return the array index of the wavelength array (lambdas) closest to a desired
     value of wavelength (lam)"""
    
    help = [0.0 for i in range(numLams)]
    for i in range(numLams):

        help[i] = lambdas[i] - lam;
        help[i] = abs(help[i]);

        
    index = 0
    min = help[index]

    for i in range(1, numLams):

        if (help[i] < min): 
            min = help[i]
            index = i

    return index