def __init__(self, parent=None): QtGui.QDialog.__init__(self,parent) self.ui = prec_dlg() self.ui.setupUi(self) self.ui.meth.setCurrentIndex(1) #SR calculation method: 0- "manual", 1- "auto-undulator", 2- "auto-wiggler" self.ui.relprec.setText('0.01') #relative precision self.ui.zstartint.setText('0') #longitudinal position to start integration (effective if < zEndInteg) self.ui.zendint.setText('0') #longitudinal position to finish integration (effective if > zStartInteg) self.ui.nptraj.setText('20000') #Number of points for trajectory calculation self.ui.usetermin.setCurrentIndex(1) #Use "terminating terms" (i.e. asymptotic expansions at zStartInteg and zEndInteg) or not (1 or 0 respectively) self.ui.sampfactnxny.setText('0') #sampling factor for adjusting nx, ny (effective if > 0)
def __init__(self, parent=None, units=None,column=None): QtGui.QDialog.__init__(self,parent) self.ui = prec_dlg() self.ui.setupUi(self) self.u = units if column is not None: self.ui.meth.setCurrentIndex(int(column[0].value)) #SR calculation method: 0- "manual", 1- "auto-undulator", 2- "auto-wiggler" self.ui.relprec.setText(str(column[1].value)+' '+units[1]) #relative precision self.ui.zstartint.setText(str(column[2].value)+' '+units[2]) #longitudinal position to start integration (effective if < zEndInteg) self.ui.zendint.setText(str(column[3].value)+' '+units[3]) #longitudinal position to finish integration (effective if > zStartInteg) self.ui.nptraj.setText(str(column[4].value)+' '+units[4]) #Number of points for trajectory calculation self.ui.usetermin.setCurrentIndex(int(column[5].value)) #Use "terminating terms" (i.e. asymptotic expansions at zStartInteg and zEndInteg) or not (1 or 0 respectively) self.ui.sampfactnxny.setText(str(column[6].value)+' '+units[6]) #sampling factor for adjusting nx, ny (effective if > 0)