- Timestamp:
- Sep 28, 2017 11:29:40 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:
- 7d353af
- Parents:
- 01cda57
- Location:
- src/sas/qtgui/Calculators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py
r01cda57 rfc4fec8 17 17 import sys 18 18 import logging 19 import math20 19 import os 21 20 import re … … 32 31 BG_WHITE = "background-color: rgb(255, 255, 255);" 33 32 BG_RED = "background-color: rgb(244, 170, 164);" 34 35 _INTENSITY = 36842836 _LAMBDA_ARRAY = [[0, 1e+16], [_INTENSITY, _INTENSITY]]37 33 38 34 … … 85 81 # dQ 2d image 86 82 self.image = None 87 # results of sigmas88 self.sigma_strings = ' '89 83 # Source selection dic 90 84 self.source_mass = _SOURCE_MASS … … 237 231 text_edit.setStyleSheet(QtCore.QString(BG_RED)) 238 232 self.cmdCompute.setEnabled(False) 239 logging.info('Qx and Qy are lists ofcomma-separated numbers.')233 logging.info('Qx and Qy should contain one or more comma-separated numbers.') 240 234 else: 241 235 text_edit.setStyleSheet(QtCore.QString(BG_WHITE)) … … 256 250 self.cmdCompute.setEnabled(False) 257 251 logging.info( 258 'Qx and Qy have the same number of elements.')252 'Qx and Qy should have the same number of elements.') 259 253 260 254 else: … … 410 404 411 405 self.image = None 412 self.sigma_strings = ' '413 406 self.source_mass = _SOURCE_MASS 414 407 self.det_coordinate = 'cartesian' … … 496 489 ymax = max(self.qy) 497 490 if not self._validate_q_input(self.qx, self.qy): 498 raise 491 raise ValueError("Invalid Q input") 499 492 except: 500 493 msg = "An error occurred during the resolution computation." … … 502 495 logging.warning(msg) 503 496 return 504 # raise ValueError, "Invalid Q Input..."505 497 506 498 # Validate the q inputs … … 523 515 # Compute and get the image plot 524 516 try: 525 self.sigma_strings = '\nResolution: Computation is finished. \n' 526 cal_res = threads.deferToThread(self.complete, 527 map(self._map_func, 528 self.qx, 529 self.qy, 530 qx_min, 531 qx_max, 532 qy_min, qy_max)[0], 533 self.image) 534 535 cal_res.addCallback(self.new2DPlot) 536 537 logging.info("Computation is in progress...") 517 cal_res = threads.deferToThread(self.map_wrapper, 518 self.calc_func, 519 self.qx, 520 self.qy, 521 qx_min, 522 qx_max, 523 qy_min, qy_max) 524 525 cal_res.addCallback(self.complete) 526 527 # logging.info("Computation is in progress...") 538 528 self.cmdCompute.setText('Wait...') 539 529 self.cmdCompute.setEnabled(False) … … 541 531 raise 542 532 543 def complete(self, image , elapsed=None):533 def complete(self, image): 544 534 """ 545 535 Complete computation … … 559 549 self.txt1DSigma.setText(str(sigma_1d)) 560 550 561 msg = self.sigma_strings562 logging.info(msg + '\n stop')563 551 self.cmdCompute.setText('Compute') 564 552 self.cmdCompute.setEnabled(True) 553 554 self.new2DPlot() 555 565 556 return 566 557 567 def _map_func(self, qx, qy, qx_min, qx_max, qy_min, qy_max):558 def map_wrapper(self, func, qx, qy, qx_min, qx_max, qy_min, qy_max): 568 559 """ 569 560 Prepare the Mapping for the computation … … 571 562 : return: image (numpy array) 572 563 """ 564 image = map(func, qx, qy, 565 qx_min, qx_max, 566 qy_min, qy_max)[0] 567 return image 568 569 def calc_func(self, qx, qy, qx_min, qx_max, qy_min, qy_max): 570 """ 571 Perform the calculation for a given set of Q values. 572 : return: image (numpy array) 573 """ 573 574 try: 574 575 qx_value = float(qx) 575 576 qy_value = float(qy) 576 except: 577 raise 577 except : 578 raise ValueError 579 578 580 # calculate 2D resolution distribution image 579 581 image = self.resolution.compute_and_plot(qx_value, qy_value, … … 581 583 qy_max, 582 584 self.det_coordinate) 583 # record sigmas584 self.sigma_strings += " At Qx = %s, Qy = %s; \n" % (qx_value, qy_value)585 self._sigma_strings()586 logging.info(self.sigma_strings)587 588 585 return image 589 586 … … 591 588 # Legacy validators 592 589 # ################################# 593 def _sigma_strings(self): 594 """ 595 Recode sigmas as strings 596 """ 597 sigma_r = self.formatNumber(self.resolution.sigma_1) 598 sigma_phi = self.formatNumber(self.resolution.sigma_2) 599 sigma_lamd = self.formatNumber(self.resolution.sigma_lamd) 600 sigma_1d = self.formatNumber(self.resolution.sigma_1d) 601 # Set output values 602 self.sigma_strings += " sigma_x = %s\n" % sigma_r 603 self.sigma_strings += " sigma_y = %s\n" % sigma_phi 604 self.sigma_strings += " sigma_lamd = %s\n" % sigma_lamd 605 self.sigma_strings += " sigma_1D = %s\n" % sigma_1d 606 607 def _string2list(self, string): 590 def _string2list(self, input_string): 608 591 """ 609 592 Change NNN, NNN to list,ie. [NNN, NNN] where NNN is a number 610 593 """ 611 new_ string= []594 new_numbers_list = [] 612 595 # check the number of floats 613 596 try: 614 strg = float( string)615 new_ string.append(strg)597 strg = float(input_string) 598 new_numbers_list.append(strg) 616 599 except: 617 string_split = string.split(',')600 string_split = input_string.split(',') 618 601 if len(string_split) == 2: 619 602 str_1 = string_split[0] 620 603 str_2 = string_split[1] 621 new_ string.append(float(str_1))622 new_ string.append(float(str_2))604 new_numbers_list.append(float(str_1)) 605 new_numbers_list.append(float(str_2)) 623 606 elif len(string_split) == 1: 624 607 str_1 = string_split[0] 625 new_ string.append(float(str_1))608 new_numbers_list.append(float(str_1)) 626 609 else: 627 msg = "The numbers must be one or two (separated by ',') ..."610 msg = "The numbers must be one or two (separated by ',')" 628 611 logging.info(msg) 629 612 raise RuntimeError, msg 630 613 631 return new_ string632 633 def _string2inputlist(self, string):614 return new_numbers_list 615 616 def _string2inputlist(self, input_string): 634 617 """ 635 618 Change NNN, NNN,... to list,ie. [NNN, NNN,...] where NNN is a number 636 : return new_string: string like list 637 """ 638 new_string = [] 639 string_split = string.split(',') 640 length = len(string_split) 641 for ind in range(length): 642 try: 643 value = float(string_split[ind]) 644 new_string.append(value) 645 except: 646 logging.error(sys.exc_value) 647 648 return new_string 649 650 def _str2longlist(self, string): 651 """ 652 Change NNN, NNN,... to list, NNN - NNN ; NNN to list, or float to list 653 : return new_string: string like list 654 """ 619 : return new_list: string like list 620 """ 621 new_list = [] 622 string_split = input_string.split(',') 623 try: 624 new_list = [float(t) for t in string_split] 625 except: 626 logging.error(sys.exc_value) 627 return new_list 628 629 def _str2longlist(self, input_string): 630 """ 631 Change NNN, NNN,... to list, NNN - NNN ; NNN to list, or float to list 632 : return new_string: string like list 633 """ 655 634 try: 656 635 # is float 657 out = [float( string)]636 out = [float(input_string)] 658 637 return out 659 638 except: … … 663 642 try: 664 643 # has a '-' 665 if string.count('-') > 0:666 value = string.split('-')644 if input_string.count('-') > 0: 645 value = input_string.split('-') 667 646 if value[1].count(';') > 0: 668 647 # has a ';' 669 648 last_list = value[1].split(';') 670 num = math.ceil(float(last_list[1]))649 num = numpy.ceil(float(last_list[1])) 671 650 max_value = float(last_list[0]) 672 651 self.num_wave = num … … 677 656 min_value = float(value[0]) 678 657 # make a list 679 bin_size = math.fabs(max_value - min_value) / (num - 1)658 bin_size = numpy.fabs(max_value - min_value) / (num - 1) 680 659 out = [min_value + bin_size * bnum for bnum in 681 660 range(num)] 682 661 return out 683 if string.count(',') > 0:684 out = self._string2inputlist( string)662 if input_string.count(',') > 0: 663 out = self._string2inputlist(input_string) 685 664 return out 686 665 except: … … 739 718 self.plotter = Plotter2DWidget(self, quickplot=True) 740 719 self.plotter.scale = 'linear' 720 self.plotter.cmap = None 741 721 layout = QtGui.QHBoxLayout() 742 722 layout.setContentsMargins(0, 0, 0, 0) … … 744 724 layout.addWidget(self.plotter) 745 725 746 def new2DPlot(self , res_cal):726 def new2DPlot(self): 747 727 """ 748 728 Create a new 2D data instance based on computing results -
src/sas/qtgui/Calculators/UI/ResolutionCalculatorPanelUI.ui
r01cda57 rfc4fec8 10 10 <x>0</x> 11 11 <y>0</y> 12 <width>1 310</width>13 <height> 667</height>12 <width>1034</width> 13 <height>561</height> 14 14 </rect> 15 15 </property> 16 16 <property name="minimumSize"> 17 17 <size> 18 <width> 1310</width>19 <height> 667</height>18 <width>800</width> 19 <height>550</height> 20 20 </size> 21 21 </property> … … 29 29 <string>Q Resolution Estimator</string> 30 30 </property> 31 <layout class="QGridLayout" name="gridLayout_8"> 31 <property name="windowIcon"> 32 <iconset> 33 <normaloff>:/res/ball.ico</normaloff>:/res/ball.ico</iconset> 34 </property> 35 <layout class="QGridLayout" name="gridLayout_6"> 36 <item row="0" column="1" rowspan="5"> 37 <widget class="Line" name="line_4"> 38 <property name="orientation"> 39 <enum>Qt::Vertical</enum> 40 </property> 41 </widget> 42 </item> 43 <item row="0" column="2" rowspan="3"> 44 <widget class="QGraphicsView" name="graphicsView"> 45 <property name="sizePolicy"> 46 <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> 47 <horstretch>0</horstretch> 48 <verstretch>0</verstretch> 49 </sizepolicy> 50 </property> 51 <property name="minimumSize"> 52 <size> 53 <width>430</width> 54 <height>430</height> 55 </size> 56 </property> 57 </widget> 58 </item> 59 <item row="1" column="0"> 60 <widget class="QGroupBox" name="groupBox_2"> 61 <property name="title"> 62 <string>Q Location of the Estimation</string> 63 </property> 64 <layout class="QGridLayout" name="gridLayout_9"> 65 <property name="margin"> 66 <number>6</number> 67 </property> 68 <item row="0" column="0"> 69 <layout class="QGridLayout" name="gridLayout"> 70 <item row="0" column="0"> 71 <widget class="QLabel" name="label_21"> 72 <property name="minimumSize"> 73 <size> 74 <width>21</width> 75 <height>21</height> 76 </size> 77 </property> 78 <property name="text"> 79 <string>Qx:</string> 80 </property> 81 </widget> 82 </item> 83 <item row="0" column="1"> 84 <widget class="QLineEdit" name="txtQx"> 85 <property name="minimumSize"> 86 <size> 87 <width>100</width> 88 <height>21</height> 89 </size> 90 </property> 91 <property name="baseSize"> 92 <size> 93 <width>100</width> 94 <height>21</height> 95 </size> 96 </property> 97 <property name="toolTip"> 98 <string>Type the Qx value.</string> 99 </property> 100 <property name="text"> 101 <string>0.0</string> 102 </property> 103 </widget> 104 </item> 105 <item row="0" column="2"> 106 <widget class="QLabel" name="lblUnitQx"> 107 <property name="minimumSize"> 108 <size> 109 <width>18</width> 110 <height>21</height> 111 </size> 112 </property> 113 <property name="text"> 114 <string><html><head/><body><p>Ã 115 <span style=" vertical-align:super;">-1</span></p></body></html></string> 116 </property> 117 </widget> 118 </item> 119 <item row="1" column="0"> 120 <widget class="QLabel" name="label_22"> 121 <property name="minimumSize"> 122 <size> 123 <width>21</width> 124 <height>21</height> 125 </size> 126 </property> 127 <property name="text"> 128 <string>Qy:</string> 129 </property> 130 </widget> 131 </item> 132 <item row="1" column="1"> 133 <widget class="QLineEdit" name="txtQy"> 134 <property name="minimumSize"> 135 <size> 136 <width>100</width> 137 <height>21</height> 138 </size> 139 </property> 140 <property name="baseSize"> 141 <size> 142 <width>100</width> 143 <height>21</height> 144 </size> 145 </property> 146 <property name="toolTip"> 147 <string>Type the Qy value.</string> 148 </property> 149 <property name="text"> 150 <string>0.0</string> 151 </property> 152 </widget> 153 </item> 154 <item row="1" column="2"> 155 <widget class="QLabel" name="lblUnitQy"> 156 <property name="minimumSize"> 157 <size> 158 <width>18</width> 159 <height>21</height> 160 </size> 161 </property> 162 <property name="text"> 163 <string><html><head/><body><p>Ã 164 <span style=" vertical-align:super;">-1</span></p></body></html></string> 165 </property> 166 </widget> 167 </item> 168 </layout> 169 </item> 170 </layout> 171 </widget> 172 </item> 173 <item row="2" column="0" rowspan="2"> 174 <widget class="QGroupBox" name="groupBox_3"> 175 <property name="title"> 176 <string>Standard Deviation of the Resolution Distribution</string> 177 </property> 178 <layout class="QGridLayout" name="gridLayout_4"> 179 <property name="margin"> 180 <number>6</number> 181 </property> 182 <item row="0" column="0"> 183 <layout class="QGridLayout" name="gridLayout_2"> 184 <property name="bottomMargin"> 185 <number>5</number> 186 </property> 187 <item row="0" column="0"> 188 <widget class="QLabel" name="label"> 189 <property name="minimumSize"> 190 <size> 191 <width>76</width> 192 <height>21</height> 193 </size> 194 </property> 195 <property name="text"> 196 <string>Sigma_x:</string> 197 </property> 198 </widget> 199 </item> 200 <item row="0" column="1"> 201 <widget class="QLineEdit" name="txtSigma_x"> 202 <property name="enabled"> 203 <bool>true</bool> 204 </property> 205 <property name="minimumSize"> 206 <size> 207 <width>75</width> 208 <height>21</height> 209 </size> 210 </property> 211 <property name="baseSize"> 212 <size> 213 <width>100</width> 214 <height>21</height> 215 </size> 216 </property> 217 <property name="toolTip"> 218 <string>The x component of the geometric resolution, excluding sigma_lamda.</string> 219 </property> 220 <property name="text"> 221 <string>0.0008288</string> 222 </property> 223 <property name="readOnly"> 224 <bool>true</bool> 225 </property> 226 </widget> 227 </item> 228 <item row="0" column="2"> 229 <widget class="QLabel" name="lblUnitSigmax"> 230 <property name="minimumSize"> 231 <size> 232 <width>16</width> 233 <height>21</height> 234 </size> 235 </property> 236 <property name="text"> 237 <string><html><head/><body><p>Ã 238 <span style=" vertical-align:super;">-1</span></p></body></html></string> 239 </property> 240 </widget> 241 </item> 242 <item row="0" column="3"> 243 <spacer name="horizontalSpacer"> 244 <property name="orientation"> 245 <enum>Qt::Horizontal</enum> 246 </property> 247 <property name="sizeHint" stdset="0"> 248 <size> 249 <width>78</width> 250 <height>20</height> 251 </size> 252 </property> 253 </spacer> 254 </item> 255 <item row="0" column="4"> 256 <widget class="QLabel" name="label_5"> 257 <property name="text"> 258 <string>Sigma_y:</string> 259 </property> 260 </widget> 261 </item> 262 <item row="0" column="5"> 263 <widget class="QLineEdit" name="txtSigma_y"> 264 <property name="enabled"> 265 <bool>true</bool> 266 </property> 267 <property name="minimumSize"> 268 <size> 269 <width>75</width> 270 <height>21</height> 271 </size> 272 </property> 273 <property name="baseSize"> 274 <size> 275 <width>100</width> 276 <height>21</height> 277 </size> 278 </property> 279 <property name="toolTip"> 280 <string>The y component of the geometric resolution, excluding sigma_lamda.</string> 281 </property> 282 <property name="text"> 283 <string>0.0008288</string> 284 </property> 285 <property name="readOnly"> 286 <bool>true</bool> 287 </property> 288 </widget> 289 </item> 290 <item row="0" column="6"> 291 <widget class="QLabel" name="lblUnitSigmay"> 292 <property name="text"> 293 <string><html><head/><body><p>Ã 294 <span style=" vertical-align:super;">-1</span></p></body></html></string> 295 </property> 296 </widget> 297 </item> 298 <item row="1" column="0"> 299 <widget class="QLabel" name="label_2"> 300 <property name="minimumSize"> 301 <size> 302 <width>76</width> 303 <height>21</height> 304 </size> 305 </property> 306 <property name="text"> 307 <string>Sigma_lamd:</string> 308 </property> 309 </widget> 310 </item> 311 <item row="1" column="2"> 312 <widget class="QLabel" name="lblUnitSigmalamd"> 313 <property name="minimumSize"> 314 <size> 315 <width>16</width> 316 <height>21</height> 317 </size> 318 </property> 319 <property name="text"> 320 <string><html><head/><body><p>Ã 321 <span style=" vertical-align:super;">-1</span></p></body></html></string> 322 </property> 323 </widget> 324 </item> 325 <item row="1" column="4"> 326 <widget class="QLabel" name="label_6"> 327 <property name="minimumSize"> 328 <size> 329 <width>70</width> 330 <height>21</height> 331 </size> 332 </property> 333 <property name="text"> 334 <string>(1D) Sigma:</string> 335 </property> 336 </widget> 337 </item> 338 <item row="1" column="5"> 339 <widget class="QLineEdit" name="txt1DSigma"> 340 <property name="enabled"> 341 <bool>true</bool> 342 </property> 343 <property name="minimumSize"> 344 <size> 345 <width>75</width> 346 <height>21</height> 347 </size> 348 </property> 349 <property name="baseSize"> 350 <size> 351 <width>100</width> 352 <height>21</height> 353 </size> 354 </property> 355 <property name="toolTip"> 356 <string>Resolution in 1-dimension (for 1D data).</string> 357 </property> 358 <property name="text"> 359 <string>0.0008289</string> 360 </property> 361 <property name="readOnly"> 362 <bool>true</bool> 363 </property> 364 </widget> 365 </item> 366 <item row="1" column="6"> 367 <widget class="QLabel" name="lblUnit1DSigma"> 368 <property name="minimumSize"> 369 <size> 370 <width>16</width> 371 <height>21</height> 372 </size> 373 </property> 374 <property name="text"> 375 <string><html><head/><body><p>Ã 376 <span style=" vertical-align:super;">-1</span></p></body></html></string> 377 </property> 378 </widget> 379 </item> 380 <item row="1" column="1"> 381 <widget class="QLineEdit" name="txtSigma_lamd"> 382 <property name="enabled"> 383 <bool>true</bool> 384 </property> 385 <property name="minimumSize"> 386 <size> 387 <width>75</width> 388 <height>21</height> 389 </size> 390 </property> 391 <property name="baseSize"> 392 <size> 393 <width>100</width> 394 <height>21</height> 395 </size> 396 </property> 397 <property name="toolTip"> 398 <string>The wavelength contribution in the radial direction. Note: The phi component is always zero.</string> 399 </property> 400 <property name="text"> 401 <string>3.168e-05</string> 402 </property> 403 <property name="readOnly"> 404 <bool>true</bool> 405 </property> 406 </widget> 407 </item> 408 </layout> 409 </item> 410 </layout> 411 </widget> 412 </item> 413 <item row="3" column="2"> 414 <spacer name="horizontalSpacer_2"> 415 <property name="orientation"> 416 <enum>Qt::Horizontal</enum> 417 </property> 418 <property name="sizeHint" stdset="0"> 419 <size> 420 <width>40</width> 421 <height>20</height> 422 </size> 423 </property> 424 </spacer> 425 </item> 426 <item row="4" column="0"> 427 <layout class="QGridLayout" name="gridLayout_3"> 428 <item row="0" column="1"> 429 <widget class="QPushButton" name="cmdReset"> 430 <property name="minimumSize"> 431 <size> 432 <width>75</width> 433 <height>25</height> 434 </size> 435 </property> 436 <property name="toolTip"> 437 <string>Reset to default SAS instrumental parameter</string> 438 </property> 439 <property name="text"> 440 <string>Reset</string> 441 </property> 442 <property name="autoDefault"> 443 <bool>false</bool> 444 </property> 445 </widget> 446 </item> 447 <item row="0" column="2"> 448 <widget class="QPushButton" name="cmdCompute"> 449 <property name="toolTip"> 450 <string>Compute the resolution of Q from SAS instrumental parameter</string> 451 </property> 452 <property name="text"> 453 <string>Compute</string> 454 </property> 455 <property name="autoDefault"> 456 <bool>false</bool> 457 </property> 458 </widget> 459 </item> 460 <item row="0" column="3"> 461 <widget class="QPushButton" name="cmdClose"> 462 <property name="minimumSize"> 463 <size> 464 <width>75</width> 465 <height>23</height> 466 </size> 467 </property> 468 <property name="toolTip"> 469 <string>Close this window</string> 470 </property> 471 <property name="text"> 472 <string>Close</string> 473 </property> 474 <property name="autoDefault"> 475 <bool>false</bool> 476 </property> 477 </widget> 478 </item> 479 <item row="0" column="4"> 480 <widget class="QPushButton" name="cmdHelp"> 481 <property name="minimumSize"> 482 <size> 483 <width>75</width> 484 <height>23</height> 485 </size> 486 </property> 487 <property name="toolTip"> 488 <string>Help on using the Resolution Calculator</string> 489 </property> 490 <property name="text"> 491 <string>Help</string> 492 </property> 493 <property name="autoDefault"> 494 <bool>false</bool> 495 </property> 496 </widget> 497 </item> 498 <item row="0" column="0"> 499 <spacer name="horizontalSpacer_3"> 500 <property name="orientation"> 501 <enum>Qt::Horizontal</enum> 502 </property> 503 <property name="sizeHint" stdset="0"> 504 <size> 505 <width>40</width> 506 <height>20</height> 507 </size> 508 </property> 509 </spacer> 510 </item> 511 </layout> 512 </item> 32 513 <item row="0" column="0"> 33 514 <widget class="QGroupBox" name="groupBox"> … … 35 516 <string>Instrumental Parameters</string> 36 517 </property> 37 <layout class="QGridLayout" name="gridLayout_7"> 38 <item row="0" column="0"> 518 <layout class="QFormLayout" name="formLayout"> 519 <property name="fieldGrowthPolicy"> 520 <enum>QFormLayout::FieldsStayAtSizeHint</enum> 521 </property> 522 <property name="margin"> 523 <number>6</number> 524 </property> 525 <item row="0" column="0" colspan="2"> 39 526 <layout class="QGridLayout" name="gridLayout_5"> 40 <item row="8" column="3"> 41 <widget class="QLineEdit" name="txtDetectorSize"> 42 <property name="minimumSize"> 43 <size> 44 <width>100</width> 45 <height>20</height> 46 </size> 47 </property> 48 <property name="baseSize"> 49 <size> 50 <width>100</width> 51 <height>20</height> 52 </size> 53 </property> 54 <property name="toolTip"> 55 <string>Number of Pixels on Detector.</string> 56 </property> 57 <property name="text"> 58 <string>128, 128</string> 59 </property> 60 </widget> 61 </item> 62 <item row="4" column="3"> 63 <widget class="QLineEdit" name="txtSampleApertureSize"> 64 <property name="sizePolicy"> 65 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 66 <horstretch>0</horstretch> 67 <verstretch>0</verstretch> 68 </sizepolicy> 69 </property> 70 <property name="minimumSize"> 71 <size> 72 <width>100</width> 73 <height>23</height> 74 </size> 75 </property> 76 <property name="baseSize"> 77 <size> 78 <width>100</width> 79 <height>20</height> 80 </size> 81 </property> 82 <property name="focusPolicy"> 83 <enum>Qt::StrongFocus</enum> 84 </property> 85 <property name="toolTip"> 86 <string>Sample Aperture Size.</string> 87 </property> 88 <property name="text"> 89 <string>1.27</string> 90 </property> 91 </widget> 92 </item> 93 <item row="0" column="2"> 94 <widget class="QComboBox" name="cbWaveColor"> 95 <item> 96 <property name="text"> 97 <string>Monochromatic</string> 98 </property> 99 </item> 100 <item> 101 <property name="text"> 102 <string>TOF</string> 103 </property> 104 </item> 105 </widget> 106 </item> 527 <property name="leftMargin"> 528 <number>1</number> 529 </property> 530 <property name="topMargin"> 531 <number>1</number> 532 </property> 533 <property name="rightMargin"> 534 <number>1</number> 535 </property> 536 <property name="bottomMargin"> 537 <number>3</number> 538 </property> 539 <property name="verticalSpacing"> 540 <number>-1</number> 541 </property> 107 542 <item row="0" column="0"> 108 543 <widget class="QLabel" name="label_26"> … … 112 547 </widget> 113 548 </item> 114 <item row="1" column="3">115 <widget class="QLineEdit" name="txtWavelength">116 <property name="minimumSize">117 <size>118 <width>100</width>119 <height>20</height>120 </size>121 </property>122 <property name="baseSize">123 <size>124 <width>100</width>125 <height>20</height>126 </size>127 </property>128 <property name="focusPolicy">129 <enum>Qt::StrongFocus</enum>130 </property>131 <property name="toolTip">132 <string>Wavelength of the Neutrons.</string>133 </property>134 <property name="text">135 <string>6.0</string>136 </property>137 <property name="echoMode">138 <enum>QLineEdit::Normal</enum>139 </property>140 </widget>141 </item>142 <item row="3" column="3">143 <widget class="QLineEdit" name="txtSourceApertureSize">144 <property name="sizePolicy">145 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">146 <horstretch>0</horstretch>147 <verstretch>0</verstretch>148 </sizepolicy>149 </property>150 <property name="minimumSize">151 <size>152 <width>100</width>153 <height>20</height>154 </size>155 </property>156 <property name="baseSize">157 <size>158 <width>100</width>159 <height>20</height>160 </size>161 </property>162 <property name="focusPolicy">163 <enum>Qt::StrongFocus</enum>164 </property>165 <property name="toolTip">166 <string>Source Aperture Size.</string>167 </property>168 <property name="text">169 <string>3.81</string>170 </property>171 </widget>172 </item>173 <item row="7" column="0">174 <widget class="QLabel" name="label_33">175 <property name="text">176 <string>Sample Offset:</string>177 </property>178 </widget>179 </item>180 <item row="4" column="0" colspan="2">181 <widget class="QLabel" name="label_30">182 <property name="text">183 <string>Sample Aperture Size:</string>184 </property>185 </widget>186 </item>187 <item row="6" column="3">188 <widget class="QLineEdit" name="txtSample2DetectorDistance">189 <property name="minimumSize">190 <size>191 <width>100</width>192 <height>20</height>193 </size>194 </property>195 <property name="baseSize">196 <size>197 <width>100</width>198 <height>20</height>199 </size>200 </property>201 <property name="toolTip">202 <string>Sample Aperture to Detector Distance.</string>203 </property>204 <property name="text">205 <string>1000</string>206 </property>207 </widget>208 </item>209 <item row="1" column="0">210 <widget class="QLabel" name="label_27">211 <property name="text">212 <string>Wavelength:</string>213 </property>214 </widget>215 </item>216 <item row="3" column="0" colspan="2">217 <widget class="QLabel" name="label_29">218 <property name="text">219 <string>Source Aperture Size:</string>220 </property>221 </widget>222 </item>223 <item row="7" column="3">224 <widget class="QLineEdit" name="txtSampleOffset">225 <property name="minimumSize">226 <size>227 <width>100</width>228 <height>20</height>229 </size>230 </property>231 <property name="baseSize">232 <size>233 <width>100</width>234 <height>20</height>235 </size>236 </property>237 <property name="toolTip">238 <string>Sample Offset.</string>239 </property>240 <property name="text">241 <string>0</string>242 </property>243 </widget>244 </item>245 <item row="9" column="3">246 <widget class="QLineEdit" name="txtDetectorPixSize">247 <property name="minimumSize">248 <size>249 <width>100</width>250 <height>20</height>251 </size>252 </property>253 <property name="baseSize">254 <size>255 <width>100</width>256 <height>20</height>257 </size>258 </property>259 <property name="toolTip">260 <string>Detector Pixel Size.</string>261 </property>262 <property name="text">263 <string>0.5, 0.5</string>264 </property>265 </widget>266 </item>267 <item row="9" column="0" colspan="2">268 <widget class="QLabel" name="label_35">269 <property name="text">270 <string>Detector Pixel Size:</string>271 </property>272 </widget>273 </item>274 <item row="5" column="3">275 <widget class="QLineEdit" name="txtSource2SampleDistance">276 <property name="sizePolicy">277 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">278 <horstretch>0</horstretch>279 <verstretch>0</verstretch>280 </sizepolicy>281 </property>282 <property name="minimumSize">283 <size>284 <width>100</width>285 <height>20</height>286 </size>287 </property>288 <property name="baseSize">289 <size>290 <width>100</width>291 <height>20</height>292 </size>293 </property>294 <property name="focusPolicy">295 <enum>Qt::StrongFocus</enum>296 </property>297 <property name="toolTip">298 <string>Source to Sample Aperture Distance.</string>299 </property>300 <property name="text">301 <string>1627</string>302 </property>303 </widget>304 </item>305 <item row="8" column="0" colspan="2">306 <widget class="QLabel" name="label_34">307 <property name="text">308 <string>Number of Pixels on Detector:</string>309 </property>310 </widget>311 </item>312 <item row="2" column="0" colspan="2">313 <widget class="QLabel" name="label_28">314 <property name="text">315 <string>Wavelength Spread:</string>316 </property>317 </widget>318 </item>319 549 <item row="0" column="1"> 320 550 <widget class="QComboBox" name="cbSource"> 551 <property name="minimumSize"> 552 <size> 553 <width>80</width> 554 <height>26</height> 555 </size> 556 </property> 321 557 <property name="toolTip"> 322 558 <string>Source Selection: Affect on the gravitational contribution.</string> … … 357 593 </widget> 358 594 </item> 359 <item row="5" column="0" colspan="3"> 360 <widget class="QLabel" name="label_31"> 361 <property name="text"> 362 <string>Source to Sample Aperture Distance:</string> 363 </property> 364 </widget> 365 </item> 366 <item row="2" column="3"> 367 <widget class="QLineEdit" name="txtWavelengthSpread"> 368 <property name="minimumSize"> 369 <size> 370 <width>100</width> 371 <height>20</height> 372 </size> 373 </property> 374 <property name="baseSize"> 375 <size> 376 <width>100</width> 377 <height>20</height> 378 </size> 379 </property> 380 <property name="focusPolicy"> 381 <enum>Qt::StrongFocus</enum> 382 </property> 383 <property name="toolTip"> 384 <string>Wavelength Spread of Neutrons.</string> 385 </property> 386 <property name="text"> 387 <string>0.125</string> 388 </property> 389 </widget> 390 </item> 391 <item row="6" column="0" colspan="3"> 392 <widget class="QLabel" name="label_32"> 393 <property name="text"> 394 <string>Sample Aperture to Detector Distance:</string> 395 </property> 396 </widget> 397 </item> 398 <item row="0" column="4" rowspan="10"> 399 <layout class="QGridLayout" name="gridLayout_6"> 400 <item row="1" column="0"> 401 <widget class="QLabel" name="lblUnitWavelength"> 402 <property name="text"> 403 <string>Ã 404 </string> 405 </property> 406 </widget> 595 <item row="0" column="2"> 596 <widget class="QComboBox" name="cbWaveColor"> 597 <property name="sizePolicy"> 598 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 599 <horstretch>0</horstretch> 600 <verstretch>0</verstretch> 601 </sizepolicy> 602 </property> 603 <property name="minimumSize"> 604 <size> 605 <width>127</width> 606 <height>26</height> 607 </size> 608 </property> 609 <item> 610 <property name="text"> 611 <string>Monochromatic</string> 612 </property> 407 613 </item> 408 <item row="2" column="0"> 409 <widget class="QLabel" name="lblUnitWavelengthSpread"> 410 <property name="text"> 411 <string/> 412 </property> 413 </widget> 614 <item> 615 <property name="text"> 616 <string>TOF</string> 617 </property> 414 618 </item> 415 <item row="3" column="0"> 416 <widget class="QLabel" name="label_39"> 417 <property name="text"> 418 <string>cm</string> 419 </property> 420 </widget> 421 </item> 422 <item row="4" column="0"> 423 <widget class="QLabel" name="label_40"> 424 <property name="text"> 425 <string>cm</string> 426 </property> 427 </widget> 428 </item> 429 <item row="5" column="0"> 430 <widget class="QLabel" name="label_41"> 431 <property name="text"> 432 <string>cm</string> 433 </property> 434 </widget> 435 </item> 436 <item row="6" column="0"> 437 <widget class="QLabel" name="label_42"> 438 <property name="text"> 439 <string>cm</string> 440 </property> 441 </widget> 442 </item> 443 <item row="7" column="0"> 444 <widget class="QLabel" name="label_43"> 445 <property name="text"> 446 <string>cm</string> 447 </property> 448 </widget> 449 </item> 450 <item row="8" column="0"> 451 <widget class="QLabel" name="label_44"> 452 <property name="text"> 453 <string/> 454 </property> 455 </widget> 456 </item> 457 <item row="9" column="0"> 458 <widget class="QLabel" name="label_45"> 459 <property name="text"> 460 <string>cm</string> 461 </property> 462 </widget> 463 </item> 464 <item row="0" column="0"> 465 <widget class="QLabel" name="label_36"> 466 <property name="text"> 467 <string/> 468 </property> 469 </widget> 470 </item> 471 </layout> 619 </widget> 620 </item> 621 <item row="1" column="0"> 622 <widget class="QLabel" name="label_27"> 623 <property name="text"> 624 <string>Wavelength:</string> 625 </property> 626 </widget> 627 </item> 628 <item row="1" column="1"> 629 <widget class="QLabel" name="lblSpectrum"> 630 <property name="minimumSize"> 631 <size> 632 <width>80</width> 633 <height>20</height> 634 </size> 635 </property> 636 <property name="baseSize"> 637 <size> 638 <width>80</width> 639 <height>20</height> 640 </size> 641 </property> 642 <property name="text"> 643 <string>Spectrum</string> 644 </property> 645 </widget> 472 646 </item> 473 647 <item row="1" column="2"> 474 648 <widget class="QComboBox" name="cbCustomSpectrum"> 649 <property name="sizePolicy"> 650 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 651 <horstretch>0</horstretch> 652 <verstretch>0</verstretch> 653 </sizepolicy> 654 </property> 655 <property name="minimumSize"> 656 <size> 657 <width>130</width> 658 <height>26</height> 659 </size> 660 </property> 475 661 <property name="toolTip"> 476 662 <string>Wavelength Spectrum: Intensity vs. wavelength.</string> … … 488 674 </widget> 489 675 </item> 490 <item row="1" column="1"> 491 <widget class="QLabel" name="lblSpectrum"> 492 <property name="minimumSize"> 493 <size> 494 <width>80</width> 495 <height>20</height> 496 </size> 497 </property> 498 <property name="baseSize"> 499 <size> 500 <width>80</width> 501 <height>20</height> 502 </size> 503 </property> 504 <property name="text"> 505 <string>Spectrum</string> 676 <item row="1" column="3"> 677 <widget class="QLineEdit" name="txtWavelength"> 678 <property name="sizePolicy"> 679 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 680 <horstretch>0</horstretch> 681 <verstretch>0</verstretch> 682 </sizepolicy> 683 </property> 684 <property name="minimumSize"> 685 <size> 686 <width>75</width> 687 <height>20</height> 688 </size> 689 </property> 690 <property name="baseSize"> 691 <size> 692 <width>100</width> 693 <height>20</height> 694 </size> 695 </property> 696 <property name="focusPolicy"> 697 <enum>Qt::StrongFocus</enum> 698 </property> 699 <property name="toolTip"> 700 <string>Wavelength of the Neutrons.</string> 701 </property> 702 <property name="text"> 703 <string>6.0</string> 704 </property> 705 <property name="echoMode"> 706 <enum>QLineEdit::Normal</enum> 707 </property> 708 </widget> 709 </item> 710 <item row="1" column="4"> 711 <widget class="QLabel" name="lblUnitWavelength"> 712 <property name="minimumSize"> 713 <size> 714 <width>18</width> 715 <height>21</height> 716 </size> 717 </property> 718 <property name="text"> 719 <string>Ã 720 </string> 721 </property> 722 </widget> 723 </item> 724 <item row="2" column="0" colspan="2"> 725 <widget class="QLabel" name="label_28"> 726 <property name="text"> 727 <string>Wavelength Spread:</string> 728 </property> 729 </widget> 730 </item> 731 <item row="2" column="3"> 732 <widget class="QLineEdit" name="txtWavelengthSpread"> 733 <property name="minimumSize"> 734 <size> 735 <width>75</width> 736 <height>20</height> 737 </size> 738 </property> 739 <property name="baseSize"> 740 <size> 741 <width>100</width> 742 <height>20</height> 743 </size> 744 </property> 745 <property name="focusPolicy"> 746 <enum>Qt::StrongFocus</enum> 747 </property> 748 <property name="toolTip"> 749 <string>Wavelength Spread of Neutrons.</string> 750 </property> 751 <property name="text"> 752 <string>0.125</string> 753 </property> 754 </widget> 755 </item> 756 <item row="3" column="0" colspan="2"> 757 <widget class="QLabel" name="label_29"> 758 <property name="text"> 759 <string>Source Aperture Size:</string> 760 </property> 761 </widget> 762 </item> 763 <item row="3" column="3"> 764 <widget class="QLineEdit" name="txtSourceApertureSize"> 765 <property name="sizePolicy"> 766 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 767 <horstretch>0</horstretch> 768 <verstretch>0</verstretch> 769 </sizepolicy> 770 </property> 771 <property name="minimumSize"> 772 <size> 773 <width>75</width> 774 <height>20</height> 775 </size> 776 </property> 777 <property name="baseSize"> 778 <size> 779 <width>100</width> 780 <height>20</height> 781 </size> 782 </property> 783 <property name="focusPolicy"> 784 <enum>Qt::StrongFocus</enum> 785 </property> 786 <property name="toolTip"> 787 <string>Source Aperture Size.</string> 788 </property> 789 <property name="text"> 790 <string>3.81</string> 791 </property> 792 </widget> 793 </item> 794 <item row="3" column="4"> 795 <widget class="QLabel" name="label_39"> 796 <property name="minimumSize"> 797 <size> 798 <width>18</width> 799 <height>21</height> 800 </size> 801 </property> 802 <property name="text"> 803 <string>cm</string> 804 </property> 805 </widget> 806 </item> 807 <item row="4" column="0" colspan="2"> 808 <widget class="QLabel" name="label_30"> 809 <property name="text"> 810 <string>Sample Aperture Size:</string> 811 </property> 812 </widget> 813 </item> 814 <item row="4" column="3"> 815 <widget class="QLineEdit" name="txtSampleApertureSize"> 816 <property name="sizePolicy"> 817 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 818 <horstretch>0</horstretch> 819 <verstretch>0</verstretch> 820 </sizepolicy> 821 </property> 822 <property name="minimumSize"> 823 <size> 824 <width>75</width> 825 <height>23</height> 826 </size> 827 </property> 828 <property name="baseSize"> 829 <size> 830 <width>100</width> 831 <height>20</height> 832 </size> 833 </property> 834 <property name="focusPolicy"> 835 <enum>Qt::StrongFocus</enum> 836 </property> 837 <property name="toolTip"> 838 <string>Sample Aperture Size.</string> 839 </property> 840 <property name="text"> 841 <string>1.27</string> 842 </property> 843 </widget> 844 </item> 845 <item row="4" column="4"> 846 <widget class="QLabel" name="label_40"> 847 <property name="sizePolicy"> 848 <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> 849 <horstretch>0</horstretch> 850 <verstretch>0</verstretch> 851 </sizepolicy> 852 </property> 853 <property name="minimumSize"> 854 <size> 855 <width>18</width> 856 <height>21</height> 857 </size> 858 </property> 859 <property name="text"> 860 <string>cm</string> 861 </property> 862 </widget> 863 </item> 864 <item row="5" column="0" colspan="3"> 865 <widget class="QLabel" name="label_31"> 866 <property name="text"> 867 <string>Source to Sample Aperture Distance:</string> 868 </property> 869 </widget> 870 </item> 871 <item row="5" column="3"> 872 <widget class="QLineEdit" name="txtSource2SampleDistance"> 873 <property name="sizePolicy"> 874 <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> 875 <horstretch>0</horstretch> 876 <verstretch>0</verstretch> 877 </sizepolicy> 878 </property> 879 <property name="minimumSize"> 880 <size> 881 <width>75</width> 882 <height>20</height> 883 </size> 884 </property> 885 <property name="baseSize"> 886 <size> 887 <width>100</width> 888 <height>20</height> 889 </size> 890 </property> 891 <property name="focusPolicy"> 892 <enum>Qt::StrongFocus</enum> 893 </property> 894 <property name="toolTip"> 895 <string>Source to Sample Aperture Distance.</string> 896 </property> 897 <property name="text"> 898 <string>1627</string> 899 </property> 900 </widget> 901 </item> 902 <item row="5" column="4"> 903 <widget class="QLabel" name="label_41"> 904 <property name="minimumSize"> 905 <size> 906 <width>18</width> 907 <height>21</height> 908 </size> 909 </property> 910 <property name="text"> 911 <string>cm</string> 912 </property> 913 </widget> 914 </item> 915 <item row="6" column="0" colspan="3"> 916 <widget class="QLabel" name="label_32"> 917 <property name="text"> 918 <string>Sample Aperture to Detector Distance:</string> 919 </property> 920 </widget> 921 </item> 922 <item row="6" column="3"> 923 <widget class="QLineEdit" name="txtSample2DetectorDistance"> 924 <property name="minimumSize"> 925 <size> 926 <width>75</width> 927 <height>20</height> 928 </size> 929 </property> 930 <property name="baseSize"> 931 <size> 932 <width>100</width> 933 <height>20</height> 934 </size> 935 </property> 936 <property name="toolTip"> 937 <string>Sample Aperture to Detector Distance.</string> 938 </property> 939 <property name="text"> 940 <string>1000</string> 941 </property> 942 </widget> 943 </item> 944 <item row="6" column="4"> 945 <widget class="QLabel" name="label_42"> 946 <property name="minimumSize"> 947 <size> 948 <width>18</width> 949 <height>21</height> 950 </size> 951 </property> 952 <property name="text"> 953 <string>cm</string> 954 </property> 955 </widget> 956 </item> 957 <item row="7" column="0"> 958 <widget class="QLabel" name="label_33"> 959 <property name="text"> 960 <string>Sample Offset:</string> 961 </property> 962 </widget> 963 </item> 964 <item row="7" column="3"> 965 <widget class="QLineEdit" name="txtSampleOffset"> 966 <property name="minimumSize"> 967 <size> 968 <width>75</width> 969 <height>20</height> 970 </size> 971 </property> 972 <property name="baseSize"> 973 <size> 974 <width>100</width> 975 <height>20</height> 976 </size> 977 </property> 978 <property name="toolTip"> 979 <string>Sample Offset.</string> 980 </property> 981 <property name="text"> 982 <string>0</string> 983 </property> 984 </widget> 985 </item> 986 <item row="7" column="4"> 987 <widget class="QLabel" name="label_43"> 988 <property name="minimumSize"> 989 <size> 990 <width>18</width> 991 <height>21</height> 992 </size> 993 </property> 994 <property name="text"> 995 <string>cm</string> 996 </property> 997 </widget> 998 </item> 999 <item row="8" column="0" colspan="2"> 1000 <widget class="QLabel" name="label_34"> 1001 <property name="text"> 1002 <string>Number of Pixels on Detector:</string> 1003 </property> 1004 </widget> 1005 </item> 1006 <item row="8" column="3"> 1007 <widget class="QLineEdit" name="txtDetectorSize"> 1008 <property name="minimumSize"> 1009 <size> 1010 <width>75</width> 1011 <height>20</height> 1012 </size> 1013 </property> 1014 <property name="baseSize"> 1015 <size> 1016 <width>100</width> 1017 <height>20</height> 1018 </size> 1019 </property> 1020 <property name="toolTip"> 1021 <string>Number of Pixels on Detector.</string> 1022 </property> 1023 <property name="text"> 1024 <string>128, 128</string> 1025 </property> 1026 </widget> 1027 </item> 1028 <item row="9" column="0" colspan="2"> 1029 <widget class="QLabel" name="label_35"> 1030 <property name="text"> 1031 <string>Detector Pixel Size:</string> 1032 </property> 1033 </widget> 1034 </item> 1035 <item row="9" column="3"> 1036 <widget class="QLineEdit" name="txtDetectorPixSize"> 1037 <property name="minimumSize"> 1038 <size> 1039 <width>75</width> 1040 <height>20</height> 1041 </size> 1042 </property> 1043 <property name="baseSize"> 1044 <size> 1045 <width>100</width> 1046 <height>20</height> 1047 </size> 1048 </property> 1049 <property name="toolTip"> 1050 <string>Detector Pixel Size.</string> 1051 </property> 1052 <property name="text"> 1053 <string>0.5, 0.5</string> 1054 </property> 1055 </widget> 1056 </item> 1057 <item row="9" column="4"> 1058 <widget class="QLabel" name="label_45"> 1059 <property name="minimumSize"> 1060 <size> 1061 <width>18</width> 1062 <height>21</height> 1063 </size> 1064 </property> 1065 <property name="text"> 1066 <string>cm</string> 506 1067 </property> 507 1068 </widget> … … 512 1073 </widget> 513 1074 </item> 514 <item row="0" column="1" rowspan="7">515 <widget class="Line" name="line_4">516 <property name="orientation">517 <enum>Qt::Vertical</enum>518 </property>519 </widget>520 </item>521 <item row="0" column="2" rowspan="3">522 <widget class="QGraphicsView" name="graphicsView">523 <property name="sizePolicy">524 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">525 <horstretch>0</horstretch>526 <verstretch>0</verstretch>527 </sizepolicy>528 </property>529 </widget>530 </item>531 <item row="1" column="0">532 <widget class="Line" name="line">533 <property name="orientation">534 <enum>Qt::Horizontal</enum>535 </property>536 </widget>537 </item>538 <item row="2" column="0">539 <widget class="QGroupBox" name="groupBox_2">540 <property name="title">541 <string>Q Location of the Estimation</string>542 </property>543 <layout class="QGridLayout" name="gridLayout_9">544 <item row="0" column="0">545 <layout class="QGridLayout" name="gridLayout">546 <item row="0" column="0">547 <widget class="QLabel" name="label_21">548 <property name="text">549 <string>Qx:</string>550 </property>551 </widget>552 </item>553 <item row="0" column="1">554 <widget class="QLineEdit" name="txtQx">555 <property name="minimumSize">556 <size>557 <width>100</width>558 <height>21</height>559 </size>560 </property>561 <property name="baseSize">562 <size>563 <width>100</width>564 <height>21</height>565 </size>566 </property>567 <property name="toolTip">568 <string>Type the Qx value.</string>569 </property>570 <property name="text">571 <string>0.0</string>572 </property>573 </widget>574 </item>575 <item row="0" column="2">576 <widget class="QLabel" name="lblUnitQx">577 <property name="text">578 <string><html><head/><body><p>Ã579 <span style=" vertical-align:super;">-1</span></p></body></html></string>580 </property>581 </widget>582 </item>583 <item row="1" column="0">584 <widget class="QLabel" name="label_22">585 <property name="text">586 <string>Qy:</string>587 </property>588 </widget>589 </item>590 <item row="1" column="1">591 <widget class="QLineEdit" name="txtQy">592 <property name="minimumSize">593 <size>594 <width>100</width>595 <height>21</height>596 </size>597 </property>598 <property name="baseSize">599 <size>600 <width>100</width>601 <height>21</height>602 </size>603 </property>604 <property name="toolTip">605 <string>Type the Qy value.</string>606 </property>607 <property name="text">608 <string>0.0</string>609 </property>610 </widget>611 </item>612 <item row="1" column="2">613 <widget class="QLabel" name="lblUnitQy">614 <property name="text">615 <string><html><head/><body><p>Ã616 <span style=" vertical-align:super;">-1</span></p></body></html></string>617 </property>618 </widget>619 </item>620 </layout>621 </item>622 </layout>623 </widget>624 </item>625 <item row="3" column="0">626 <widget class="Line" name="line_2">627 <property name="orientation">628 <enum>Qt::Horizontal</enum>629 </property>630 </widget>631 </item>632 <item row="4" column="0">633 <widget class="QGroupBox" name="groupBox_3">634 <property name="title">635 <string>Standard Deviation of the Resolution Distribtion</string>636 </property>637 <layout class="QGridLayout" name="gridLayout_4">638 <item row="0" column="0">639 <layout class="QGridLayout" name="gridLayout_2">640 <item row="0" column="0">641 <widget class="QLabel" name="label">642 <property name="text">643 <string>Sigma_x:</string>644 </property>645 </widget>646 </item>647 <item row="0" column="1">648 <widget class="QLineEdit" name="txtSigma_x">649 <property name="enabled">650 <bool>true</bool>651 </property>652 <property name="minimumSize">653 <size>654 <width>100</width>655 <height>21</height>656 </size>657 </property>658 <property name="baseSize">659 <size>660 <width>100</width>661 <height>21</height>662 </size>663 </property>664 <property name="toolTip">665 <string>The x component of the geometric resolution, excluding sigma_lamda.</string>666 </property>667 <property name="text">668 <string>0.0008288</string>669 </property>670 <property name="readOnly">671 <bool>true</bool>672 </property>673 </widget>674 </item>675 <item row="0" column="2">676 <widget class="QLabel" name="lblUnitSigmax">677 <property name="text">678 <string><html><head/><body><p>Ã679 <span style=" vertical-align:super;">-1</span></p></body></html></string>680 </property>681 </widget>682 </item>683 <item row="0" column="3">684 <spacer name="horizontalSpacer">685 <property name="orientation">686 <enum>Qt::Horizontal</enum>687 </property>688 <property name="sizeHint" stdset="0">689 <size>690 <width>78</width>691 <height>20</height>692 </size>693 </property>694 </spacer>695 </item>696 <item row="0" column="4">697 <widget class="QLabel" name="label_5">698 <property name="text">699 <string>Sigma_y:</string>700 </property>701 </widget>702 </item>703 <item row="0" column="5">704 <widget class="QLineEdit" name="txtSigma_y">705 <property name="enabled">706 <bool>true</bool>707 </property>708 <property name="minimumSize">709 <size>710 <width>100</width>711 <height>21</height>712 </size>713 </property>714 <property name="baseSize">715 <size>716 <width>100</width>717 <height>21</height>718 </size>719 </property>720 <property name="toolTip">721 <string>The y component of the geometric resolution, excluding sigma_lamda.</string>722 </property>723 <property name="text">724 <string>0.0008288</string>725 </property>726 <property name="readOnly">727 <bool>true</bool>728 </property>729 </widget>730 </item>731 <item row="0" column="6">732 <widget class="QLabel" name="lblUnitSigmay">733 <property name="text">734 <string><html><head/><body><p>Ã735 <span style=" vertical-align:super;">-1</span></p></body></html></string>736 </property>737 </widget>738 </item>739 <item row="1" column="0">740 <widget class="QLabel" name="label_2">741 <property name="text">742 <string>Sigma_lamd:</string>743 </property>744 </widget>745 </item>746 <item row="1" column="2">747 <widget class="QLabel" name="lblUnitSigmalamd">748 <property name="text">749 <string><html><head/><body><p>Ã750 <span style=" vertical-align:super;">-1</span></p></body></html></string>751 </property>752 </widget>753 </item>754 <item row="1" column="4">755 <widget class="QLabel" name="label_6">756 <property name="text">757 <string>(1D) Sigma:</string>758 </property>759 </widget>760 </item>761 <item row="1" column="5">762 <widget class="QLineEdit" name="txt1DSigma">763 <property name="enabled">764 <bool>true</bool>765 </property>766 <property name="minimumSize">767 <size>768 <width>100</width>769 <height>21</height>770 </size>771 </property>772 <property name="baseSize">773 <size>774 <width>100</width>775 <height>21</height>776 </size>777 </property>778 <property name="toolTip">779 <string>Resolution in 1-dimension (for 1D data).</string>780 </property>781 <property name="text">782 <string>0.0008289</string>783 </property>784 <property name="readOnly">785 <bool>true</bool>786 </property>787 </widget>788 </item>789 <item row="1" column="6">790 <widget class="QLabel" name="lblUnit1DSigma">791 <property name="text">792 <string><html><head/><body><p>Ã793 <span style=" vertical-align:super;">-1</span></p></body></html></string>794 </property>795 </widget>796 </item>797 <item row="1" column="1">798 <widget class="QLineEdit" name="txtSigma_lamd">799 <property name="enabled">800 <bool>true</bool>801 </property>802 <property name="minimumSize">803 <size>804 <width>100</width>805 <height>21</height>806 </size>807 </property>808 <property name="baseSize">809 <size>810 <width>100</width>811 <height>21</height>812 </size>813 </property>814 <property name="toolTip">815 <string>The wavelength contribution in the radial direction. Note: The phi component is always zero.</string>816 </property>817 <property name="text">818 <string>3.168e-05</string>819 </property>820 <property name="readOnly">821 <bool>true</bool>822 </property>823 </widget>824 </item>825 </layout>826 </item>827 </layout>828 </widget>829 </item>830 <item row="5" column="0">831 <widget class="Line" name="line_3">832 <property name="orientation">833 <enum>Qt::Horizontal</enum>834 </property>835 </widget>836 </item>837 <item row="6" column="0">838 <layout class="QGridLayout" name="gridLayout_3">839 <item row="0" column="0">840 <widget class="QPushButton" name="cmdReset">841 <property name="toolTip">842 <string>Reset to default SAS instrumental parameter</string>843 </property>844 <property name="text">845 <string>Reset</string>846 </property>847 <property name="autoDefault">848 <bool>false</bool>849 </property>850 </widget>851 </item>852 <item row="0" column="1">853 <widget class="QPushButton" name="cmdCompute">854 <property name="toolTip">855 <string>Compute the resolution of Q from SAS instrumental parameter</string>856 </property>857 <property name="text">858 <string>Compute</string>859 </property>860 <property name="autoDefault">861 <bool>false</bool>862 </property>863 </widget>864 </item>865 <item row="0" column="2">866 <widget class="QPushButton" name="cmdClose">867 <property name="toolTip">868 <string>Close this window</string>869 </property>870 <property name="text">871 <string>Close</string>872 </property>873 <property name="autoDefault">874 <bool>false</bool>875 </property>876 </widget>877 </item>878 <item row="0" column="3">879 <widget class="QPushButton" name="cmdHelp">880 <property name="toolTip">881 <string>Help on using the Resolution Calculator</string>882 </property>883 <property name="text">884 <string>Help</string>885 </property>886 <property name="autoDefault">887 <bool>false</bool>888 </property>889 </widget>890 </item>891 </layout>892 </item>893 <item row="5" column="2">894 <spacer name="horizontalSpacer_2">895 <property name="orientation">896 <enum>Qt::Horizontal</enum>897 </property>898 <property name="sizeHint" stdset="0">899 <size>900 <width>40</width>901 <height>20</height>902 </size>903 </property>904 </spacer>905 </item>906 1075 </layout> 907 1076 <zorder>groupBox</zorder> 908 1077 <zorder>groupBox_2</zorder> 909 <zorder>line</zorder>910 <zorder>line_2</zorder>911 1078 <zorder>groupBox_3</zorder> 912 <zorder>line_3</zorder>913 1079 <zorder>graphicsView</zorder> 914 1080 <zorder>line_4</zorder> … … 931 1097 <tabstop>txtQy</tabstop> 932 1098 <tabstop>cmdCompute</tabstop> 933 <tabstop>cmdClose</tabstop>934 1099 <tabstop>cmdHelp</tabstop> 935 1100 <tabstop>cmdReset</tabstop> 936 <tabstop> txtSigma_x</tabstop>1101 <tabstop>cmdClose</tabstop> 937 1102 <tabstop>txtSigma_lamd</tabstop> 938 1103 <tabstop>txtSigma_y</tabstop> 939 1104 <tabstop>txt1DSigma</tabstop> 940 1105 <tabstop>graphicsView</tabstop> 1106 <tabstop>txtSigma_x</tabstop> 941 1107 </tabstops> 942 1108 <resources/> -
src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py
r01cda57 rfc4fec8 51 51 self.assertEqual(self.widget.windowTitle(), "Q Resolution Estimator") 52 52 # size 53 self.assertEqual(self.widget.size().height(), 667)54 self.assertEqual(self.widget.size().width(), 1 310)53 self.assertEqual(self.widget.size().height(), 561) 54 self.assertEqual(self.widget.size().width(), 1034) 55 55 56 56 # visibility … … 269 269 # thread called 270 270 self.assertTrue(threads.deferToThread.called) 271 self.assertEqual(threads.deferToThread.call_args_list[0][0][0].__name__, ' complete')271 self.assertEqual(threads.deferToThread.call_args_list[0][0][0].__name__, 'map_wrapper') 272 272 273 273 # the Compute button changed caption and got disabled
Note: See TracChangeset
for help on using the changeset viewer.