예제 #1
0
    def nxc_from_PC(self, filt=slice(None)):
        corr_index = int(self.raw.shape[0] * 0.02)

        V_PC_ill = self.data()['Voc'][filt]
        V_PC_dark = np.mean(self.raw['Voc'][:corr_index])
        #print(V_PC_dark)
        del_sigma = self.A * (V_PC_ill - self.C)**2 + self.B * (
            V_PC_ill - self.C) - (self.A * (V_PC_dark - self.C)**2 + self.B *
                                  (V_PC_dark - self.C))

        # Create an instance of a mobility object
        MOB = Mobility()
        """
        TEMPERATURE DEPENDENCE - OK
        Here the mobility_sum is calculated using the temperature data input directly from the data file name.
        """
        def nxc_PC(x):
            return del_sigma / (C.e * self.W * MOB.mobility_sum(
                Na=self.Na, Nd=self.Nd, temp=self.T, nxc=x))

        nxc_guess = del_sigma / (C.e * self.W * MOB.mobility_sum(
            Na=self.Na,
            Nd=self.Nd,
            temp=self.T,
            nxc=np.ones_like(del_sigma) * 1e15))

        nxc = self.find_iteratively(nxc_guess, nxc_PC)
        return nxc
    def nxc_from_PC(self, filt=slice(None)):
        corr_index = int(self.raw.shape[0]*0.02)

        V_PC_ill = self.data()['Voc'][filt]
        V_PC_dark = np.mean(self.raw['Voc'][:corr_index])
        #print(V_PC_dark)
        del_sigma = self.A*(V_PC_ill-self.C)**2 + self.B*(V_PC_ill-self.C) - (self.A*(V_PC_dark-self.C)**2 + self.B*(V_PC_dark-self.C))

        MOB = Mobility()

        def nxc_PC(x):
            return del_sigma / (C.e * self.W * MOB.mobility_sum(Na=self.Na, Nd=self.Nd, temp=self.T, nxc=x))

        nxc_guess = del_sigma / (C.e * self.W * MOB.mobility_sum(Na=self.Na, Nd=self.Nd, temp=self.T, nxc=np.ones_like(del_sigma)*1e15))

        nxc = self.find_iteratively(nxc_guess, nxc_PC)
        return nxc