Changeset 505357a in sasview
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
r4a9786d8 r505357a 94 94 name = "Corfunc" # For displaying in the combo box 95 95 96 trigger = QtCore.pyqtSignal(QtCore.QVariant) 97 96 98 # pylint: disable=unused-argument 97 99 def __init__(self, parent=None): … … 133 135 134 136 self.model.itemChanged.connect(self.model_changed) 137 138 self.trigger.connect(self.finish_transform) 135 139 136 140 def setup_model(self): … … 204 208 def completefn(transforms): 205 209 """Extract the values from the transforms and plot""" 206 self._realplot.data = transforms 207 self._realplot.draw_real_space() 208 params = self._calculator.extract_parameters(transforms[0]) 209 self.model.setItem(W.W_CORETHICK, 210 QtGui.QStandardItem(str(params['d0']))) 211 self.model.setItem(W.W_INTTHICK, 212 QtGui.QStandardItem(str(params['dtr']))) 213 self.model.setItem(W.W_HARDBLOCK, 214 QtGui.QStandardItem(str(params['Lc']))) 215 self.model.setItem(W.W_CRYSTAL, 216 QtGui.QStandardItem(str(params['fill']))) 217 self.model.setItem(W.W_POLY, 218 QtGui.QStandardItem(str(params['A']))) 219 self.model.setItem(W.W_PERIOD, 220 QtGui.QStandardItem(str(params['max']))) 210 self.trigger.emit(transforms) 221 211 222 212 self._update_calculator() 223 213 self._calculator.compute_transform(extrap, method, background, 224 214 completefn, updatefn) 215 216 217 def finish_transform(self, transforms): 218 transforms = transforms.toPyObject() 219 print(transforms) 220 params = self._calculator.extract_parameters(transforms[0]) 221 self.model.setItem(W.W_CORETHICK, 222 QtGui.QStandardItem(str(params['d0']))) 223 self.model.setItem(W.W_INTTHICK, 224 QtGui.QStandardItem(str(params['dtr']))) 225 self.model.setItem(W.W_HARDBLOCK, 226 QtGui.QStandardItem(str(params['Lc']))) 227 self.model.setItem(W.W_CRYSTAL, 228 QtGui.QStandardItem(str(params['fill']))) 229 self.model.setItem(W.W_POLY, 230 QtGui.QStandardItem(str(params['A']))) 231 self.model.setItem(W.W_PERIOD, 232 QtGui.QStandardItem(str(params['max']))) 233 self._realplot.data = transforms 234 self._realplot.draw_real_space() 225 235 226 236 def setup_mapper(self):
Note: See TracChangeset
for help on using the changeset viewer.