Calculator.py
def _update_fields_profile_(self,H_profile, Ex_profile, Ez_profile, material, H, freq, q):
        """Helper method for computing field profile
        
        Insert values of H, Ex, and Ez field at the new z position to the corresponding field profile array.
        
        Args:
            H_profile (array): magnetic field (y direction) array
            Ex_profile (array): electric field (x direction) array
            Ez_profile (array): electric field (z direction) array
            material: the material of the layer in which the new fields are calculated
            H: value of magnetic field at a new position
            freq (array): numpy.ndarray array of frequencies of incident light; in unit of cm^-1
            q (array): numpy.ndarray of in-plane momenta associated with incident light
        
        Return: 
            H,Ex,Ez field profile array each with one new values appended
        
        """
        T = self.transferMatrix
        
        kz = material.get_kz(freq,q)
        epsilon = material.epsilon(freq,q)
        kz = self._extract_singleton_array_value_(kz)
        epsilon = self._extract_singleton_array_value_(epsilon)
        
        omega = 2*np.pi*freq
        Ex = (H[0]-H[1])*29979245368*kz/(omega*epsilon)
        Ex_profile = np.append(Ex_profile,Ex)
        Ez = (H[0]+H[1])*29979245368*q/(omega*epsilon)
        Ez_profile = np.append(Ez_profile,Ez)
        H_profile = np.append(H_profile,H.sum())
        
        return H_profile,Ex_profile,Ez_profile
Helper method for computing field profile
        
        Insert values of H, Ex, and Ez field at the new z position to the corresponding field profile array.
        
        Args:
            H_profile (array): magnetic field (y direction) array
            Ex_profile (array): electric field (x direction) array
            Ez_profile (array): electric field (z direction) array
            material: the material of the layer in which the new fields are calculated
            H: value of magnetic field at a new position
            freq (array): numpy.ndarray array of frequencies of incident light; in unit of cm^-1
            q (array): numpy.ndarray of in-plane momenta associated with incident light
        
        Return: 
            H,Ex,Ez field profile array each with one new values appended
        
        
Helper method for computing field profile
Insert values of H, Ex, and Ez field at the new z position to the corresponding field profile array.
Helper method for computing field profile Insert values of H Ex and Ez field at the new z position to the corresponding field profile array .
def _update_fields_profile_(self,H_profile, Ex_profile, Ez_profile, material, H, freq, q):
        T = self.transferMatrix
        kz = material.get_kz(freq,q)
        epsilon = material.epsilon(freq,q)
        kz = self._extract_singleton_array_value_(kz)
        epsilon = self._extract_singleton_array_value_(epsilon)
        omega = 2*np.pi*freq
        Ex = (H[0]-H[1])*29979245368*kz/(omega*epsilon)
        Ex_profile = np.append(Ex_profile,Ex)
        Ez = (H[0]+H[1])*29979245368*q/(omega*epsilon)
        Ez_profile = np.append(Ez_profile,Ez)
        H_profile = np.append(H_profile,H.sum())
        return H_profile,Ex_profile,Ez_profile
def _update_fields_profile_ ( self , H_profile , Ex_profile , Ez_profile , material , H , freq , q ) : T = self . transferMatrix kz = material . get_kz ( freq , q ) epsilon = material . epsilon ( freq , q ) kz = self . _extract_singleton_array_value_ ( kz ) epsilon = self . _extract_singleton_array_value_ ( epsilon ) omega = 2 * np . pi * freq Ex = ( H [ 0 ] - H [ 1 ] ) * 29979245368 * kz / ( omega * epsilon ) Ex_profile = np . append ( Ex_profile , Ex ) Ez = ( H [ 0 ] + H [ 1 ] ) * 29979245368 * q / ( omega * epsilon ) Ez_profile = np . append ( Ez_profile , Ez ) H_profile = np . append ( H_profile , H . sum ( ) ) return H_profile , Ex_profile , Ez_profile
Helper method for computing field profile
Insert values of H, Ex, and Ez field at the new z position to the corresponding field profile array.
Helper method for computing field profile Insert values of H Ex and Ez field at the new z position to the corresponding field profile array .
"""Helper method for computing field profile
        
        Insert values of H, Ex, and Ez field at the new z position to the corresponding field profile array.
        
        Args:
            H_profile (array): magnetic field (y direction) array
            Ex_profile (array): electric field (x direction) array
            Ez_profile (array): electric field (z direction) array
            material: the material of the layer in which the new fields are calculated
            H: value of magnetic field at a new position
            freq (array): numpy.ndarray array of frequencies of incident light; in unit of cm^-1
            q (array): numpy.ndarray of in-plane momenta associated with incident light
        
        Return: 
            H,Ex,Ez field profile array each with one new values appended
        
        """
self
H_profile
magnetic field (y direction) array
magnetic field ( y direction ) array
Ex_profile
electric field (x direction) array
electric field ( x direction ) array
Ez_profile
electric field (z direction) array
electric field ( z direction ) array
material
the material of the layer in which the new fields are calculated
the material of the layer in which the new fields are calculated
H
value of magnetic field at a new position
value of magnetic field at a new position
freq
numpy.ndarray array of frequencies of incident light; in unit of cm^-1
numpy . ndarray array of frequencies of incident light ; in unit of cm^ - 1
q
numpy.ndarray of in-plane momenta associated with incident light
numpy . ndarray of in - plane momenta associated with incident light