PEATDB/Ekin/Ekin_main.py
def insertDataset(self, newdata, newname, fit=None, update=1):
        """Insert pre-existing data as a dataset"""

        name = newname
        if newname in self.E.datasets:
            if tkMessageBox.askyesno('Overwrite Dataset?',name+' is already present.\n'
                                      'Do you want to overwrite it?',
                                      parent=self.ekin_win):
                self.deleteDataset(name, confirm=None)
            else:
                name = tkSimpleDialog.askstring("Dataset name?",
                                   "Enter a dataset name:",
                                    parent=self.ekin_win)
            if not name:
                return

        self.E.insertDataset(newdata, name, fit)
        self.currentdataset.set(name)
        self.updateDatasetSelector()
        if update == 1:
            self.updateAll()
        return
Insert pre-existing data as a dataset
Insert pre-existing data as a dataset
Insert pre - existing data as a dataset
def insertDataset(self, newdata, newname, fit=None, update=1):
        name = newname
        if newname in self.E.datasets:
            if tkMessageBox.askyesno('Overwrite Dataset?',name+' is already present.\n'
                                      'Do you want to overwrite it?',
                                      parent=self.ekin_win):
                self.deleteDataset(name, confirm=None)
            else:
                name = tkSimpleDialog.askstring("Dataset name?",
                                   "Enter a dataset name:",
                                    parent=self.ekin_win)
            if not name:
                return
        self.E.insertDataset(newdata, name, fit)
        self.currentdataset.set(name)
        self.updateDatasetSelector()
        if update == 1:
            self.updateAll()
        return
def insertDataset ( self , newdata , newname , fit = None , update = 1 ) : name = newname if newname in self . E . datasets : if tkMessageBox . askyesno ( 'Overwrite Dataset?' , name + ' is already present.\n' 'Do you want to overwrite it?' , parent = self . ekin_win ) : self . deleteDataset ( name , confirm = None ) else : name = tkSimpleDialog . askstring ( "Dataset name?" , "Enter a dataset name:" , parent = self . ekin_win ) if not name : return self . E . insertDataset ( newdata , name , fit ) self . currentdataset . set ( name ) self . updateDatasetSelector ( ) if update == 1 : self . updateAll ( ) return
Insert pre-existing data as a dataset
Insert pre - existing data as a dataset
"""Insert pre-existing data as a dataset"""
self
newdata
newname
fit
update