build/lib/PyOptical/ExpData/expdata_class.py
def GetRI(self, wl):
        """Returns the refractive index of the material from the experimental
        data given the wavelength used.

        Arguments:
        wl -- wavelength
        """
        if isinstance(wl, float): wl = np.array( [wl] )
        self.VerifyRange(wl)

        if wl in self.ExpData['wl_n']:
            list_wl = list(self.ExpData['wl_n'])
            wl_index = list_wl.index(wl)

            return float(self.ExpData['n'][wl_index])

        else:
            ind_count = 0
            wl_inf = self.ExpData['wl_n'][ind_count]
            while wl_inf < wl:
                ind_count += 1
                wl_inf = self.ExpData['wl_n'][ind_count]
            wl_inf = self.ExpData['wl_n'][(ind_count-1)]
            wl_sup = self.ExpData['wl_n'][ind_count]
            ratio = (wl - wl_inf)/(wl_sup - wl_inf)

            n_inf = self.ExpData['n'][(ind_count-1)]
            n_sup = self.ExpData['n'][ind_count]
            n = n_inf+((n_sup-n_inf)*ratio)

            return float(n)
Returns the refractive index of the material from the experimental
        data given the wavelength used.

        Arguments:
        wl -- wavelength
        
Returns the refractive index of the material from the experimental
data given the wavelength used.

- wavelength
Returns the refractive index of the material from the experimental data given the wavelength used . - wavelength
def GetRI(self, wl):
        if isinstance(wl, float): wl = np.array( [wl] )
        self.VerifyRange(wl)
        if wl in self.ExpData['wl_n']:
            list_wl = list(self.ExpData['wl_n'])
            wl_index = list_wl.index(wl)
            return float(self.ExpData['n'][wl_index])
        else:
            ind_count = 0
            wl_inf = self.ExpData['wl_n'][ind_count]
            while wl_inf < wl:
                ind_count += 1
                wl_inf = self.ExpData['wl_n'][ind_count]
            wl_inf = self.ExpData['wl_n'][(ind_count-1)]
            wl_sup = self.ExpData['wl_n'][ind_count]
            ratio = (wl - wl_inf)/(wl_sup - wl_inf)
            n_inf = self.ExpData['n'][(ind_count-1)]
            n_sup = self.ExpData['n'][ind_count]
            n = n_inf+((n_sup-n_inf)*ratio)
            return float(n)
def GetRI ( self , wl ) : if isinstance ( wl , float ) : wl = np . array ( [ wl ] ) self . VerifyRange ( wl ) if wl in self . ExpData [ 'wl_n' ] : list_wl = list ( self . ExpData [ 'wl_n' ] ) wl_index = list_wl . index ( wl ) return float ( self . ExpData [ 'n' ] [ wl_index ] ) else : ind_count = 0 wl_inf = self . ExpData [ 'wl_n' ] [ ind_count ] while wl_inf < wl : ind_count += 1 wl_inf = self . ExpData [ 'wl_n' ] [ ind_count ] wl_inf = self . ExpData [ 'wl_n' ] [ ( ind_count - 1 ) ] wl_sup = self . ExpData [ 'wl_n' ] [ ind_count ] ratio = ( wl - wl_inf ) / ( wl_sup - wl_inf ) n_inf = self . ExpData [ 'n' ] [ ( ind_count - 1 ) ] n_sup = self . ExpData [ 'n' ] [ ind_count ] n = n_inf + ( ( n_sup - n_inf ) * ratio ) return float ( n )
Returns the refractive index of the material from the experimental
data given the wavelength used.
Returns the refractive index of the material from the experimental data given the wavelength used .
"""Returns the refractive index of the material from the experimental
        data given the wavelength used.

        Arguments:
        wl -- wavelength
        """
self
wl