Ejemplo n.º 1
0
 def correctintrinsic(self):
     for action in self.nimodel.actions():
         if action.isChecked():
             ni_author = action.text()
     for action in self.Radmodel.actions():
         if action.isChecked():
             radauthor = action.text()
     for action in self.Augmodel.actions():
         if action.isChecked():
             augauthor = action.text()
     for action in self.Ionmodel.actions():
         if action.isChecked():
             ionauthor = action.text()
     for item in self.listWidget_data.selectedItems():
         intrinsic = rawdata()
         tauint = rawdata()
         for data in self.Rawdata:
             if data.uid == item.data(32) and data.checkset() == True:
                 intrinsic.name = 'IntrinsicCorrected_' + data.name
                 intrinsic.Ndop = data.Ndop
                 intrinsic.temp = data.temp
                 intrinsic.doptype = data.doptype
                 intrinsic.PCPL = data.PCPL
                 intrinsic.nxc = data.nxc
                 tauint.name = 'Intrinsic_' + data.name
                 tauint.Ndop = data.Ndop
                 tauint.temp = data.temp
                 tauint.doptype = data.doptype
                 tauint.PCPL = data.PCPL
                 tauint.nxc = data.nxc
                 ni = NI(temp=data.temp).update(author=ni_author)
                 if data.doptype == 'n':
                     Nd = Ion(temp=data.temp,
                              ni_author=ni_author).update_dopant_ionisation(
                                  author=ionauthor,
                                  N_dop=data.Ndop,
                                  nxc=0,
                                  impurity='phosphorous')
                     Na = 1
                 if data.doptype == 'p':
                     Na = Ion(temp=data.temp,
                              ni_author=ni_author).update_dopant_ionisation(
                                  author=ionauthor,
                                  N_dop=data.Ndop,
                                  nxc=0,
                                  impurity='boron')
                     Nd = 1
                 itauintrin = rad().itau(ni_author=ni_author, author=radauthor, temp=data.temp, Na=Na, Nd=Nd, nxc=data.nxc) + \
                     aug().itau(ni_author=ni_author, author=augauthor,
                                temp=data.temp, Na=Na, Nd=Nd, nxc=data.nxc)
                 intrinsic.tau = 1. / (1. / data.tau - itauintrin)
                 tauint.tau = 1. / (itauintrin)
         self.Rawdata.append(intrinsic)
         self.Rawdata.append(tauint)
     self.updateuid()
     self.updateDataList()
     self.updateplotlist()
     self.updatedataplot()
Ejemplo n.º 2
0
 def j0correction(self):
     for action in self.Ionmodel.actions():
         if action.isChecked():
             ionauthor = action.text()
     for action in self.nimodel.actions():
         if action.isChecked():
             ni_author = action.text()
     for item in self.listWidget_data.selectedItems():
         J0 = rawdata()
         J0corrected = rawdata()
         for data in self.Rawdata:
             if data.uid == item.data(32) and data.checkset() == True:
                 J0corrected.name = 'J0Corrected_' + data.name
                 J0corrected.Ndop = data.Ndop
                 J0corrected.temp = data.temp
                 J0corrected.doptype = data.doptype
                 J0corrected.PCPL = data.PCPL
                 J0corrected.nxc = data.nxc
                 J0.name = 'J0_' + data.name
                 J0.Ndop = data.Ndop
                 J0.temp = data.temp
                 J0.doptype = data.doptype
                 J0.PCPL = data.PCPL
                 J0.nxc = data.nxc
                 ni = NI(temp=data.temp).update(author=ni_author)
                 if data.doptype == 'n':
                     iNdop = Ion(
                         temp=data.temp,
                         ni_author=ni_author).update_dopant_ionisation(
                             author=ionauthor,
                             N_dop=data.Ndop,
                             nxc=0,
                             impurity='phosphorous')
                 if data.doptype == 'p':
                     iNdop = Ion(
                         temp=data.temp,
                         ni_author=ni_author).update_dopant_ionisation(
                             author=ionauthor,
                             N_dop=data.Ndop,
                             nxc=0,
                             impurity='boron')
                 itauj0 = 2 * float(self.lineEdit_j0.text()) * (iNdop + data.nxc) / \
                     const.e / float(self.lineEdit_thickness.text()) / ni**2
                 J0corrected.tau = 1. / (1. / data.tau - itauj0)
                 J0.tau = 1. / (itauj0)
         self.Rawdata.append(J0corrected)
         self.Rawdata.append(J0)
     self.updateuid()
     self.updateDataList()
     self.updateplotlist()
     self.updatedataplot()
