def get_size_parameters(self): if self.active == 1: if not self.mu_function == 1: congruence.checkStrictlyPositiveNumber(self.mu, "\u03bc or D") if self.cb_distribution.currentText( ) != Distribution.DELTA and not self.sigma_function == 1: congruence.checkStrictlyPositiveNumber(self.sigma, "\u03c3") if self.cb_distribution.currentText( ) == Distribution.DELTA and not self.fit_global_parameters.measured_dataset.phases[ self.index].use_structure: raise Exception( "Delta Distribution cannot be used when the structural model is not activated" ) return SizeParameters( shape=self.cb_shape.currentText(), distribution=self.cb_distribution.currentText(), mu=OWGenericWidget.get_fit_parameter_from_widget( self, "mu", self.get_parameters_prefix()), sigma=None if self.cb_distribution.currentText() == Distribution.DELTA else OWGenericWidget.get_fit_parameter_from_widget( self, "sigma", self.get_parameters_prefix()), truncation=OWGenericWidget.get_fit_parameter_from_widget( self, "truncation", self.get_parameters_prefix()) if (self.cb_distribution.currentText() == Distribution.LOGNORMAL and self.cb_shape.currentText() == Shape.WULFF) else None, cube_face=self.cb_cube_face.currentText() if (self.cb_distribution.currentText() == Distribution.LOGNORMAL and self.cb_shape.currentText() == Shape.WULFF) else None, add_saxs=self.add_saxs if self.cb_distribution.currentText() == Distribution.DELTA else False, normalize_to=self.normalize_to if self.cb_distribution.currentText() == Distribution.DELTA else None, active=self.active == 1)
def get_incident_radiation(self): incident_radiation = IncidentRadiation( wavelength=OWGenericWidget.get_fit_parameter_from_widget( self, "wavelength", self.get_parameters_prefix())) if self.is_multiple_wavelength == 1: secondary_wavelengths = [] secondary_wavelengths_weights = [] for index in range(0, 4): var_wl = "wavelength_" + str(2 + index) var_we = "weight_" + str(2 + index) secondary_wavelength = OWGenericWidget.get_fit_parameter_from_widget( self, var_wl, self.get_parameters_prefix()) secondary_wavelength_weight = OWGenericWidget.get_fit_parameter_from_widget( self, var_we, self.get_parameters_prefix()) if secondary_wavelength.value > 0.0: secondary_wavelengths.append(secondary_wavelength) secondary_wavelengths_weights.append( secondary_wavelength_weight) incident_radiation.set_multiple_wavelengths( self.xray_tube_key, secondary_wavelengths, secondary_wavelengths_weights, recalculate=True) return incident_radiation
def get_strain_parameters(self): if self.active == 1: if not self.rho_function == 1: congruence.checkStrictlyPositiveNumber(self.rho, "\u03c1") if not self.Re_function == 1: congruence.checkStrictlyPositiveNumber(self.Re, "Re") if not self.mix_function == 1: congruence.checkPositiveNumber(self.mix, "mix") if not self.b_function == 1: congruence.checkStrictlyPositiveNumber(self.b, "b") return KrivoglazWilkensModel( rho=OWGenericWidget.get_fit_parameter_from_widget( self, "rho", self.get_parameters_prefix()), Re=OWGenericWidget.get_fit_parameter_from_widget( self, "Re", self.get_parameters_prefix()), Ae=OWGenericWidget.get_fit_parameter_from_widget( self, "Ae", self.get_parameters_prefix()), Be=OWGenericWidget.get_fit_parameter_from_widget( self, "Be", self.get_parameters_prefix()), As=OWGenericWidget.get_fit_parameter_from_widget( self, "As", self.get_parameters_prefix()), Bs=OWGenericWidget.get_fit_parameter_from_widget( self, "Bs", self.get_parameters_prefix()), mix=OWGenericWidget.get_fit_parameter_from_widget( self, "mix", self.get_parameters_prefix()), b=OWGenericWidget.get_fit_parameter_from_widget( self, "b", self.get_parameters_prefix()), active=self.active == 1)
def get_strain_parameters(self): if self.laue_id == 12: return InvariantPAHLaueGroup13( aa=OWGenericWidget.get_fit_parameter_from_widget( self, "aa", self.get_parameters_prefix()), bb=OWGenericWidget.get_fit_parameter_from_widget( self, "bb", self.get_parameters_prefix()), e1=OWGenericWidget.get_fit_parameter_from_widget( self, "e1", self.get_parameters_prefix()), e4=OWGenericWidget.get_fit_parameter_from_widget( self, "e4", self.get_parameters_prefix()), active=self.active == 1) elif self.laue_id == 13: return InvariantPAHLaueGroup14( aa=OWGenericWidget.get_fit_parameter_from_widget( self, "aa", self.get_parameters_prefix()), bb=OWGenericWidget.get_fit_parameter_from_widget( self, "bb", self.get_parameters_prefix()), e1=OWGenericWidget.get_fit_parameter_from_widget( self, "e1", self.get_parameters_prefix()), e4=OWGenericWidget.get_fit_parameter_from_widget( self, "e4", self.get_parameters_prefix()), active=self.active == 1) else: return None
def set_data(self, strain_parameters): OWGenericWidget.populate_fields_in_widget(self, "aa", strain_parameters.aa) OWGenericWidget.populate_fields_in_widget(self, "bb", strain_parameters.bb) OWGenericWidget.populate_fields_in_widget(self, "e1", strain_parameters.e1) OWGenericWidget.populate_fields_in_widget(self, "e4", strain_parameters.e4)
def create_wavelength_boxes(self): self.secondary_wavelengths_boxes = {} for key in wavelengths_data.keys(): self.secondary_wavelengths_boxes[key] = gui.widgetBox( self.secondary_box_2, key + " Secondary Wavelengths", orientation="vertical", width=self.CONTROL_AREA_WIDTH - 5, height=240) secondary_index = 2 for wavelenght in wavelengths_data[key]: if not wavelenght.is_principal: var_wl = "wavelength_" + str(secondary_index) var_we = "weight_" + str(secondary_index) label_wl = "\u03BB" + " " + str(secondary_index) + " [nm]" label_we = "weight " + str(secondary_index) OWGenericWidget.create_box_in_widget( self, self.secondary_wavelengths_boxes[key], var_wl, label=label_wl, label_width=50, add_callback=True, min_value=0.0, min_accepted=False, trim=25) OWGenericWidget.create_box_in_widget( self, self.secondary_wavelengths_boxes[key], var_we, label=label_we, label_width=50, add_callback=True, min_value=0.0, min_accepted=True, trim=25) secondary_index += 1 self.secondary_wavelengths_boxes[key].setVisible(False)
def get_background(self): return ExpDecayBackground(a0=OWGenericWidget.get_fit_parameter_from_widget(self, "a0", self.get_parameters_prefix()), b0=OWGenericWidget.get_fit_parameter_from_widget(self, "b0", self.get_parameters_prefix()), a1=OWGenericWidget.get_fit_parameter_from_widget(self, "a1", self.get_parameters_prefix()), b1=OWGenericWidget.get_fit_parameter_from_widget(self, "b1", self.get_parameters_prefix()), a2=OWGenericWidget.get_fit_parameter_from_widget(self, "a2", self.get_parameters_prefix()), b2=OWGenericWidget.get_fit_parameter_from_widget(self, "b2", self.get_parameters_prefix()))
def get_background(self): return ChebyshevBackground( c0=OWGenericWidget.get_fit_parameter_from_widget( self, "c0", self.get_parameters_prefix()), c1=OWGenericWidget.get_fit_parameter_from_widget( self, "c1", self.get_parameters_prefix()), c2=OWGenericWidget.get_fit_parameter_from_widget( self, "c2", self.get_parameters_prefix()), c3=OWGenericWidget.get_fit_parameter_from_widget( self, "c3", self.get_parameters_prefix()), c4=OWGenericWidget.get_fit_parameter_from_widget( self, "c4", self.get_parameters_prefix()), c5=OWGenericWidget.get_fit_parameter_from_widget( self, "c5", self.get_parameters_prefix()), c6=OWGenericWidget.get_fit_parameter_from_widget( self, "c6", self.get_parameters_prefix()), c7=OWGenericWidget.get_fit_parameter_from_widget( self, "c7", self.get_parameters_prefix()), c8=OWGenericWidget.get_fit_parameter_from_widget( self, "c8", self.get_parameters_prefix()), c9=OWGenericWidget.get_fit_parameter_from_widget( self, "c9", self.get_parameters_prefix()))
def get_instrumental_profile(self): return Caglioti(U=OWGenericWidget.get_fit_parameter_from_widget( self, "U", self.get_parameters_prefix()), V=OWGenericWidget.get_fit_parameter_from_widget( self, "V", self.get_parameters_prefix()), W=OWGenericWidget.get_fit_parameter_from_widget( self, "W", self.get_parameters_prefix()), a=OWGenericWidget.get_fit_parameter_from_widget( self, "a", self.get_parameters_prefix()), b=OWGenericWidget.get_fit_parameter_from_widget( self, "b", self.get_parameters_prefix()), c=OWGenericWidget.get_fit_parameter_from_widget( self, "c", self.get_parameters_prefix()))
def init_main_box(self): OWGenericWidget.create_box_in_widget(self, self.main_box, "aa", add_callback=True, min_value=0.0, min_accepted=True, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "bb", add_callback=True, min_value=0.0, min_accepted=True, trim=25) invariant_box = gui.widgetBox(self.main_box, "Invariant Parameters", orientation="vertical", width=self.CONTROL_AREA_WIDTH - 10) self.cb_laue_id = orangegui.comboBox(invariant_box, self, "laue_id", label="Laue Group", items=LaueGroup.tuple(), callback=self.set_laue_id, orientation="horizontal") OWGenericWidget.create_box_in_widget(self, invariant_box, "e1", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, invariant_box, "e4", add_callback=True, trim=25)
def set_xray_tube_key(self): if not self.is_on_init and self.xray_tube_key in wavelengths_data.keys( ): secondary_index = 2 for wavelength in wavelengths_data[self.xray_tube_key]: if not wavelength.is_principal: var_wl = "wavelength_" + str(secondary_index) var_we = "weight_" + str(secondary_index) OWGenericWidget.populate_fields_in_widget( self, var_wl, FitParameter(value=wavelength.wavelength, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget( self, var_we, FitParameter(value=wavelength.weight, fixed=True), value_only=False) secondary_index += 1 else: OWGenericWidget.populate_fields_in_widget( self, "wavelength", FitParameter(value=wavelength.wavelength, fixed=True), value_only=False) for key in self.secondary_wavelengths_boxes.keys(): if key == self.xray_tube_key: self.secondary_box_2.layout().removeWidget( self.secondary_wavelengths_boxes[key]) self.secondary_box_2.layout().insertWidget( 0, self.secondary_wavelengths_boxes[key]) self.secondary_wavelengths_boxes[key].setVisible(True) else: self.secondary_wavelengths_boxes[key].setVisible(False) if not self.is_on_init: self.widget.dump_xray_tube_key() self.widget.dump_wavelength_2() self.widget.dump_wavelength_3() self.widget.dump_wavelength_4() self.widget.dump_wavelength_5() self.widget.dump_weight_2() self.widget.dump_weight_3() self.widget.dump_weight_4() self.widget.dump_weight_5()
def set_data(self, size_parameters): OWGenericWidget.populate_fields_in_widget(self, "mu", size_parameters.mu) OWGenericWidget.populate_fields_in_widget(self, "sigma", size_parameters.sigma) if size_parameters.shape == Shape.WULFF: OWGenericWidget.populate_fields_in_widget( self, "truncation", size_parameters.truncation) self.cb_cube_face.setCurrentText(size_parameters.cube_face) self.add_saxs = size_parameters.add_saxs if size_parameters.add_saxs: self.normalize_to = size_parameters.normalize_to self.set_shape() self.set_distribution()
def set_data(self, incident_radiation): if (self.is_multiple_wavelength==0 and not incident_radiation.is_single_wavelength) or \ (self.is_multiple_wavelength==1 and incident_radiation.is_single_wavelength): raise ValueError( "Incident Radiation is incompatible with previous setup: multiple/single wavelength" ) if not incident_radiation.is_single_wavelength: if self.xray_tube_key != incident_radiation.xray_tube_key: raise ValueError( "Incident Radiation is incompatible with previous setup: different xray-tube" ) # --------------------------------------- OWGenericWidget.populate_fields_in_widget( self, "wavelength", incident_radiation.wavelength, value_only=True) self.is_multiple_wavelength = 0 if incident_radiation.is_single_wavelength else 1 if not incident_radiation.is_single_wavelength: self.xray_tube_key = incident_radiation.xray_tube_key for index in range(0, len(incident_radiation.secondary_wavelengths)): OWGenericWidget.populate_fields_in_widget( self, "wavelength_" + str(2 + index), incident_radiation.secondary_wavelengths[index], value_only=True) OWGenericWidget.populate_fields_in_widget( self, "weight_" + str(2 + index), incident_radiation.secondary_wavelengths_weights[index], value_only=True) self.set_is_multiple_wavelength(switch_tube=False)
def get_peak_shift(self): return ZeroError(shift=OWGenericWidget.get_fit_parameter_from_widget( self, "shift", self.get_parameters_prefix()))
def init_main_box(self): self.cb_shape = orangegui.comboBox(self.main_box, self, "shape", label="Shape", items=Shape.tuple(), callback=self.set_shape, orientation="horizontal") self.cb_distribution = orangegui.comboBox( self.main_box, self, "distribution", label="Distribution", items=Distribution.tuple(), callback=self.set_distribution, orientation="horizontal") orangegui.separator(self.main_box) size_box = gui.widgetBox(self.main_box, "", orientation="vertical", width=self.CONTROL_AREA_WIDTH - 10) self.sigma_box = gui.widgetBox(size_box, "", orientation="vertical") OWGenericWidget.create_box_in_widget(self, self.sigma_box, "mu", label="\u03bc or D", add_callback=True, min_value=0.0, min_accepted=False, trim=25) OWGenericWidget.create_box_in_widget(self, self.sigma_box, "sigma", label="\u03c3", add_callback=True, min_value=0.0, min_accepted=False, trim=25) self.truncation_box = gui.widgetBox(size_box, "", orientation="vertical") OWGenericWidget.create_box_in_widget(self, self.truncation_box, "truncation", label="trunc.", add_callback=True, min_value=0.0, max_value=1.0, min_accepted=True, trim=25) self.cb_cube_face = orangegui.comboBox( self.truncation_box, self, "cube_face", label="Cube Face", items=WulffCubeFace.tuple(), callback=self.callback_cube_face, labelWidth=300, orientation="horizontal") self.saxs_box = gui.widgetBox(size_box, "", orientation="vertical") orangegui.comboBox(self.saxs_box, self, "add_saxs", label="Add SAXS", items=["No", "Yes"], labelWidth=300, orientation="horizontal", callback=self.set_add_saxs) self.normalize_box = gui.widgetBox(self.saxs_box, "", orientation="vertical") orangegui.comboBox(self.normalize_box, self, "normalize_to", label="Normalize to", items=Normalization.tuple(), callback=self.callback_normalize_to, labelWidth=300, orientation="horizontal") self.set_shape()
def init_main_box(self): OWGenericWidget.create_box_in_widget(self, self.main_box, "rho", add_callback=True, label="\u03c1", min_value=0.0, min_accepted=False, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "Re", add_callback=True, min_value=0.0, min_accepted=False, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "Ae", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "Be", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "As", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "Bs", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "mix", add_callback=True, min_value=0.0, min_accepted=True, max_value=1.0, max_accepted=True, trim=25) OWGenericWidget.create_box_in_widget(self, self.main_box, "b", add_callback=True, min_value=0.0, min_accepted=False, trim=25)
def set_data(self, strain_parameters): if strain_parameters.rho is None and \ strain_parameters.Re is None and \ strain_parameters.mix is None and \ strain_parameters.mix is None: OWGenericWidget.populate_fields_in_widget(self, "Ae", strain_parameters.Ae, value_only=False) OWGenericWidget.populate_fields_in_widget(self, "Be", strain_parameters.Be, value_only=False) OWGenericWidget.populate_fields_in_widget(self, "As", strain_parameters.As, value_only=False) OWGenericWidget.populate_fields_in_widget(self, "Bs", strain_parameters.Bs, value_only=False) else: OWGenericWidget.populate_fields_in_widget(self, "rho", strain_parameters.rho) OWGenericWidget.populate_fields_in_widget(self, "Re", strain_parameters.Re) OWGenericWidget.populate_fields_in_widget(self, "Ae", strain_parameters.Ae) OWGenericWidget.populate_fields_in_widget(self, "Be", strain_parameters.Be) OWGenericWidget.populate_fields_in_widget(self, "As", strain_parameters.As) OWGenericWidget.populate_fields_in_widget(self, "Bs", strain_parameters.Bs) OWGenericWidget.populate_fields_in_widget(self, "mix", strain_parameters.mix) OWGenericWidget.populate_fields_in_widget(self, "b", strain_parameters.b)
def set_is_multiple_wavelength(self, switch_tube=True): if self.is_multiple_wavelength == 0: self.secondary_box.setVisible(False) self.secondary_box_2.setVisible(False) self.secondary_box_empty.setVisible(True) self.secondary_box_2_empty.setVisible(True) OWGenericWidget.populate_fields_in_widget(self, "wavelength_2", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "weight_2", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "wavelength_3", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "weight_3", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "wavelength_4", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "weight_4", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "wavelength_5", FitParameter(value=0.0, fixed=True), value_only=False) OWGenericWidget.populate_fields_in_widget(self, "weight_5", FitParameter(value=0.0, fixed=True), value_only=False) else: self.secondary_box.setVisible(True) self.secondary_box_empty.setVisible(False) self.secondary_box_2.setVisible(True) self.secondary_box_2_empty.setVisible(False) if switch_tube: self.set_xray_tube_key() if not self.is_on_init: self.widget.dump_is_multiple_wavelength() self.widget.dump_xray_tube_key() self.widget.dump_wavelength_2() self.widget.dump_wavelength_3() self.widget.dump_wavelength_4() self.widget.dump_wavelength_5() self.widget.dump_weight_2() self.widget.dump_weight_3() self.widget.dump_weight_4() self.widget.dump_weight_5()
def get_peak_shift(self): return Lab6TanCorrection(ax=OWGenericWidget.get_fit_parameter_from_widget(self, "ax", self.get_parameters_prefix()), bx=OWGenericWidget.get_fit_parameter_from_widget(self, "bx", self.get_parameters_prefix()), cx=OWGenericWidget.get_fit_parameter_from_widget(self, "cx", self.get_parameters_prefix()), dx=OWGenericWidget.get_fit_parameter_from_widget(self, "dx", self.get_parameters_prefix()), ex=OWGenericWidget.get_fit_parameter_from_widget(self, "ex", self.get_parameters_prefix()))
def set_data(self, instrumental_profile_parameters): OWGenericWidget.populate_fields_in_widget( self, "U", instrumental_profile_parameters.U, value_only=True) OWGenericWidget.populate_fields_in_widget( self, "V", instrumental_profile_parameters.V, value_only=True) OWGenericWidget.populate_fields_in_widget( self, "W", instrumental_profile_parameters.W, value_only=True) OWGenericWidget.populate_fields_in_widget( self, "a", instrumental_profile_parameters.a, value_only=True) OWGenericWidget.populate_fields_in_widget( self, "b", instrumental_profile_parameters.b, value_only=True) OWGenericWidget.populate_fields_in_widget( self, "c", instrumental_profile_parameters.c, value_only=True)
def set_data(self, background_parameters): OWGenericWidget.populate_fields_in_widget(self, "c0", background_parameters.c0, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c1", background_parameters.c1, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c2", background_parameters.c2, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c3", background_parameters.c3, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c4", background_parameters.c4, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c5", background_parameters.c5, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c6", background_parameters.c6, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c7", background_parameters.c7, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c8", background_parameters.c8, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "c9", background_parameters.c9, value_only=True)
def set_data(self, shift_parameters): OWGenericWidget.populate_fields_in_widget(self, "shift", shift_parameters.shift, value_only=True)
def init_gui(self, container): box = gui.widgetBox(container, "", orientation="vertical", width=self.CONTROL_AREA_WIDTH - 5, spacing=0) orangegui.comboBox(box, self, "is_multiple_wavelength", label="Incident Radiation", items=["Single Wavelenght", "X-ray Tube"], orientation="horizontal", callback=self.set_is_multiple_wavelength) self.secondary_box = gui.widgetBox(container, "", orientation="horizontal", width=self.CONTROL_AREA_WIDTH - 5, spacing=0) orangegui.comboBox(self.secondary_box, self, "xray_tube_key", label="X-ray Tube Dataset", items=self.get_xray_tube_keys(), sendSelectedValue=True, orientation="horizontal", callback=self.set_xray_tube_key) orangegui.separator(self.secondary_box) gui.button(self.secondary_box, self, "Reset", width=70, callback=self.set_xray_tube_key) self.secondary_box_empty = gui.widgetBox( container, "", orientation="vertical", width=self.CONTROL_AREA_WIDTH - 5, spacing=0) OWGenericWidget.create_box_in_widget(self, container, "wavelength", label="\u03BB [nm]", disable_function=True, add_callback=True, min_value=0.0, min_accepted=False, trim=25) self.secondary_box_2 = gui.widgetBox(container, "", orientation="vertical", width=self.CONTROL_AREA_WIDTH) self.secondary_box_2_empty = gui.widgetBox( container, "", orientation="vertical", width=self.CONTROL_AREA_WIDTH) self.create_wavelength_boxes() self.set_is_multiple_wavelength()
def get_peak_shift(self): congruence.checkStrictlyPositiveNumber(self.goniometer_radius, "Goniometer Radius") return SpecimenDisplacement(goniometer_radius=self.goniometer_radius, displacement=OWGenericWidget.get_fit_parameter_from_widget(self, "displacement", self.get_parameters_prefix()))
def set_data(self, shift_parameters): self.goniometer_radius = shift_parameters.goniometer_radius OWGenericWidget.populate_fields_in_widget(self, "displacement", shift_parameters.displacement, value_only=True)
def init_gui(self, container): gui.lineEdit(container, self, "goniometer_radius", "Goniometer Radius [m]", labelWidth=300, valueType=float, callback=self.widget.dump_goniometer_radius) orangegui.separator(container) OWGenericWidget.create_box_in_widget(self, container, "displacement", add_callback=True, label_width=75, trim=15)
def init_gui(self, container): OWGenericWidget.create_box_in_widget(self, container, "c0", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c1", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c2", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c3", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c4", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c5", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c6", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c7", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c8", add_callback=True, trim=25) OWGenericWidget.create_box_in_widget(self, container, "c9", add_callback=True, trim=25)
def init_gui(self, container): OWGenericWidget.create_box_in_widget(self, container, "ax", add_callback=True) OWGenericWidget.create_box_in_widget(self, container, "bx", add_callback=True) OWGenericWidget.create_box_in_widget(self, container, "cx", add_callback=True) OWGenericWidget.create_box_in_widget(self, container, "dx", add_callback=True) OWGenericWidget.create_box_in_widget(self, container, "ex", add_callback=True)
def init_gui(self, container): OWGenericWidget.create_box_in_widget(self, container, "shift", add_callback=True, trim=25)
def set_data(self, shift_parameters): OWGenericWidget.populate_fields_in_widget(self, "ax", shift_parameters.ax, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "bx", shift_parameters.bx, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "cx", shift_parameters.cx, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "dx", shift_parameters.dx, value_only=True) OWGenericWidget.populate_fields_in_widget(self, "ex", shift_parameters.ex, value_only=True)