def __init__(self, parent=None, state=None, settings=None, data_type=None): """ Initialization """ super(AdvancedSetupWidget, self).__init__(parent, state, settings, data_type=data_type) class AdvancedSetFrame(QtGui.QFrame, ui.diffraction.ui_diffraction_adv_setup.Ui_Frame ): """ Define class linked to UI Frame """ def __init__(self, parent=None): QtGui.QFrame.__init__(self, parent) self.setupUi(self) self._content = AdvancedSetFrame(self) self._layout.addWidget(self._content) self._instrument_name = settings.instrument_name self._facility_name = settings.facility_name self.initialize_content() if state is not None: self.set_state(state) else: self.set_state(AdvancedSetupScript(self._instrument_name)) return
def __init__(self, parent=None, state=None, settings=None, data_type=None): """ Initialization """ super(AdvancedSetupWidget, self).__init__(parent, state, settings, data_type=data_type) class AdvancedSetFrame(QFrame): """ Define class linked to UI Frame """ def __init__(self, parent=None): QFrame.__init__(self, parent) self.ui = load_ui( __file__, '../../../ui/diffraction/diffraction_adv_setup.ui', baseinstance=self) self._content = AdvancedSetFrame(self) self._layout.addWidget(self._content) self._instrument_name = settings.instrument_name self._facility_name = settings.facility_name self.initialize_content() if state is not None: self.set_state(state) else: self.set_state(AdvancedSetupScript(self._instrument_name)) return
def get_state(self): """ Returns a RunSetupScript with the state of Run_Setup_Interface Set up all the class parameters in RunSetupScrpt with values in the content """ s = AdvancedSetupScript(self._instrument_name) s.pushdatapositive = str(self._content.pushdatapos_combo.currentText()) s.unwrapref = self._content.unwrap_edit.text() s.lowresref = self._content.lowres_edit.text() s.cropwavelengthmin = str(self._content.cropwavelengthmin_edit.text()) s.cropwavelengthmax = str(self._content.lineEdit_croppedWavelengthMax.text()) s.removepropmppulsewidth = self._content.removepromptwidth_edit.text() s.maxchunksize = self._content.maxchunksize_edit.text() s.scaledata = self._content.scaledata_edit.text() s.filterbadpulses = self._content.filterbadpulses_edit.text() s.bkgdsmoothpars = self._content.bkgdsmoothpar_edit.text() s.stripvanadiumpeaks = self._content.stripvanpeaks_chkbox.isChecked() s.vanadiumfwhm = self._content.vanpeakfwhm_edit.text() s.vanadiumpeaktol = self._content.vanpeaktol_edit.text() s.vanadiumsmoothparams = self._content.vansmoothpar_edit.text() s.preserveevents = self._content.preserveevents_checkbox.isChecked() s.outputfileprefix = self._content.outputfileprefix_edit.text() return s
def get_state(self): """ Returns a RunSetupScript with the state of Run_Setup_Interface Set up all the class parameters in RunSetupScrpt with values in the content """ s = AdvancedSetupScript(self._instrument_name) s.pushdatapositive = str(self._content.pushdatapos_combo.currentText()) s.unwrapref = self._content.unwrap_edit.text() s.lowresref = self._content.lowres_edit.text() s.cropwavelengthmin = str(self._content.cropwavelengthmin_edit.text()) s.cropwavelengthmax = str( self._content.lineEdit_croppedWavelengthMax.text()) s.removepropmppulsewidth = self._content.removepromptwidth_edit.text() s.maxchunksize = self._content.maxchunksize_edit.text() s.scaledata = self._content.scaledata_edit.text() s.filterbadpulses = self._content.filterbadpulses_edit.text() s.bkgdsmoothpars = self._content.bkgdsmoothpar_edit.text() s.stripvanadiumpeaks = self._content.stripvanpeaks_chkbox.isChecked() s.vanadiumfwhm = self._content.vanpeakfwhm_edit.text() s.vanadiumpeaktol = self._content.vanpeaktol_edit.text() s.vanadiumsmoothparams = self._content.vansmoothpar_edit.text() s.preserveevents = self._content.preserveevents_checkbox.isChecked() s.outputfileprefix = self._content.outputfileprefix_edit.text() return s
def get_state(self): """ Returns a RunSetupScript with the state of Run_Setup_Interface Set up all the class parameters in RunSetupScrpt with values in the content """ s = AdvancedSetupScript(self._instrument_name) # # Initialize AdvancedSetupScript static variables with widget's content # s.pushdatapositive = str(self._content.pushdatapos_combo.currentText()) s.unwrapref = self._content.unwrap_edit.text() s.lowresref = self._content.lowres_edit.text() s.cropwavelengthmin = str(self._content.cropwavelengthmin_edit.text()) s.cropwavelengthmax = str( self._content.lineEdit_croppedWavelengthMax.text()) s.removepropmppulsewidth = self._content.removepromptwidth_edit.text() s.maxchunksize = self._content.maxchunksize_edit.text() s.scaledata = self._content.scaledata_edit.text() s.filterbadpulses = self._content.filterbadpulses_edit.text() s.bkgdsmoothpars = self._content.bkgdsmoothpar_edit.text() s.stripvanadiumpeaks = self._content.stripvanpeaks_chkbox.isChecked() s.vanadiumfwhm = self._content.vanpeakfwhm_edit.text() s.vanadiumpeaktol = self._content.vanpeaktol_edit.text() s.vanadiumsmoothparams = self._content.vansmoothpar_edit.text() s.vanadiumradius = self._content.vanadiumradius_edit.text() s.sampleformula = self._content.sampleformula_edit.text() s.samplenumberdensity = self._content.numberdensity_edit.text() s.measuredmassdensity = self._content.massdensity_edit.text() s.containershape = self._content.containertype_combo.currentText() s.typeofcorrection = self._content.correctiontype_combo.currentText() s.preserveevents = self._content.preserveevents_checkbox.isChecked() s.outputfileprefix = self._content.outputfileprefix_edit.text() # Caching options s.cache_dir_scan_save = self._content.cache_dir_edit_1.text() s.cache_dir_scan_1 = self._content.cache_dir_edit_2.text() s.cache_dir_scan_2 = self._content.cache_dir_edit_3.text() s.clean_cache = self._content.clean_cache_box.isChecked() return s