def get_state(self): """ Returns an object with the state of the interface """ m = self.get_editing_state() state = DataSeries(data_class=REFLDataSets) state_list = [] # Common Q binning q_min = float(self._summary.q_min_edit.text()) q_step = float(self._summary.q_step_edit.text()) if self._summary.log_scale_chk.isChecked(): q_step = -q_step # Angle offset if hasattr(m, "angle_offset"): angle_offset = float(self._summary.angle_offset_edit.text()) angle_offset_error = float(self._summary.angle_offset_error_edit.text()) for i in range(self._summary.angle_list.count()): data = self._summary.angle_list.item(i).data(QtCore.Qt.UserRole).toPyObject() # Over-write Q binning with common binning data.q_min = q_min data.q_step = q_step # Over-write angle offset if hasattr(data, "angle_offset"): data.angle_offset = angle_offset data.angle_offset_error = angle_offset_error state_list.append(data) state.data_sets = state_list return state
def get_state(self): """ Returns an object with the state of the interface """ m = self.get_editing_state() state = DataSeries(data_class=REFMDataSets) state_list = [] # Common Q binning q_min = float(self._summary.q_min_edit.text()) q_step = float(self._summary.q_step_edit.text()) q_bins = int(math.ceil(float(self._summary.q_step_edit.text()))) # Angle offset if hasattr(m, "angle_offset"): angle_offset = float(self._summary.angle_offset_edit.text()) angle_offset_error = float(self._summary.angle_offset_error_edit.text()) for i in range(self._summary.angle_list.count()): data = self._summary.angle_list.item(i).data(QtCore.Qt.UserRole) # Over-write Q binning with common binning data.q_min = q_min data.q_step = q_step # Over-write angle offset if hasattr(data, "angle_offset"): data.angle_offset = angle_offset data.angle_offset_error = angle_offset_error if hasattr(data, "q_bins"): data.q_bins = q_bins data.q_log = self._summary.log_scale_chk.isChecked() if hasattr(data, "output_dir"): data.output_dir = self._summary.outdir_edit.text() state_list.append(data) state.data_sets = state_list return state
def get_state(self): """ Returns an object with the state of the interface """ m = self.get_editing_state() state = DataSeries(data_class=REFLDataSets) state_list = [] # Common Q binning q_min = float(self._summary.q_min_edit.text()) q_step = float(self._summary.q_step_edit.text()) if self._summary.log_scale_chk.isChecked(): q_step = -q_step # Scaling factor file # data.scaling_factor_file_flag = self._summary.use_sf_config_switch.isChecked() # Angle offset if hasattr(m, "angle_offset"): angle_offset = float(self._summary.angle_offset_edit.text()) angle_offset_error = float( self._summary.angle_offset_error_edit.text()) for i in range(self._summary.angle_list.count()): data = self._summary.angle_list.item(i).data(QtCore.Qt.UserRole) # Over-write Q binning with common binning data.q_min = q_min data.q_step = q_step # Over-write angle offset if hasattr(data, "angle_offset"): data.angle_offset = angle_offset data.angle_offset_error = angle_offset_error state_list.append(data) state.data_sets = state_list return state