Ejemplo n.º 3
0
def generteCaldts(T,
                  Ndop,
                  doptypelist,
                  ionauthor='Altermatt_2006_table1',
                  vthauthor='Green_1990',
                  ni_author='Couderc_2014',
                  **kwarg):
    vth_e300, vth_h300 = Vel_th().update(temp=300, author=vthauthor)
    Caldts = []
    for i in range(len(T)):
        vth_e, vth_h = Vel_th().update(temp=T[i], author=vthauthor)
        Ni = ni().update(temp=T[i], author=ni_author)
        doptype = doptypelist[i]
        if doptype == 'n':
            Nidop = Ion(temp=T[i],
                        ni_author=ni_author).update_dopant_ionisation(
                            N_dop=Ndop[i],
                            nxc=0,
                            impurity='phosphorous',
                            author=ionauthor)
            n0, p0 = CF.get_carriers(1,
                                     Nidop,
                                     0,
                                     temp=T[i],
                                     ni_author=ni_author)
        elif doptype == 'p':
            Nidop = Ion(temp=T[i],
                        ni_author=ni_author).update_dopant_ionisation(
                            N_dop=Ndop[i],
                            nxc=0,
                            impurity='boron',
                            author=ionauthor)
            n0, p0 = CF.get_carriers(Nidop,
                                     0,
                                     0,
                                     temp=T[i],
                                     ni_author=ni_author)
        dts = {
            'ni': Ni,
            'vth_e': vth_e,
            'vth_h': vth_h,
            'n0': n0,
            'p0': p0,
            'T': T[i],
            'doptype': doptype,
            'vth_e300': vth_e300,
            'vth_h300': vth_h300
        }
        Caldts.append(dts.copy())
    return Caldts
Ejemplo n.º 4
0
    def _get_available_models(self):
        ni = NI().available_models()
        mobility = Mobility().available_models()
        ionisation = Ion().available_models()
        B = Radiative().available_models()

        values = locals()
        del values['self']
        self.available_models = values
        return self.available_models
Ejemplo n.º 5
0
    def _update_links(self):

        # setting downstream values, this should change from initalisation
        # to just updating through the update function
        self.Mob = Mob(material=self._cal_dts['material'],
                       author=self._cal_dts['mob_author'],
                       temp=self._cal_dts['temp'])
        self.ni = ni(material=self._cal_dts['material'],
                     author=self._cal_dts['nieff_author'],
                     temp=self._cal_dts['temp'])
        self.ion = Ion(material=self._cal_dts['material'],
                       author=self._cal_dts['ionis_author'],
                       ni_author=self._cal_dts['nieff_author'],
                       temp=self._cal_dts['temp'])
Ejemplo n.º 6
0
    def _update_update(self):
        '''
        creates a dictionary that holds
        the required semiconudctor models for easy
        calling
        '''

        self.update = {
            'ni':
            NI(material=self.material,
               author=self.selected_model['ni']).update,
            'mobility':
            Mobility(material=self.material,
                     author=self.selected_model['mobility']).mobility_sum,
            'ionisation':
            Ion(material=self.material,
                author=self.selected_model['ionisation']).
            update_dopant_ionisation,
            'B':
            Radiative(
                material=self.material,
                author=self.selected_model['B'],
            )._get_B
        }
