Changeset 6a3e1fe in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Nov 17, 2017 8:59:52 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:
- 0261bc1
- Parents:
- 84df556
- Location:
- src/sas/qtgui/Perspectives/Inversion
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Inversion/DMaxExplorerWidget.py
- Property mode changed from 100755 to 100644
rd4881f6a r6a3e1fe 24 24 25 25 # local 26 from .UI.dmax import Ui_DmaxExplorer 27 # from InvariantDetails import DetailsDialog 28 # from InvariantUtils import WIDGETS 26 from .UI.DMaxExplorer import Ui_DmaxExplorer 29 27 30 28 logger = logging.getLogger(__name__) … … 78 76 def setupModel(self): 79 77 self.model.setItem(W.NPTS, QtGui.QStandardItem(str(self.nfunc))) 80 self.model.setItem(W.DMIN, 81 QtGui.QStandardItem( 82 str(0.9*self.pr_state.d_max))) 83 self.model.setItem(W.DMAX, 84 QtGui.QStandardItem( 85 str(1.1*self.pr_state.d_max))) 86 self.model.setItem(W.VARIABLE, 87 QtGui.QStandardItem( "ϲ/dof")) 78 self.model.setItem(W.DMIN, QtGui.QStandardItem(str(0.9*self.pr_state.d_max))) 79 self.model.setItem(W.DMAX, QtGui.QStandardItem(str(1.1*self.pr_state.d_max))) 80 self.model.setItem(W.VARIABLE, QtGui.QStandardItem( "ϲ/dof")) 88 81 89 82 def setupMapper(self): … … 133 126 msg += "for D_max=%s\n%s" % (str(x), sys.exc_info()[1]) 134 127 print(msg) 135 #logger.error(msg)128 logger.error(msg) 136 129 137 130 #Return the invertor to its original state 138 131 self.pr_state.d_max = original 139 self.pr_state.invert(self.nfunc) 132 try: 133 self.pr_state.invert(self.nfunc) 134 except RuntimeError as ex: 135 msg = "ExploreDialog: inversion failed " 136 msg += "for D_max=%s\n%s" % (str(x), sys.exc_info()[1]) 137 print(msg) 138 logger.error(msg) 140 139 141 140 plotter = str(self.model.item(W.VARIABLE).text()) -
src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py
- Property mode changed from 100755 to 100644
rd4881f6a r6a3e1fe 132 132 """Connect the use controls to their appropriate methods""" 133 133 self.dataList.currentIndexChanged.connect(self.displayChange) 134 self.calculateAllButton.clicked.connect(self.startThreadAll)135 self.calculateThisButton.clicked.connect(self.startThread)134 #self.calculateAllButton.clicked.connect(self.startThreadAll) 135 #self.calculateThisButton.clicked.connect(self.startThread) 136 136 self.removeButton.clicked.connect(self.removeData) 137 137 self.helpButton.clicked.connect(self.help) … … 208 208 # Main Buttons 209 209 self.mapper.addMapping(self.removeButton, WIDGETS.W_REMOVE) 210 self.mapper.addMapping(self.calculateAllButton, WIDGETS.W_CALCULATE_ALL)211 self.mapper.addMapping(self.calculateThisButton,212 WIDGETS.W_CALCULATE_VISIBLE)210 #self.mapper.addMapping(self.calculateAllButton, WIDGETS.W_CALCULATE_ALL) 211 #self.mapper.addMapping(self.calculateThisButton, 212 # WIDGETS.W_CALCULATE_VISIBLE) 213 213 self.mapper.addMapping(self.helpButton, WIDGETS.W_HELP) 214 214 … … 269 269 self.removeButton.setEnabled(self.logic.data_is_loaded) 270 270 self.explorerButton.setEnabled(self.logic.data_is_loaded) 271 self.calculateAllButton.setEnabled(self.logic.data_is_loaded)272 self.calculateThisButton.setEnabled(self.logic.data_is_loaded)271 #self.calculateAllButton.setEnabled(self.logic.data_is_loaded) 272 #self.calculateThisButton.setEnabled(self.logic.data_is_loaded) 273 273 274 274 def populateDataComboBox(self, filename, data_ref): … … 278 278 :param data_ref: QStandardItem reference for data set to be added 279 279 """ 280 qt_item = QtCore.QString.fromUtf8(filename) 281 ref = QtCore.QVariant(data_ref) 282 self.dataList.addItem(qt_item, ref) 280 self.dataList.addItem(filename, data_ref) 283 281 284 282 def acceptNoTerms(self): … … 294 292 def displayChange(self): 295 293 variant_ref = self.dataList.itemData(self.dataList.currentIndex()) 296 self.setCurrentData(variant_ref .toPyObject())294 self.setCurrentData(variant_ref) 297 295 298 296 def removeData(self): … … 326 324 if self.pr_plot is not None: 327 325 title = self.pr_plot.name 328 GuiUtils.updateModelItemWithPlot( 329 self._data, QtCore.QVariant(self.pr_plot), title) 326 GuiUtils.updateModelItemWithPlot(self._data, self.pr_plot, title) 330 327 if self.data_plot is not None: 331 328 title = self.data_plot.name 332 GuiUtils.updateModelItemWithPlot( 333 self._data, QtCore.QVariant(self.data_plot), title) 329 GuiUtils.updateModelItemWithPlot(self._data, self.data_plot, title) 334 330 self.mapper.toFirst() 335 331 … … 383 379 for data in data_item: 384 380 # Create initial internal mappings 385 # TODO: in PyQt5 QStandardItem no longer can be used as dict key 386 # Possibly the easiest solution is to subclass QStandardItem 387 # and reimplement __hash__() method so it can be hashed. 388 self._data_list[data] = self._calculator.clone() #<- this crashes 381 self._data_list[data] = self._calculator.clone() 389 382 self._data_set = GuiUtils.dataFromItem(data) 390 383 self.data_plot_list[data] = self.data_plot 391 384 self.pr_plot_list[data] = self.pr_plot 392 ref_var = QtCore.QVariant(data) 393 self.populateDataComboBox(self._data_set.filename, ref_var) 385 self.populateDataComboBox(self._data_set.filename, data) 394 386 self.setCurrentData(data) 395 387 … … 400 392 # Estimate q range 401 393 qmin, qmax = self.logic.computeDataRange() 402 self.model.setItem(WIDGETS.W_QMIN, QtGui.QStandardItem( 403 "{:.4g}".format(qmin))) 404 self.model.setItem(WIDGETS.W_QMAX, QtGui.QStandardItem( 405 "{:.4g}".format(qmax))) 394 self.model.setItem(WIDGETS.W_QMIN, QtGui.QStandardItem("{:.4g}".format(qmin))) 395 self.model.setItem(WIDGETS.W_QMAX, QtGui.QStandardItem("{:.4g}".format(qmax))) 406 396 407 397 self.enableButtons() … … 409 399 def getNFunc(self): 410 400 """Get the n_func value from the GUI object""" 411 return int( UI.TabbedInversionUI._fromUtf8(self.noOfTermsInput.text()))401 return int(self.noOfTermsInput.text()) 412 402 413 403 def setCurrentData(self, data_ref): 414 404 """Get the current data and display as necessary""" 405 406 if data_ref is None: 407 return 415 408 416 409 if not isinstance(data_ref, QtGui.QStandardItem): … … 424 417 self.pr_plot = self.pr_plot_list[data_ref] 425 418 self.data_plot = self.data_plot_list[data_ref] 419 # Rerun the calculations for the current set 420 self.startThread() 421 self.model_changed() 426 422 427 423 ###################################################################### … … 512 508 """ 513 509 # Save useful info 514 self.model.setItem(WIDGETS.W_COMP_TIME, 515 QtGui.QStandardItem(str(elapsed))) 516 self.regConstantSuggestionButton.setText(QtCore.QString(str(alpha))) 510 self.model.setItem(WIDGETS.W_COMP_TIME, QtGui.QStandardItem(str(elapsed))) 511 self.regConstantSuggestionButton.setText("{:-3.2g}".format(alpha)) 517 512 self.regConstantSuggestionButton.setEnabled(True) 518 513 if message: … … 531 526 """ 532 527 # Save useful info 533 self.noOfTermsSuggestionButton.setText(QtCore.QString( 534 "{:n}".format(nterms))) 528 self.noOfTermsSuggestionButton.setText("{:n}".format(nterms)) 535 529 self.noOfTermsSuggestionButton.setEnabled(True) 536 self.regConstantSuggestionButton.setText(QtCore.QString( 537 "{:.3g}".format(alpha))) 530 self.regConstantSuggestionButton.setText("{:.3g}".format(alpha)) 538 531 self.regConstantSuggestionButton.setEnabled(True) 539 self.model.setItem(WIDGETS.W_COMP_TIME, 540 QtGui.QStandardItem(str(elapsed))) 541 self.PrTabWidget.setCurrentIndex(0) 532 self.model.setItem(WIDGETS.W_COMP_TIME, QtGui.QStandardItem(str(elapsed))) 533 #self.PrTabWidget.setCurrentIndex(0) 542 534 if message: 543 535 logging.info(message) … … 563 555 # TODO: Connect self._calculator to GUI - two-to-one connection possible? 564 556 self.model.setItem(WIDGETS.W_RG, QtGui.QStandardItem(str(pr.rg(out)))) 565 self.model.setItem(WIDGETS.W_I_ZERO, 566 QtGui.QStandardItem(str(pr.iq0(out)))) 557 self.model.setItem(WIDGETS.W_I_ZERO, QtGui.QStandardItem(str(pr.iq0(out)))) 567 558 self.model.setItem(WIDGETS.W_BACKGROUND_INPUT, 568 559 QtGui.QStandardItem("{:.3f}".format(pr.est_bck))) 569 self.model.setItem(WIDGETS.W_BACKGROUND_OUTPUT, 570 QtGui.QStandardItem(str(pr.background))) 571 self.model.setItem(WIDGETS.W_CHI_SQUARED, 572 QtGui.QStandardItem(str(pr.chi2[0]))) 573 self.model.setItem(WIDGETS.W_COMP_TIME, 574 QtGui.QStandardItem(str(elapsed))) 575 self.model.setItem(WIDGETS.W_OSCILLATION, 576 QtGui.QStandardItem(str(pr.oscillations(out)))) 577 self.model.setItem(WIDGETS.W_POS_FRACTION, 578 QtGui.QStandardItem(str(pr.get_positive(out)))) 560 self.model.setItem(WIDGETS.W_BACKGROUND_OUTPUT, QtGui.QStandardItem(str(pr.background))) 561 self.model.setItem(WIDGETS.W_CHI_SQUARED, QtGui.QStandardItem(str(pr.chi2[0]))) 562 self.model.setItem(WIDGETS.W_COMP_TIME, QtGui.QStandardItem(str(elapsed))) 563 self.model.setItem(WIDGETS.W_OSCILLATION, QtGui.QStandardItem(str(pr.oscillations(out)))) 564 self.model.setItem(WIDGETS.W_POS_FRACTION, QtGui.QStandardItem(str(pr.get_positive(out)))) 579 565 self.model.setItem(WIDGETS.W_SIGMA_POS_FRACTION, 580 566 QtGui.QStandardItem(str(pr.get_pos_err(out, cov)))) 581 567 582 568 # Display results tab 583 self.PrTabWidget.setCurrentIndex(1)569 #self.PrTabWidget.setCurrentIndex(1) 584 570 # Save Pr invertor 585 571 self._calculator = pr -
src/sas/qtgui/Perspectives/Inversion/UI/TabbedInversionUI.ui
rfa81e94 r6a3e1fe 32 32 <string>P(r) Inversion</string> 33 33 </property> 34 <layout class="QGridLayout" name="gridLayout_7"> 35 <item row="4" column="0"> 34 <layout class="QGridLayout" name="gridLayout_6"> 35 <item row="0" column="0"> 36 <widget class="QTabWidget" name="PrTabWidget"> 37 <property name="sizePolicy"> 38 <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> 39 <horstretch>0</horstretch> 40 <verstretch>0</verstretch> 41 </sizepolicy> 42 </property> 43 <property name="minimumSize"> 44 <size> 45 <width>0</width> 46 <height>0</height> 47 </size> 48 </property> 49 <property name="currentIndex"> 50 <number>0</number> 51 </property> 52 <widget class="QWidget" name="tabMain"> 53 <attribute name="title"> 54 <string>P(r) Parameters</string> 55 </attribute> 56 <layout class="QGridLayout" name="gridLayout_5"> 57 <item row="0" column="0"> 58 <widget class="QGroupBox" name="dataSourceGroupBox"> 59 <property name="title"> 60 <string>I(q) data source</string> 61 </property> 62 <layout class="QGridLayout" name="gridLayout_2"> 63 <item row="0" column="0"> 64 <layout class="QHBoxLayout" name="horizontalLayout_2"> 65 <item> 66 <widget class="QLabel" name="label"> 67 <property name="text"> 68 <string>Data File Name:</string> 69 </property> 70 </widget> 71 </item> 72 <item> 73 <widget class="QComboBox" name="dataList"> 74 <property name="sizePolicy"> 75 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 76 <horstretch>0</horstretch> 77 <verstretch>0</verstretch> 78 </sizepolicy> 79 </property> 80 </widget> 81 </item> 82 <item> 83 <widget class="QPushButton" name="removeButton"> 84 <property name="sizePolicy"> 85 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 86 <horstretch>0</horstretch> 87 <verstretch>0</verstretch> 88 </sizepolicy> 89 </property> 90 <property name="text"> 91 <string>Remove</string> 92 </property> 93 </widget> 94 </item> 95 </layout> 96 </item> 97 <item row="1" column="0"> 98 <layout class="QHBoxLayout" name="horizontalLayout_3" stretch="2,1,0,2,2"> 99 <item> 100 <widget class="QLabel" name="label_5"> 101 <property name="text"> 102 <string>Background Level:</string> 103 </property> 104 </widget> 105 </item> 106 <item> 107 <widget class="QLineEdit" name="backgroundInput"> 108 <property name="enabled"> 109 <bool>false</bool> 110 </property> 111 <property name="text"> 112 <string>0.0</string> 113 </property> 114 </widget> 115 </item> 116 <item> 117 <widget class="QLabel" name="label_10"> 118 <property name="text"> 119 <string><html><head/><body><p>Ã 120 <span style=" vertical-align:super;">-1</span></p></body></html></string> 121 </property> 122 </widget> 123 </item> 124 <item> 125 <widget class="QRadioButton" name="estimateBgd"> 126 <property name="text"> 127 <string>Estimate</string> 128 </property> 129 </widget> 130 </item> 131 <item> 132 <widget class="QRadioButton" name="manualBgd"> 133 <property name="text"> 134 <string>Manual Input</string> 135 </property> 136 </widget> 137 </item> 138 </layout> 139 </item> 140 </layout> 141 </widget> 142 </item> 143 <item row="1" column="0"> 144 <widget class="QGroupBox" name="qRangeGroupBox"> 145 <property name="title"> 146 <string>Total Q range</string> 147 </property> 148 <layout class="QGridLayout" name="gridLayout_3"> 149 <item row="0" column="0"> 150 <layout class="QHBoxLayout" name="horizontalLayout_4"> 151 <item> 152 <widget class="QLabel" name="label_7"> 153 <property name="text"> 154 <string>Min:</string> 155 </property> 156 </widget> 157 </item> 158 <item> 159 <widget class="QLineEdit" name="minQInput"> 160 <property name="enabled"> 161 <bool>true</bool> 162 </property> 163 </widget> 164 </item> 165 <item> 166 <widget class="QLabel" name="label_11"> 167 <property name="text"> 168 <string><html><head/><body><p>Ã 169 <span style=" vertical-align:super;">-1</span></p></body></html></string> 170 </property> 171 </widget> 172 </item> 173 <item> 174 <widget class="QLabel" name="label_8"> 175 <property name="text"> 176 <string>Max:</string> 177 </property> 178 </widget> 179 </item> 180 <item> 181 <widget class="QLineEdit" name="maxQInput"> 182 <property name="enabled"> 183 <bool>true</bool> 184 </property> 185 </widget> 186 </item> 187 <item> 188 <widget class="QLabel" name="label_9"> 189 <property name="text"> 190 <string><html><head/><body><p>Ã 191 <span style=" vertical-align:super;">-1</span></p></body></html></string> 192 </property> 193 </widget> 194 </item> 195 </layout> 196 </item> 197 </layout> 198 </widget> 199 </item> 200 <item row="2" column="0"> 201 <widget class="QGroupBox" name="slitParamsGroupBox"> 202 <property name="title"> 203 <string>Slit Parameters</string> 204 </property> 205 <layout class="QGridLayout" name="gridLayout"> 206 <item row="0" column="0"> 207 <layout class="QHBoxLayout" name="horizontalLayout"> 208 <item> 209 <widget class="QLabel" name="label_3"> 210 <property name="text"> 211 <string>Height</string> 212 </property> 213 </widget> 214 </item> 215 <item> 216 <widget class="QLineEdit" name="slitHeightInput"> 217 <property name="enabled"> 218 <bool>true</bool> 219 </property> 220 </widget> 221 </item> 222 <item> 223 <widget class="QLabel" name="label_6"> 224 <property name="text"> 225 <string><html><head/><body><p>Ã 226 <span style=" vertical-align:super;">-1</span></p></body></html></string> 227 </property> 228 </widget> 229 </item> 230 <item> 231 <widget class="QLabel" name="label_4"> 232 <property name="text"> 233 <string>Width</string> 234 </property> 235 </widget> 236 </item> 237 <item> 238 <widget class="QLineEdit" name="slitWidthInput"> 239 <property name="enabled"> 240 <bool>true</bool> 241 </property> 242 </widget> 243 </item> 244 <item> 245 <widget class="QLabel" name="label_2"> 246 <property name="text"> 247 <string><html><head/><body><p>Ã 248 <span style=" vertical-align:super;">-1</span></p></body></html></string> 249 </property> 250 </widget> 251 </item> 252 </layout> 253 </item> 254 </layout> 255 </widget> 256 </item> 257 <item row="3" column="0"> 258 <widget class="QGroupBox" name="paramGroupBox"> 259 <property name="sizePolicy"> 260 <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> 261 <horstretch>0</horstretch> 262 <verstretch>0</verstretch> 263 </sizepolicy> 264 </property> 265 <property name="toolTip"> 266 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 267 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 268 p, li { white-space: pre-wrap; } 269 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> 270 <pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;><span style=" font-family:'Courier New'; font-size:9pt; color:#000000;">P(r) is found by fitting a set of base functions to I(Q). The minimization involves a regularization term to ensure a smooth P(r). The regularization constant gives the size of that term. The suggested value is the value above which the output P(r) will have only one peak.</span></pre></body></html></string> 271 </property> 272 <property name="title"> 273 <string>Parameters</string> 274 </property> 275 <layout class="QGridLayout" name="gridLayout_8"> 276 <item row="1" column="0"> 277 <widget class="QLabel" name="label_13"> 278 <property name="text"> 279 <string>Regularization constant</string> 280 </property> 281 </widget> 282 </item> 283 <item row="0" column="2"> 284 <widget class="QPushButton" name="noOfTermsSuggestionButton"> 285 <property name="enabled"> 286 <bool>false</bool> 287 </property> 288 <property name="text"> 289 <string/> 290 </property> 291 </widget> 292 </item> 293 <item row="2" column="2"> 294 <widget class="QPushButton" name="explorerButton"> 295 <property name="sizePolicy"> 296 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 297 <horstretch>0</horstretch> 298 <verstretch>0</verstretch> 299 </sizepolicy> 300 </property> 301 <property name="toolTip"> 302 <string><html><head/><body><p>Open the D<span style=" vertical-align:sub;">max</span> explorer window.</p></body></html></string> 303 </property> 304 <property name="layoutDirection"> 305 <enum>Qt::LeftToRight</enum> 306 </property> 307 <property name="text"> 308 <string>Explore</string> 309 </property> 310 </widget> 311 </item> 312 <item row="0" column="1"> 313 <widget class="QLineEdit" name="noOfTermsInput"/> 314 </item> 315 <item row="2" column="1"> 316 <widget class="QLineEdit" name="maxDistanceInput"/> 317 </item> 318 <item row="0" column="0"> 319 <widget class="QLabel" name="label_12"> 320 <property name="text"> 321 <string>Number of Terms</string> 322 </property> 323 </widget> 324 </item> 325 <item row="1" column="2"> 326 <widget class="QPushButton" name="regConstantSuggestionButton"> 327 <property name="enabled"> 328 <bool>false</bool> 329 </property> 330 <property name="text"> 331 <string/> 332 </property> 333 </widget> 334 </item> 335 <item row="2" column="0"> 336 <widget class="QLabel" name="label_14"> 337 <property name="text"> 338 <string>Max distance [Ã 339 ]</string> 340 </property> 341 </widget> 342 </item> 343 <item row="1" column="1"> 344 <widget class="QLineEdit" name="regularizationConstantInput"/> 345 </item> 346 </layout> 347 </widget> 348 </item> 349 <item row="4" column="0"> 350 <widget class="QGroupBox" name="outputsGroupBox"> 351 <property name="title"> 352 <string>Outputs</string> 353 </property> 354 <layout class="QGridLayout" name="gridLayout_4"> 355 <item row="0" column="1"> 356 <widget class="QLabel" name="label_23"> 357 <property name="text"> 358 <string>Calculated Value</string> 359 </property> 360 <property name="alignment"> 361 <set>Qt::AlignCenter</set> 362 </property> 363 </widget> 364 </item> 365 <item row="0" column="2"> 366 <widget class="QLabel" name="label_28"> 367 <property name="text"> 368 <string>Units</string> 369 </property> 370 </widget> 371 </item> 372 <item row="6" column="1"> 373 <widget class="QLineEdit" name="oscillationValue"> 374 <property name="enabled"> 375 <bool>true</bool> 376 </property> 377 <property name="readOnly"> 378 <bool>true</bool> 379 </property> 380 </widget> 381 </item> 382 <item row="3" column="0"> 383 <widget class="QLabel" name="label_17"> 384 <property name="text"> 385 <string>Background</string> 386 </property> 387 </widget> 388 </item> 389 <item row="7" column="1"> 390 <widget class="QLineEdit" name="posFractionValue"> 391 <property name="enabled"> 392 <bool>true</bool> 393 </property> 394 <property name="readOnly"> 395 <bool>true</bool> 396 </property> 397 </widget> 398 </item> 399 <item row="2" column="2"> 400 <widget class="QLabel" name="label_25"> 401 <property name="text"> 402 <string>Ã 403 -1</string> 404 </property> 405 </widget> 406 </item> 407 <item row="3" column="1"> 408 <widget class="QLineEdit" name="backgroundValue"> 409 <property name="enabled"> 410 <bool>true</bool> 411 </property> 412 <property name="readOnly"> 413 <bool>true</bool> 414 </property> 415 </widget> 416 </item> 417 <item row="1" column="0"> 418 <widget class="QLabel" name="label_15"> 419 <property name="text"> 420 <string>Rg</string> 421 </property> 422 </widget> 423 </item> 424 <item row="1" column="2"> 425 <widget class="QLabel" name="label_24"> 426 <property name="text"> 427 <string>Ã 428 </string> 429 </property> 430 </widget> 431 </item> 432 <item row="6" column="0"> 433 <widget class="QLabel" name="label_20"> 434 <property name="text"> 435 <string>Oscillations</string> 436 </property> 437 </widget> 438 </item> 439 <item row="4" column="0"> 440 <widget class="QLabel" name="label_18"> 441 <property name="text"> 442 <string>Computation Time</string> 443 </property> 444 </widget> 445 </item> 446 <item row="4" column="2"> 447 <widget class="QLabel" name="label_27"> 448 <property name="text"> 449 <string>secs</string> 450 </property> 451 </widget> 452 </item> 453 <item row="2" column="0"> 454 <widget class="QLabel" name="label_16"> 455 <property name="text"> 456 <string>I(Q=0)</string> 457 </property> 458 </widget> 459 </item> 460 <item row="3" column="2"> 461 <widget class="QLabel" name="label_26"> 462 <property name="text"> 463 <string>Ã 464 -1</string> 465 </property> 466 </widget> 467 </item> 468 <item row="0" column="0"> 469 <widget class="QLabel" name="label_22"> 470 <property name="text"> 471 <string>Parameter</string> 472 </property> 473 </widget> 474 </item> 475 <item row="8" column="0"> 476 <widget class="QLabel" name="label_29"> 477 <property name="text"> 478 <string>1-sigma positive fraction</string> 479 </property> 480 </widget> 481 </item> 482 <item row="2" column="1"> 483 <widget class="QLineEdit" name="iQ0Value"> 484 <property name="enabled"> 485 <bool>true</bool> 486 </property> 487 <property name="readOnly"> 488 <bool>true</bool> 489 </property> 490 </widget> 491 </item> 492 <item row="5" column="0"> 493 <widget class="QLabel" name="label_19"> 494 <property name="text"> 495 <string>Chi^2/dof</string> 496 </property> 497 </widget> 498 </item> 499 <item row="1" column="1"> 500 <widget class="QLineEdit" name="rgValue"> 501 <property name="enabled"> 502 <bool>true</bool> 503 </property> 504 <property name="readOnly"> 505 <bool>true</bool> 506 </property> 507 </widget> 508 </item> 509 <item row="5" column="1"> 510 <widget class="QLineEdit" name="chiDofValue"> 511 <property name="enabled"> 512 <bool>true</bool> 513 </property> 514 <property name="readOnly"> 515 <bool>true</bool> 516 </property> 517 </widget> 518 </item> 519 <item row="4" column="1"> 520 <widget class="QLineEdit" name="computationTimeValue"> 521 <property name="enabled"> 522 <bool>true</bool> 523 </property> 524 <property name="readOnly"> 525 <bool>true</bool> 526 </property> 527 </widget> 528 </item> 529 <item row="7" column="0"> 530 <widget class="QLabel" name="label_21"> 531 <property name="text"> 532 <string>Positive Fraction</string> 533 </property> 534 </widget> 535 </item> 536 <item row="8" column="1"> 537 <widget class="QLineEdit" name="sigmaPosFractionValue"> 538 <property name="enabled"> 539 <bool>true</bool> 540 </property> 541 <property name="readOnly"> 542 <bool>true</bool> 543 </property> 544 </widget> 545 </item> 546 </layout> 547 </widget> 548 </item> 549 </layout> 550 </widget> 551 </widget> 552 </item> 553 <item row="1" column="0"> 554 <spacer name="verticalSpacer"> 555 <property name="orientation"> 556 <enum>Qt::Vertical</enum> 557 </property> 558 <property name="sizeHint" stdset="0"> 559 <size> 560 <width>20</width> 561 <height>2</height> 562 </size> 563 </property> 564 </spacer> 565 </item> 566 <item row="2" column="0"> 36 567 <layout class="QHBoxLayout" name="horizontalLayout_8"> 37 568 <property name="sizeConstraint"> 38 569 <enum>QLayout::SetDefaultConstraint</enum> 39 570 </property> 40 <item>41 <widget class="QPushButton" name="removeButton">42 <property name="text">43 <string>Remove</string>44 </property>45 </widget>46 </item>47 <item>48 <widget class="QPushButton" name="calculateThisButton">49 <property name="text">50 <string>Calculate</string>51 </property>52 </widget>53 </item>54 <item>55 <widget class="QPushButton" name="calculateAllButton">56 <property name="sizePolicy">57 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">58 <horstretch>0</horstretch>59 <verstretch>0</verstretch>60 </sizepolicy>61 </property>62 <property name="text">63 <string>Calculate All</string>64 </property>65 </widget>66 </item>67 571 <item> 68 572 <spacer name="horizontalSpacer"> … … 96 600 </layout> 97 601 </item> 98 <item row="3" column="0">99 <spacer name="verticalSpacer">100 <property name="orientation">101 <enum>Qt::Vertical</enum>102 </property>103 <property name="sizeHint" stdset="0">104 <size>105 <width>20</width>106 <height>2</height>107 </size>108 </property>109 </spacer>110 </item>111 <item row="1" column="0" rowspan="2">112 <widget class="QTabWidget" name="PrTabWidget">113 <property name="sizePolicy">114 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">115 <horstretch>0</horstretch>116 <verstretch>0</verstretch>117 </sizepolicy>118 </property>119 <property name="minimumSize">120 <size>121 <width>0</width>122 <height>0</height>123 </size>124 </property>125 <property name="currentIndex">126 <number>0</number>127 </property>128 <widget class="QWidget" name="tabMain">129 <attribute name="title">130 <string>P(r) Parameters</string>131 </attribute>132 <layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,1,1,0,0">133 <item>134 <widget class="QGroupBox" name="dataSourceGroupBox">135 <property name="title">136 <string>I(q) data source</string>137 </property>138 <layout class="QGridLayout" name="gridLayout_2">139 <item row="1" column="0">140 <layout class="QHBoxLayout" name="horizontalLayout_3" stretch="2,1,0,2,2">141 <item>142 <widget class="QLabel" name="label_5">143 <property name="text">144 <string>Background Level:</string>145 </property>146 </widget>147 </item>148 <item>149 <widget class="QLineEdit" name="backgroundInput">150 <property name="enabled">151 <bool>false</bool>152 </property>153 <property name="text">154 <string>0.0</string>155 </property>156 </widget>157 </item>158 <item>159 <widget class="QLabel" name="label_10">160 <property name="text">161 <string><html><head/><body><p>Ã162 <span style=" vertical-align:super;">-1</span></p></body></html></string>163 </property>164 </widget>165 </item>166 <item>167 <widget class="QRadioButton" name="estimateBgd">168 <property name="text">169 <string>Estimate</string>170 </property>171 </widget>172 </item>173 <item>174 <widget class="QRadioButton" name="manualBgd">175 <property name="text">176 <string>Manual Input</string>177 </property>178 </widget>179 </item>180 </layout>181 </item>182 <item row="0" column="0">183 <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,3">184 <item>185 <widget class="QLabel" name="label">186 <property name="text">187 <string>Data File Name:</string>188 </property>189 </widget>190 </item>191 <item>192 <widget class="QComboBox" name="dataList"/>193 </item>194 </layout>195 </item>196 </layout>197 </widget>198 </item>199 <item>200 <widget class="QGroupBox" name="qRangeGroupBox">201 <property name="title">202 <string>Total Q range</string>203 </property>204 <layout class="QGridLayout" name="gridLayout_3">205 <item row="0" column="0">206 <layout class="QHBoxLayout" name="horizontalLayout_4">207 <item>208 <widget class="QLabel" name="label_7">209 <property name="text">210 <string>Min:</string>211 </property>212 </widget>213 </item>214 <item>215 <widget class="QLineEdit" name="minQInput">216 <property name="enabled">217 <bool>true</bool>218 </property>219 </widget>220 </item>221 <item>222 <widget class="QLabel" name="label_11">223 <property name="text">224 <string><html><head/><body><p>Ã225 <span style=" vertical-align:super;">-1</span></p></body></html></string>226 </property>227 </widget>228 </item>229 <item>230 <widget class="QLabel" name="label_8">231 <property name="text">232 <string>Max:</string>233 </property>234 </widget>235 </item>236 <item>237 <widget class="QLineEdit" name="maxQInput">238 <property name="enabled">239 <bool>true</bool>240 </property>241 </widget>242 </item>243 <item>244 <widget class="QLabel" name="label_9">245 <property name="text">246 <string><html><head/><body><p>Ã247 <span style=" vertical-align:super;">-1</span></p></body></html></string>248 </property>249 </widget>250 </item>251 </layout>252 </item>253 </layout>254 </widget>255 </item>256 <item>257 <widget class="QGroupBox" name="slitParamsGroupBox">258 <property name="title">259 <string>Slit Parameters</string>260 </property>261 <layout class="QGridLayout" name="gridLayout">262 <item row="0" column="0">263 <layout class="QHBoxLayout" name="horizontalLayout">264 <item>265 <widget class="QLabel" name="label_3">266 <property name="text">267 <string>Height</string>268 </property>269 </widget>270 </item>271 <item>272 <widget class="QLineEdit" name="slitHeightInput">273 <property name="enabled">274 <bool>true</bool>275 </property>276 </widget>277 </item>278 <item>279 <widget class="QLabel" name="label_6">280 <property name="text">281 <string><html><head/><body><p>Ã282 <span style=" vertical-align:super;">-1</span></p></body></html></string>283 </property>284 </widget>285 </item>286 <item>287 <widget class="QLabel" name="label_4">288 <property name="text">289 <string>Width</string>290 </property>291 </widget>292 </item>293 <item>294 <widget class="QLineEdit" name="slitWidthInput">295 <property name="enabled">296 <bool>true</bool>297 </property>298 </widget>299 </item>300 <item>301 <widget class="QLabel" name="label_2">302 <property name="text">303 <string><html><head/><body><p>Ã304 <span style=" vertical-align:super;">-1</span></p></body></html></string>305 </property>306 </widget>307 </item>308 </layout>309 </item>310 </layout>311 </widget>312 </item>313 <item>314 <widget class="QGroupBox" name="paramGroupBox">315 <property name="sizePolicy">316 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">317 <horstretch>0</horstretch>318 <verstretch>0</verstretch>319 </sizepolicy>320 </property>321 <property name="toolTip">322 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">323 <html><head><meta name="qrichtext" content="1" /><style type="text/css">324 p, li { white-space: pre-wrap; }325 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">326 <pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;><span style=" font-family:'Courier New'; font-size:9pt; color:#000000;">P(r) is found by fitting a set of base functions to I(Q). The minimization involves a regularization term to ensure a smooth P(r). The regularization constant gives the size of that term. The suggested value is the value above which the output P(r) will have only one peak.</span></pre></body></html></string>327 </property>328 <property name="title">329 <string>Parameters</string>330 </property>331 <layout class="QGridLayout" name="gridLayout_8">332 <item row="1" column="0">333 <widget class="QLabel" name="label_13">334 <property name="text">335 <string>Regularization constant</string>336 </property>337 </widget>338 </item>339 <item row="0" column="2">340 <widget class="QPushButton" name="noOfTermsSuggestionButton">341 <property name="enabled">342 <bool>false</bool>343 </property>344 <property name="text">345 <string/>346 </property>347 </widget>348 </item>349 <item row="2" column="2">350 <widget class="QPushButton" name="explorerButton">351 <property name="sizePolicy">352 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">353 <horstretch>0</horstretch>354 <verstretch>0</verstretch>355 </sizepolicy>356 </property>357 <property name="toolTip">358 <string><html><head/><body><p>Open the D<span style=" vertical-align:sub;">max</span> explorer window.</p></body></html></string>359 </property>360 <property name="layoutDirection">361 <enum>Qt::LeftToRight</enum>362 </property>363 <property name="text">364 <string>Explore</string>365 </property>366 </widget>367 </item>368 <item row="0" column="1">369 <widget class="QLineEdit" name="noOfTermsInput"/>370 </item>371 <item row="2" column="1">372 <widget class="QLineEdit" name="maxDistanceInput"/>373 </item>374 <item row="0" column="0">375 <widget class="QLabel" name="label_12">376 <property name="text">377 <string>Number of Terms</string>378 </property>379 </widget>380 </item>381 <item row="1" column="2">382 <widget class="QPushButton" name="regConstantSuggestionButton">383 <property name="enabled">384 <bool>false</bool>385 </property>386 <property name="text">387 <string/>388 </property>389 </widget>390 </item>391 <item row="2" column="0">392 <widget class="QLabel" name="label_14">393 <property name="text">394 <string>Max distance [Ã395 ]</string>396 </property>397 </widget>398 </item>399 <item row="1" column="1">400 <widget class="QLineEdit" name="regularizationConstantInput"/>401 </item>402 </layout>403 </widget>404 </item>405 <item>406 <widget class="QGroupBox" name="outputsGroupBox">407 <property name="title">408 <string>Outputs</string>409 </property>410 <layout class="QGridLayout" name="gridLayout_4">411 <item row="0" column="1">412 <widget class="QLabel" name="label_23">413 <property name="text">414 <string>Calculated Value</string>415 </property>416 <property name="alignment">417 <set>Qt::AlignCenter</set>418 </property>419 </widget>420 </item>421 <item row="0" column="2">422 <widget class="QLabel" name="label_28">423 <property name="text">424 <string>Units</string>425 </property>426 </widget>427 </item>428 <item row="6" column="1">429 <widget class="QLineEdit" name="oscillationValue">430 <property name="enabled">431 <bool>false</bool>432 </property>433 </widget>434 </item>435 <item row="3" column="0">436 <widget class="QLabel" name="label_17">437 <property name="text">438 <string>Background</string>439 </property>440 </widget>441 </item>442 <item row="7" column="1">443 <widget class="QLineEdit" name="posFractionValue">444 <property name="enabled">445 <bool>false</bool>446 </property>447 </widget>448 </item>449 <item row="2" column="2">450 <widget class="QLabel" name="label_25">451 <property name="text">452 <string>Ã453 -1</string>454 </property>455 </widget>456 </item>457 <item row="3" column="1">458 <widget class="QLineEdit" name="backgroundValue">459 <property name="enabled">460 <bool>false</bool>461 </property>462 </widget>463 </item>464 <item row="1" column="0">465 <widget class="QLabel" name="label_15">466 <property name="text">467 <string>Rg</string>468 </property>469 </widget>470 </item>471 <item row="1" column="2">472 <widget class="QLabel" name="label_24">473 <property name="text">474 <string>Ã475 </string>476 </property>477 </widget>478 </item>479 <item row="6" column="0">480 <widget class="QLabel" name="label_20">481 <property name="text">482 <string>Oscillations</string>483 </property>484 </widget>485 </item>486 <item row="4" column="0">487 <widget class="QLabel" name="label_18">488 <property name="text">489 <string>Computation Time</string>490 </property>491 </widget>492 </item>493 <item row="4" column="2">494 <widget class="QLabel" name="label_27">495 <property name="text">496 <string>secs</string>497 </property>498 </widget>499 </item>500 <item row="2" column="0">501 <widget class="QLabel" name="label_16">502 <property name="text">503 <string>I(Q=0)</string>504 </property>505 </widget>506 </item>507 <item row="3" column="2">508 <widget class="QLabel" name="label_26">509 <property name="text">510 <string>Ã511 -1</string>512 </property>513 </widget>514 </item>515 <item row="0" column="0">516 <widget class="QLabel" name="label_22">517 <property name="text">518 <string>Parameter</string>519 </property>520 </widget>521 </item>522 <item row="8" column="0">523 <widget class="QLabel" name="label_29">524 <property name="text">525 <string>1-sigma positive fraction</string>526 </property>527 </widget>528 </item>529 <item row="2" column="1">530 <widget class="QLineEdit" name="iQ0Value">531 <property name="enabled">532 <bool>false</bool>533 </property>534 </widget>535 </item>536 <item row="5" column="0">537 <widget class="QLabel" name="label_19">538 <property name="text">539 <string>Chi^2/dof</string>540 </property>541 </widget>542 </item>543 <item row="1" column="1">544 <widget class="QLineEdit" name="rgValue">545 <property name="enabled">546 <bool>false</bool>547 </property>548 </widget>549 </item>550 <item row="5" column="1">551 <widget class="QLineEdit" name="chiDofValue">552 <property name="enabled">553 <bool>false</bool>554 </property>555 </widget>556 </item>557 <item row="4" column="1">558 <widget class="QLineEdit" name="computationTimeValue">559 <property name="enabled">560 <bool>false</bool>561 </property>562 </widget>563 </item>564 <item row="7" column="0">565 <widget class="QLabel" name="label_21">566 <property name="text">567 <string>Positive Fraction</string>568 </property>569 </widget>570 </item>571 <item row="8" column="1">572 <widget class="QLineEdit" name="sigmaPosFractionValue">573 <property name="enabled">574 <bool>false</bool>575 </property>576 </widget>577 </item>578 </layout>579 </widget>580 </item>581 </layout>582 </widget>583 </widget>584 </item>585 602 </layout> 586 603 </widget>
Note: See TracChangeset
for help on using the changeset viewer.