Changeset cb4d219 in sasview for src/sas/qtgui
- Timestamp:
- Nov 24, 2017 4:13:11 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 8f83719f
- Parents:
- c6fb57c
- Location:
- src/sas/qtgui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
rc6fb57c rcb4d219 1023 1023 row_index = proxy.mapToSource(index) 1024 1024 item_to_delete = model.itemFromIndex(row_index) 1025 if item_to_delete .isCheckable():1025 if item_to_delete and item_to_delete.isCheckable(): 1026 1026 row = row_index.row() 1027 1027 if item_to_delete.parent(): -
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
- Property mode changed from 100755 to 100644
rd4881f6a rcb4d219 43 43 It will also plot the extrpolation in self.extrap, if it exists.""" 44 44 45 # TODO: add interactivity to axvlines so qlimits are immediately updated! 45 46 self.fig.clf() 46 47 … … 103 104 self.setWindowTitle("Corfunc Perspective") 104 105 106 self.parent = parent 105 107 self.mapper = None 106 108 self.model = QtGui.QStandardItemModel(self) … … 108 110 self._calculator = CorfuncCalculator() 109 111 self._allow_close = True 112 self._model_item = None 113 self.txtLowerQMin.setText("0.0") 114 self.txtLowerQMin.setEnabled(False) 110 115 111 116 self._canvas = MyMplCanvas(self.model) 112 self._realplot = MyMplCanvas(self.model) 113 self.verticalLayout_7.insertWidget(0, self._canvas) 114 self.verticalLayout_7.insertWidget(1, self._realplot) 117 self.mainVerticalLayout.insertWidget(0, self._canvas) 115 118 116 119 # Connect buttons to slots. … … 126 129 def setup_slots(self): 127 130 """Connect the buttons to their appropriate slots.""" 128 self. extrapolateBtn.clicked.connect(self.extrapolate)129 self. extrapolateBtn.setEnabled(False)130 self. transformBtn.clicked.connect(self.transform)131 self. transformBtn.setEnabled(False)132 133 self.c alculateBgBtn.clicked.connect(self.calculate_background)134 self.c alculateBgBtn.setEnabled(False)131 self.cmdExtrapolate.clicked.connect(self.extrapolate) 132 self.cmdExtrapolate.setEnabled(False) 133 self.cmdTransform.clicked.connect(self.transform) 134 self.cmdTransform.setEnabled(False) 135 136 self.cmdCalculateBg.clicked.connect(self.calculate_background) 137 self.cmdCalculateBg.setEnabled(False) 135 138 136 139 self.model.itemChanged.connect(self.model_changed) … … 148 151 self.model.setItem(W.W_BACKGROUND, 149 152 QtGui.QStandardItem("0")) 150 self.model.setItem(W.W_TRANSFORM,151 QtGui.QStandardItem("Fourier"))153 #self.model.setItem(W.W_TRANSFORM, 154 # QtGui.QStandardItem("Fourier")) 152 155 self.model.setItem(W.W_GUINIERA, 153 156 QtGui.QStandardItem("0.0")) … … 185 188 try: 186 189 params, extrapolation, _ = self._calculator.compute_extrapolation() 187 self.model.setItem(W.W_GUINIERA, QtGui.QStandardItem( str(params['A'])))188 self.model.setItem(W.W_GUINIERB, QtGui.QStandardItem( str(params['B'])))189 self.model.setItem(W.W_PORODK, QtGui.QStandardItem( str(params['K'])))190 self.model.setItem(W.W_GUINIERA, QtGui.QStandardItem("{:.3g}".format(params['A']))) 191 self.model.setItem(W.W_GUINIERB, QtGui.QStandardItem("{:.3g}".format(params['B']))) 192 self.model.setItem(W.W_PORODK, QtGui.QStandardItem("{:.3g}".format(params['K']))) 190 193 self.model.setItem(W.W_PORODSIGMA, 191 QtGui.QStandardItem( str(params['sigma'])))194 QtGui.QStandardItem("{:.4g}".format(params['sigma']))) 192 195 193 196 self._canvas.extrap = extrapolation 194 197 self._canvas.draw_q_space() 195 self. transformBtn.setEnabled(True)198 self.cmdTransform.setEnabled(True) 196 199 except (LinAlgError, ValueError): 197 200 message = "These is not enough data in the fitting range. "\ … … 206 209 def transform(self): 207 210 """Calculate the real space version of the extrapolation.""" 208 method = str(self.model.item(W.W_TRANSFORM).text()).lower() 211 #method = self.model.item(W.W_TRANSFORM).text().lower() 212 213 method = "fourier" 209 214 210 215 extrap = self._canvas.extrap … … 226 231 def finish_transform(self, transforms): 227 232 params = self._calculator.extract_parameters(transforms[0]) 228 self.model.setItem(W.W_CORETHICK, 229 QtGui.QStandardItem(str(params['d0']))) 230 self.model.setItem(W.W_INTTHICK, 231 QtGui.QStandardItem(str(params['dtr']))) 232 self.model.setItem(W.W_HARDBLOCK, 233 QtGui.QStandardItem(str(params['Lc']))) 234 self.model.setItem(W.W_CRYSTAL, 235 QtGui.QStandardItem(str(params['fill']))) 236 self.model.setItem(W.W_POLY, 237 QtGui.QStandardItem(str(params['A']))) 238 self.model.setItem(W.W_PERIOD, 239 QtGui.QStandardItem(str(params['max']))) 240 self._realplot.data = transforms 241 self._realplot.draw_real_space() 233 self.model.setItem(W.W_CORETHICK, QtGui.QStandardItem("{:.3g}".format(params['d0']))) 234 self.model.setItem(W.W_INTTHICK, QtGui.QStandardItem("{:.3g}".format(params['dtr']))) 235 self.model.setItem(W.W_HARDBLOCK, QtGui.QStandardItem("{:.3g}".format(params['Lc']))) 236 self.model.setItem(W.W_CRYSTAL, QtGui.QStandardItem("{:.3g}".format(params['fill']))) 237 self.model.setItem(W.W_POLY, QtGui.QStandardItem("{:.3g}".format(params['A']))) 238 self.model.setItem(W.W_PERIOD, QtGui.QStandardItem("{:.3g}".format(params['max']))) 239 #self._realplot.data = transforms 240 241 self.update_real_space_plot(transforms) 242 243 #self._realplot.draw_real_space() 244 245 def update_real_space_plot(self, datas): 246 """take the datas tuple and create a plot in DE""" 247 248 assert isinstance(datas, tuple) 249 plot_id = id(self) 250 titles = ['1D Correlation', '3D Correlation', 'Interface Distribution Function'] 251 for i, plot in enumerate(datas): 252 plot_to_add = self.parent.createGuiData(plot) 253 # set plot properties 254 title = plot_to_add.title 255 plot_to_add.scale = 'linear' 256 plot_to_add.symbol = 'Line' 257 plot_to_add._xaxis = "x" 258 plot_to_add._xunit = "A" 259 plot_to_add._yaxis = "\Gamma" 260 if i < len(titles): 261 title = titles[i] 262 plot_to_add.name = titles[i] 263 GuiUtils.updateModelItemWithPlot(self._model_item, plot_to_add, title) 264 #self.axes.set_xlim(min(data1.x), max(data1.x) / 4) 265 pass 242 266 243 267 def setup_mapper(self): … … 247 271 self.mapper.setModel(self.model) 248 272 249 self.mapper.addMapping(self. qMin, W.W_QMIN)250 self.mapper.addMapping(self. qMax1, W.W_QMAX)251 self.mapper.addMapping(self. qMax2, W.W_QCUTOFF)252 self.mapper.addMapping(self. bg, W.W_BACKGROUND)253 self.mapper.addMapping(self.transformCombo, W.W_TRANSFORM)254 255 self.mapper.addMapping(self. guinierA, W.W_GUINIERA)256 self.mapper.addMapping(self. guinierB, W.W_GUINIERB)257 self.mapper.addMapping(self. porodK, W.W_PORODK)258 self.mapper.addMapping(self. porodSigma, W.W_PORODSIGMA)259 260 self.mapper.addMapping(self. avgCoreThick, W.W_CORETHICK)261 self.mapper.addMapping(self. avgIntThick, W.W_INTTHICK)262 self.mapper.addMapping(self. avgHardBlock, W.W_HARDBLOCK)263 self.mapper.addMapping(self. polydisp, W.W_POLY)264 self.mapper.addMapping(self. longPeriod, W.W_PERIOD)265 self.mapper.addMapping(self. localCrystal, W.W_CRYSTAL)273 self.mapper.addMapping(self.txtLowerQMax, W.W_QMIN) 274 self.mapper.addMapping(self.txtUpperQMin, W.W_QMAX) 275 self.mapper.addMapping(self.txtUpperQMax, W.W_QCUTOFF) 276 self.mapper.addMapping(self.txtBackground, W.W_BACKGROUND) 277 #self.mapper.addMapping(self.transformCombo, W.W_TRANSFORM) 278 279 self.mapper.addMapping(self.txtGuinierA, W.W_GUINIERA) 280 self.mapper.addMapping(self.txtGuinierB, W.W_GUINIERB) 281 self.mapper.addMapping(self.txtPorodK, W.W_PORODK) 282 self.mapper.addMapping(self.txtPorodSigma, W.W_PORODSIGMA) 283 284 self.mapper.addMapping(self.txtAvgCoreThick, W.W_CORETHICK) 285 self.mapper.addMapping(self.txtAvgIntThick, W.W_INTTHICK) 286 self.mapper.addMapping(self.txtAvgHardBlock, W.W_HARDBLOCK) 287 self.mapper.addMapping(self.txtPolydisp, W.W_POLY) 288 self.mapper.addMapping(self.txtLongPeriod, W.W_PERIOD) 289 self.mapper.addMapping(self.txtLocalCrystal, W.W_CRYSTAL) 266 290 267 291 self.mapper.toFirst() … … 272 296 try: 273 297 background = self._calculator.compute_background() 274 temp = QtGui.QStandardItem( str(background))298 temp = QtGui.QStandardItem("{:.4g}".format(background)) 275 299 self.model.setItem(W.W_BACKGROUND, temp) 276 300 except (LinAlgError, ValueError): … … 304 328 model_item = data_item[0] 305 329 data = GuiUtils.dataFromItem(model_item) 330 self._model_item = model_item 306 331 self._calculator.set_data(data) 307 self.c alculateBgBtn.setEnabled(True)308 self. extrapolateBtn.setEnabled(True)332 self.cmdCalculateBg.setEnabled(True) 333 self.cmdExtrapolate.setEnabled(True) 309 334 310 335 self.model.setItem(W.W_GUINIERA, QtGui.QStandardItem("")) … … 322 347 self._canvas.extrap = None 323 348 self._canvas.draw_q_space() 324 self. transformBtn.setEnabled(False)325 326 self._realplot.data = None327 self._realplot.draw_real_space()349 self.cmdTransform.setEnabled(False) 350 351 #self._realplot.data = None 352 #self._realplot.draw_real_space() 328 353 329 354 def setClosable(self, value=True): -
src/sas/qtgui/Perspectives/Corfunc/UI/CorfuncPanel.ui
rd4881f6a rcb4d219 7 7 <x>0</x> 8 8 <y>0</y> 9 <width> 738</width>10 <height> 633</height>9 <width>461</width> 10 <height>568</height> 11 11 </rect> 12 12 </property> … … 14 14 <string>Dialog</string> 15 15 </property> 16 <layout class="QGridLayout" name="gridLayout ">17 <item row=" 1" column="0">18 <layout class="QVBoxLayout" name=" verticalLayout_7" stretch="1,0,0,0,0,0,0">16 <layout class="QGridLayout" name="gridLayout_8"> 17 <item row="0" column="0"> 18 <layout class="QVBoxLayout" name="mainVerticalLayout"> 19 19 <item> 20 20 <spacer name="verticalSpacer"> … … 25 25 <size> 26 26 <width>20</width> 27 <height> 40</height>27 <height>38</height> 28 28 </size> 29 29 </property> … … 31 31 </item> 32 32 <item> 33 <layout class="QHBoxLayout" name="horizontalLayout_2"> 34 <item> 35 <layout class="QVBoxLayout" name="verticalLayout_3"> 36 <item alignment="Qt::AlignHCenter"> 37 <widget class="QLabel" name="label_8"> 38 <property name="text"> 39 <string>Guinier</string> 40 </property> 41 </widget> 42 </item> 43 <item> 44 <layout class="QFormLayout" name="formLayout_2"> 33 <widget class="QGroupBox" name="groupBox"> 34 <property name="title"> 35 <string>I(q) data source</string> 36 </property> 37 <layout class="QGridLayout" name="gridLayout_6"> 38 <item row="0" column="0"> 39 <layout class="QHBoxLayout" name="horizontalLayout_4"> 40 <item> 41 <widget class="QLabel" name="lblName"> 42 <property name="text"> 43 <string>Name:</string> 44 </property> 45 </widget> 46 </item> 47 <item> 48 <widget class="QLineEdit" name="txtFilename"> 49 <property name="enabled"> 50 <bool>false</bool> 51 </property> 52 <property name="frame"> 53 <bool>false</bool> 54 </property> 55 <property name="readOnly"> 56 <bool>false</bool> 57 </property> 58 </widget> 59 </item> 60 </layout> 61 </item> 62 <item row="1" column="0"> 63 <widget class="QGroupBox" name="groupBox_2"> 64 <property name="title"> 65 <string>Lower Q range</string> 66 </property> 67 <layout class="QGridLayout" name="gridLayout"> 45 68 <item row="0" column="0"> 46 <widget class="QLineEdit" name="guinierA"> 47 <property name="readOnly"> 48 <bool>true</bool> 49 </property> 50 </widget> 51 </item> 52 <item row="0" column="1"> 53 <widget class="QLabel" name="label_6"> 54 <property name="text"> 55 <string>A</string> 56 </property> 57 </widget> 58 </item> 59 <item row="1" column="0"> 60 <widget class="QLineEdit" name="guinierB"> 61 <property name="readOnly"> 62 <bool>true</bool> 63 </property> 64 </widget> 65 </item> 66 <item row="1" column="1"> 67 <widget class="QLabel" name="label_7"> 68 <property name="text"> 69 <string>B</string> 70 </property> 71 </widget> 69 <layout class="QHBoxLayout" name="horizontalLayout"> 70 <item> 71 <widget class="QLabel" name="lblTotalQMin"> 72 <property name="text"> 73 <string>Min:</string> 74 </property> 75 </widget> 76 </item> 77 <item> 78 <widget class="QLineEdit" name="txtLowerQMin"> 79 <property name="enabled"> 80 <bool>true</bool> 81 </property> 82 </widget> 83 </item> 84 <item> 85 <widget class="QLabel" name="lblTotalQMax"> 86 <property name="text"> 87 <string>Max:</string> 88 </property> 89 </widget> 90 </item> 91 <item> 92 <widget class="QLineEdit" name="txtLowerQMax"> 93 <property name="enabled"> 94 <bool>true</bool> 95 </property> 96 </widget> 97 </item> 98 <item> 99 <widget class="QLabel" name="lblTotalQUnits"> 100 <property name="text"> 101 <string><html><head/><body><p>Ã 102 <span style=" vertical-align:super;">-1</span></p></body></html></string> 103 </property> 104 </widget> 105 </item> 106 </layout> 72 107 </item> 73 108 </layout> 74 </item> 75 </layout> 76 </item> 77 <item> 78 <layout class="QVBoxLayout" name="verticalLayout_4"> 79 <item alignment="Qt::AlignHCenter"> 80 <widget class="QLabel" name="label_9"> 81 <property name="text"> 82 <string>Porod</string> 83 </property> 84 </widget> 85 </item> 86 <item> 87 <layout class="QFormLayout" name="formLayout_3"> 109 </widget> 110 </item> 111 <item row="2" column="0"> 112 <widget class="QGroupBox" name="groupBox_6"> 113 <property name="title"> 114 <string>Upper Q range</string> 115 </property> 116 <layout class="QGridLayout" name="gridLayout_5"> 88 117 <item row="0" column="0"> 89 <widget class="QLineEdit" name="porodK"> 90 <property name="readOnly"> 91 <bool>true</bool> 92 </property> 93 </widget> 94 </item> 95 <item row="0" column="1"> 96 <widget class="QLabel" name="label_10"> 97 <property name="text"> 98 <string>K</string> 99 </property> 100 </widget> 101 </item> 102 <item row="1" column="0"> 103 <widget class="QLineEdit" name="porodSigma"> 104 <property name="readOnly"> 105 <bool>true</bool> 106 </property> 107 </widget> 108 </item> 109 <item row="1" column="1"> 110 <widget class="QLabel" name="label_11"> 111 <property name="text"> 112 <string> Ï </string> 113 </property> 114 </widget> 118 <layout class="QHBoxLayout" name="horizontalLayout_3"> 119 <item> 120 <widget class="QLabel" name="lblTotalQMin_2"> 121 <property name="text"> 122 <string>Min:</string> 123 </property> 124 </widget> 125 </item> 126 <item> 127 <widget class="QLineEdit" name="txtUpperQMin"> 128 <property name="enabled"> 129 <bool>true</bool> 130 </property> 131 </widget> 132 </item> 133 <item> 134 <widget class="QLabel" name="lblTotalQMax_2"> 135 <property name="text"> 136 <string>Max:</string> 137 </property> 138 </widget> 139 </item> 140 <item> 141 <widget class="QLineEdit" name="txtUpperQMax"> 142 <property name="enabled"> 143 <bool>true</bool> 144 </property> 145 </widget> 146 </item> 147 <item> 148 <widget class="QLabel" name="lblTotalQUnits_2"> 149 <property name="text"> 150 <string><html><head/><body><p>Ã 151 <span style=" vertical-align:super;">-1</span></p></body></html></string> 152 </property> 153 </widget> 154 </item> 155 </layout> 115 156 </item> 116 157 </layout> 117 </item> 118 </layout> 119 </item> 120 </layout> 121 </item> 122 <item> 123 <widget class="QFrame" name="frame"> 124 <property name="frameShape"> 125 <enum>QFrame::StyledPanel</enum> 126 </property> 127 <property name="frameShadow"> 128 <enum>QFrame::Raised</enum> 129 </property> 130 <property name="lineWidth"> 131 <number>5</number> 132 </property> 158 </widget> 159 </item> 160 </layout> 133 161 </widget> 134 162 </item> 135 163 <item> 136 <widget class="Line" name="line"> 137 <property name="orientation"> 138 <enum>Qt::Horizontal</enum> 139 </property> 164 <widget class="QGroupBox" name="groupBox_4"> 165 <property name="title"> 166 <string>Extrapolation parameters</string> 167 </property> 168 <layout class="QGridLayout" name="gridLayout_4"> 169 <item row="0" column="0"> 170 <layout class="QFormLayout" name="formLayout_2"> 171 <item row="0" column="0"> 172 <widget class="QLabel" name="label_8"> 173 <property name="text"> 174 <string>Guinier</string> 175 </property> 176 <property name="alignment"> 177 <set>Qt::AlignJustify|Qt::AlignVCenter</set> 178 </property> 179 </widget> 180 </item> 181 <item row="1" column="0"> 182 <layout class="QHBoxLayout" name="horizontalLayout_7"> 183 <item> 184 <widget class="QLabel" name="label_6"> 185 <property name="text"> 186 <string>A</string> 187 </property> 188 </widget> 189 </item> 190 <item> 191 <widget class="QLineEdit" name="txtGuinierA"> 192 <property name="readOnly"> 193 <bool>true</bool> 194 </property> 195 </widget> 196 </item> 197 </layout> 198 </item> 199 <item row="2" column="0"> 200 <layout class="QHBoxLayout" name="horizontalLayout_2"> 201 <item> 202 <widget class="QLabel" name="label_7"> 203 <property name="text"> 204 <string>B</string> 205 </property> 206 </widget> 207 </item> 208 <item> 209 <widget class="QLineEdit" name="txtGuinierB"> 210 <property name="readOnly"> 211 <bool>true</bool> 212 </property> 213 </widget> 214 </item> 215 </layout> 216 </item> 217 </layout> 218 </item> 219 <item row="0" column="1"> 220 <layout class="QVBoxLayout" name="verticalLayout"> 221 <item> 222 <widget class="QLabel" name="label_9"> 223 <property name="text"> 224 <string>Porod</string> 225 </property> 226 </widget> 227 </item> 228 <item> 229 <layout class="QFormLayout" name="formLayout"> 230 <item row="0" column="0"> 231 <widget class="QLabel" name="label_10"> 232 <property name="text"> 233 <string>K</string> 234 </property> 235 </widget> 236 </item> 237 <item row="0" column="1"> 238 <widget class="QLineEdit" name="txtPorodK"> 239 <property name="readOnly"> 240 <bool>true</bool> 241 </property> 242 </widget> 243 </item> 244 <item row="1" column="0"> 245 <widget class="QLabel" name="label_11"> 246 <property name="text"> 247 <string> Ï </string> 248 </property> 249 </widget> 250 </item> 251 <item row="1" column="1"> 252 <widget class="QLineEdit" name="txtPorodSigma"> 253 <property name="readOnly"> 254 <bool>true</bool> 255 </property> 256 </widget> 257 </item> 258 </layout> 259 </item> 260 </layout> 261 </item> 262 </layout> 140 263 </widget> 141 264 </item> 142 265 <item> 143 <layout class="QGridLayout" name="gridLayout_2"> 144 <item row="0" column="1"> 145 <widget class="QLabel" name="label_14"> 266 <widget class="QGroupBox" name="groupBox_5"> 267 <property name="title"> 268 <string>Background</string> 269 </property> 270 <layout class="QGridLayout" name="gridLayout_7"> 271 <item row="0" column="0"> 272 <layout class="QHBoxLayout" name="horizontalLayout_6"> 273 <item> 274 <widget class="QPushButton" name="cmdCalculateBg"> 275 <property name="text"> 276 <string>Calculate</string> 277 </property> 278 </widget> 279 </item> 280 <item> 281 <widget class="QLabel" name="label"> 282 <property name="text"> 283 <string>background</string> 284 </property> 285 </widget> 286 </item> 287 <item> 288 <widget class="QLineEdit" name="txtBackground"/> 289 </item> 290 <item> 291 <spacer name="horizontalSpacer_2"> 292 <property name="orientation"> 293 <enum>Qt::Horizontal</enum> 294 </property> 295 <property name="sizeHint" stdset="0"> 296 <size> 297 <width>40</width> 298 <height>20</height> 299 </size> 300 </property> 301 </spacer> 302 </item> 303 </layout> 304 </item> 305 </layout> 306 </widget> 307 </item> 308 <item> 309 <widget class="QGroupBox" name="groupBox_3"> 310 <property name="title"> 311 <string>Output parameters</string> 312 </property> 313 <layout class="QGridLayout" name="gridLayout_3"> 314 <item row="0" column="0"> 315 <layout class="QGridLayout" name="gridLayout_2"> 316 <item row="0" column="0"> 317 <widget class="QLabel" name="label_14"> 318 <property name="text"> 319 <string>Long Period</string> 320 </property> 321 </widget> 322 </item> 323 <item row="0" column="1"> 324 <widget class="QLineEdit" name="txtLongPeriod"/> 325 </item> 326 <item row="0" column="2"> 327 <widget class="QLabel" name="label_15"> 328 <property name="text"> 329 <string>Average Interface Thickness</string> 330 </property> 331 </widget> 332 </item> 333 <item row="0" column="3"> 334 <widget class="QLineEdit" name="txtAvgIntThick"/> 335 </item> 336 <item row="1" column="0"> 337 <widget class="QLabel" name="label_16"> 338 <property name="text"> 339 <string>Average Hard Block Thickness</string> 340 </property> 341 </widget> 342 </item> 343 <item row="1" column="1"> 344 <widget class="QLineEdit" name="txtAvgHardBlock"/> 345 </item> 346 <item row="1" column="2"> 347 <widget class="QLabel" name="label_17"> 348 <property name="text"> 349 <string>Average Core Thickness</string> 350 </property> 351 </widget> 352 </item> 353 <item row="1" column="3"> 354 <widget class="QLineEdit" name="txtAvgCoreThick"/> 355 </item> 356 <item row="2" column="0"> 357 <widget class="QLabel" name="label_18"> 358 <property name="text"> 359 <string>Polydispersity</string> 360 </property> 361 </widget> 362 </item> 363 <item row="2" column="1"> 364 <widget class="QLineEdit" name="txtPolydisp"/> 365 </item> 366 <item row="2" column="2"> 367 <widget class="QLabel" name="label_19"> 368 <property name="text"> 369 <string>Local Crystallinity</string> 370 </property> 371 </widget> 372 </item> 373 <item row="2" column="3"> 374 <widget class="QLineEdit" name="txtLocalCrystal"/> 375 </item> 376 </layout> 377 </item> 378 </layout> 379 </widget> 380 </item> 381 <item> 382 <layout class="QHBoxLayout" name="horizontalLayout_5"> 383 <item> 384 <widget class="QPushButton" name="cmdExtrapolate"> 146 385 <property name="text"> 147 <string> Long Period</string>386 <string>Extrapolate</string> 148 387 </property> 149 388 </widget> 150 389 </item> 151 <item row="0" column="2"> 152 <widget class="QLineEdit" name="avgIntThick"/> 153 </item> 154 <item row="0" column="3"> 155 <widget class="QLabel" name="label_15"> 390 <item> 391 <widget class="QPushButton" name="cmdTransform"> 156 392 <property name="text"> 157 <string> Average Interface Thickness</string>393 <string>Transform</string> 158 394 </property> 159 395 </widget> 160 396 </item> 161 <item row="1" column="0"> 162 <widget class="QLineEdit" name="avgHardBlock"/> 397 <item> 398 <spacer name="horizontalSpacer"> 399 <property name="orientation"> 400 <enum>Qt::Horizontal</enum> 401 </property> 402 <property name="sizeHint" stdset="0"> 403 <size> 404 <width>40</width> 405 <height>20</height> 406 </size> 407 </property> 408 </spacer> 163 409 </item> 164 <item row="1" column="1">165 <widget class="Q Label" name="label_16">410 <item> 411 <widget class="QPushButton" name="cmdHelp"> 166 412 <property name="text"> 167 <string> Average Hard Block Thickness</string>413 <string>Help</string> 168 414 </property> 169 415 </widget> 170 </item>171 <item row="1" column="2">172 <widget class="QLineEdit" name="avgCoreThick"/>173 </item>174 <item row="1" column="3">175 <widget class="QLabel" name="label_17">176 <property name="text">177 <string>Average Core Thickness</string>178 </property>179 </widget>180 </item>181 <item row="2" column="0">182 <widget class="QLineEdit" name="polydisp"/>183 </item>184 <item row="2" column="1">185 <widget class="QLabel" name="label_18">186 <property name="text">187 <string>Polydispersity</string>188 </property>189 </widget>190 </item>191 <item row="2" column="2">192 <widget class="QLineEdit" name="localCrystal"/>193 </item>194 <item row="2" column="3">195 <widget class="QLabel" name="label_19">196 <property name="text">197 <string>Local Crystallinity</string>198 </property>199 </widget>200 </item>201 <item row="0" column="0">202 <widget class="QLineEdit" name="longPeriod"/>203 </item>204 </layout>205 </item>206 <item>207 <widget class="Line" name="line_2">208 <property name="orientation">209 <enum>Qt::Horizontal</enum>210 </property>211 </widget>212 </item>213 <item>214 <layout class="QHBoxLayout" name="horizontalLayout_3">215 <item>216 <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1">217 <item alignment="Qt::AlignHCenter">218 <widget class="QLabel" name="label_3">219 <property name="text">220 <string>Controls</string>221 </property>222 </widget>223 </item>224 <item>225 <layout class="QGridLayout" name="gridLayout_3">226 <property name="sizeConstraint">227 <enum>QLayout::SetMinimumSize</enum>228 </property>229 <item row="1" column="3">230 <widget class="QLabel" name="label_12">231 <property name="text">232 <string>Background</string>233 </property>234 </widget>235 </item>236 <item row="0" column="0">237 <widget class="QLineEdit" name="qMin">238 <property name="toolTip">239 <string>Values with q < qmin will be used for Guinier back extrapolation</string>240 </property>241 </widget>242 </item>243 <item row="0" column="1">244 <widget class="QLabel" name="label">245 <property name="text">246 <string>Lower</string>247 </property>248 </widget>249 </item>250 <item row="1" column="0">251 <widget class="QLineEdit" name="qMax1">252 <property name="toolTip">253 <string>Values with Uppder < q < Cutoff will be used for Porod forward extrapolation</string>254 </property>255 </widget>256 </item>257 <item row="1" column="1">258 <widget class="QLabel" name="label_2">259 <property name="text">260 <string>Upper</string>261 </property>262 </widget>263 </item>264 <item row="0" column="3">265 <widget class="QLabel" name="label_5">266 <property name="text">267 <string>Transform Type</string>268 </property>269 </widget>270 </item>271 <item row="2" column="1">272 <widget class="QLabel" name="label_4">273 <property name="text">274 <string>Cutoff</string>275 </property>276 </widget>277 </item>278 <item row="0" column="2">279 <widget class="QComboBox" name="transformCombo">280 <item>281 <property name="text">282 <string>Fourier</string>283 </property>284 </item>285 </widget>286 </item>287 <item row="1" column="2">288 <widget class="QLineEdit" name="bg">289 </widget>290 </item>291 <item row="2" column="0">292 <widget class="QLineEdit" name="qMax2">293 <property name="toolTip">294 <string>Values with Uppder < q < Cutoff will be used for Porod forward extrapolation</string>295 </property>296 </widget>297 </item>298 <item row="2" column="2" colspan="2">299 <widget class="QPushButton" name="calculateBgBtn">300 <property name="text">301 <string>Calculate Background</string>302 </property>303 </widget>304 </item>305 <item row="0" column="4">306 <widget class="QPushButton" name="extrapolateBtn">307 <property name="text">308 <string>Extrapolate</string>309 </property>310 </widget>311 </item>312 <item row="1" column="4">313 <widget class="QPushButton" name="transformBtn">314 <property name="text">315 <string>Transform</string>316 </property>317 </widget>318 </item>319 </layout>320 </item>321 </layout>322 416 </item> 323 417 </layout> -
src/sas/qtgui/Plotting/Plotter.py
rf1f3e6a rcb4d219 49 49 """ data setter """ 50 50 self._data = value 51 self.xLabel = "%s(%s)"%(value._xaxis, value._xunit) 52 self.yLabel = "%s(%s)"%(value._yaxis, value._yunit) 53 if value.isSesans: 51 if value._xunit: 52 self.xLabel = "%s(%s)"%(value._xaxis, value._xunit) 53 else: 54 self.xLabel = "%s"%(value._xaxis) 55 if value._yunit: 56 self.yLabel = "%s(%s)"%(value._yaxis, value._yunit) 57 else: 58 self.yLabel = "%s"%(value._yaxis) 59 60 if value.scale == 'linear' or value.isSesans: 54 61 self.xscale = 'linear' 55 62 self.yscale = 'linear' … … 83 90 # Try name first 84 91 try: 85 marker = PlotUtilities.SHAPES[marker]92 marker = dict(PlotUtilities.SHAPES)[marker] 86 93 except KeyError: 87 marker =list(PlotUtilities.SHAPES.values())[marker]94 list(PlotUtilities.SHAPES.values())[marker] 88 95 89 96 assert marker is not None -
src/sas/qtgui/Utilities/GuiUtils.py
r0261bc1 rcb4d219 243 243 """ 244 244 assert isinstance(item, QtGui.QStandardItem) 245 py_update_data = update_data246 245 247 246 # Check if data with the same ID is already present … … 250 249 if plot_item.isCheckable(): 251 250 plot_data = plot_item.child(0).data() 252 if plot_data.id is not None and plot_data.id == py_update_data.id:251 if plot_data.id is not None and plot_data.id == update_data.id: 253 252 # replace data section in item 254 253 plot_item.child(0).setData(update_data) 255 254 plot_item.setText(name) 256 # Plot title 257 plot_item.child(1).child(0).setText("Title: %s"%name) 255 # Plot title if any 256 if plot_item.child(1).hasChildren(): 257 plot_item.child(1).child(0).setText("Title: %s"%name) 258 258 # Force redisplay 259 259 return … … 884 884 input = input.replace(",", "") 885 885 886 886 887 def enum(*sequential, **named): 887 888 """Create an enumeration object from a list of strings"""
Note: See TracChangeset
for help on using the changeset viewer.