Ejemplo n.º 7
0
    def __init__(self, parent=None):
        self.Rawdata = []
        QMainWindow.__init__(self, parent)
        self.setupUi(self)

        self.listWidget_data.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.listWidget_data.itemSelectionChanged.connect(self.checkselection)
        self.listWidget_data.itemDoubleClicked.connect(self.Opensetting)
        self.listWidget_data.setContextMenuPolicy(Qt.CustomContextMenu)
        self.listWidget_data.customContextMenuRequested.connect(
            self.itemrightclicked)

        self.listWidget_plotlist.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.listWidget_plotlist.itemSelectionChanged.connect(
            self.checkselection)

        self.listWidget_analysis.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.listWidget_analysis.itemSelectionChanged.connect(
            self.checkselection)

        self.figure = plt.figure()
        self.canvas = FigureCanvas(self.figure)
        self.toolbar = NavigationToolbar(self.canvas, self)
        self.verticalLayout.addWidget(self.canvas)
        self.verticalLayout.addWidget(self.toolbar)
        self.ax1 = self.figure.add_subplot(111)
        self.ax1.set_xlabel(r'Excess carrier density $[cm^{-3}]$')
        self.ax1.set_ylabel('Lifetime [s]')
        self.figure.tight_layout()

        self.pushButton_load.clicked.connect(self.loaddata)

        self.pushButton_del.setEnabled(False)
        self.pushButton_del.clicked.connect(self.deldata)

        self.pushButton_data2plot.clicked.connect(self.add2plot)
        self.pushButton_data2plot.setEnabled(False)

        self.pushButton_delplot.clicked.connect(self.delplot)
        self.pushButton_delplot.setEnabled(False)

        self.pushButton_set.clicked.connect(self.Opensetting)
        self.pushButton_set.setEnabled(False)

        self.pushButton_data2fit.clicked.connect(self.add2analysis)
        self.pushButton_data2fit.clicked.connect(self.checkselection)
        self.pushButton_data2fit.setEnabled(False)

        self.pushButton_delanalysis.clicked.connect(self.delAnalysis)
        self.pushButton_delanalysis.clicked.connect(self.checkselection)
        self.pushButton_delanalysis.setEnabled(False)

        self.pushButton_viewset.clicked.connect(self.viewset)
        self.pushButton_viewset.clicked.connect(self.checkselection)
        self.pushButton_viewset.setEnabled(False)

        self.comboBox_plotwhat.currentIndexChanged.connect(self.updatedataplot)
        self.comboBox_plotinverse.currentIndexChanged.connect(
            self.updatedataplot)

        self.pushButton_expdata.clicked.connect(self.export)

        self.pushButton_corp.clicked.connect(self.croppreview)
        self.pushButton_corp.setEnabled(False)

        self.pushButton_intcorrect.clicked.connect(self.correctintrinsic)
        self.pushButton_intcorrect.setEnabled(False)

        self.pushButton_sub2data.clicked.connect(self.sub2)
        self.pushButton_sub2data.setEnabled(False)

        self.pushButton_mergetwo.clicked.connect(self.merge2)
        self.pushButton_mergetwo.setEnabled(False)

        self.pushButton_Analysis.clicked.connect(self.StartAnalysis)
        self.pushButton_Analysis.setEnabled(False)

        self.lineEdit_croplow.textChanged[str].connect(self.checkcorp)
        self.lineEdit_crophigh.textChanged[str].connect(self.checkcorp)
        self.lineEdit_j0.textChanged[str].connect(self.checkj0)
        self.lineEdit_thickness.textChanged[str].connect(self.checkj0)

        self.pushButton_corpconfirm.setEnabled(False)
        self.pushButton_corpconfirm.clicked.connect(self.crop)

        self.pushButton_corpcancel.setEnabled(False)
        self.pushButton_corpcancel.clicked.connect(self.cropcancel)

        self.pushButton_j0correction.clicked.connect(self.j0correction)
        self.pushButton_j0correction.setEnabled(False)

        availablNI = NI().available_models()
        availablRad = rad().available_models()
        availablAug = aug().available_models()
        availablIon = Ion().available_models()

        self.menubar = self.menuBar()
        self.choosmodel = self.menubar.addMenu('Choose your models')
        self.nimodel = self.choosmodel.addMenu('ni models')
        self.Ionmodel = self.choosmodel.addMenu('Ionisation models')
        self.Radmodel = self.choosmodel.addMenu('Radiative models')
        self.Augmodel = self.choosmodel.addMenu('Auger models')

        self.nigroup = QActionGroup(self)
        self.radgroup = QActionGroup(self)
        self.auggroup = QActionGroup(self)
        self.iongroup = QActionGroup(self)

        for nimodel in availablNI:
            a = self.nigroup.addAction(QAction(nimodel, checkable=True))
            if nimodel == 'Couderc_2014':
                a.setChecked(True)
            self.nimodel.addAction(a)
        for radmodel in availablRad:
            b = self.radgroup.addAction(QAction(radmodel, checkable=True))
            if radmodel == 'Altermatt_2005':
                b.setChecked(True)
            self.Radmodel.addAction(b)
        for augmodel in availablAug:
            c = self.auggroup.addAction(QAction(augmodel, checkable=True))
            if augmodel == 'Richter2012':
                c.setChecked(True)
            self.Augmodel.addAction(c)
        for ionmodel in availablIon:
            d = self.iongroup.addAction(QAction(ionmodel, checkable=True))
            if ionmodel == 'Altermatt_2006_table1':
                d.setChecked(True)
            self.Ionmodel.addAction(d)