'Return the index of refraction for *glass* at wavelength *wl*.
The *glass* argument must be a key in self.data.'

def ior(self, glass, wl):

    info = self.data[glass]
    cache = info['ior_cache']
    if (wl not in cache):
        B = list(map(float, [info['B1'], info['B2'], info['B3']]))
        C = list(map(float, [info['C1'], info['C2'], info['C3']]))
        w2 = ((wl / 1000.0) ** 2)
        n = np.sqrt((((1.0 + ((B[0] * w2) / (w2 - C[0]))) + ((B[1] * w2) / (w2 - C[1]))) + ((B[2] * w2) / (w2 - C[2]))))
        cache[wl] = n
    return cache[wl]
