Changeset 5123512 in sasview for src/sas/qtgui/Perspectives/Corfunc
- Timestamp:
- Mar 26, 2019 12:06:46 PM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl
- Children:
- 50b33d0
- Parents:
- 9f3db13 (diff), 85503bc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Piotr Rozyczko <piotr.rozyczko@…> (03/26/19 12:06:46)
- git-committer:
- GitHub <noreply@…> (03/26/19 12:06:46)
- Location:
- src/sas/qtgui/Perspectives/Corfunc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
rdee9e5f r3beadede 7 7 from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg \ 8 8 as FigureCanvas 9 from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT 9 10 from matplotlib.figure import Figure 10 11 from numpy.linalg.linalg import LinAlgError … … 35 36 self.data = None 36 37 self.extrap = None 38 self.setMinimumSize(300, 300) 37 39 38 40 def draw_q_space(self): … … 49 51 self.axes.set_xscale("log") 50 52 self.axes.set_yscale("log") 53 self.axes.set_xlabel("Q [$\AA^{-1}$]") 54 self.axes.set_ylabel("I(Q) [cm$^{-1}$]") 55 self.axes.set_title("Scattering data") 56 self.fig.tight_layout() 51 57 52 58 qmin = float(self.model.item(W.W_QMIN).text()) … … 55 61 56 62 if self.data: 57 self.axes.plot(self.data.x, self.data.y) 63 # self.axes.plot(self.data.x, self.data.y, label="Experimental Data") 64 self.axes.errorbar(self.data.x, self.data.y, yerr=self.data.dy, label="Experimental Data") 58 65 self.axes.axvline(qmin) 59 66 self.axes.axvline(qmax1) … … 61 68 self.axes.set_xlim(min(self.data.x) / 2, 62 69 max(self.data.x) * 1.5 - 0.5 * min(self.data.x)) 70 self.axes.set_ylim(min(self.data.y) / 2, 71 max(self.data.y) * 1.5 - 0.5 * min(self.data.y)) 72 63 73 if self.extrap: 64 self.axes.plot(self.extrap.x, self.extrap.y) 74 self.axes.plot(self.extrap.x, self.extrap.y, label="Extrapolation") 75 76 if self.data or self.extrap: 77 self.axes.legend() 65 78 66 79 self.draw() … … 78 91 self.axes.set_xscale("linear") 79 92 self.axes.set_yscale("linear") 93 self.axes.set_xlabel("Z [$\AA$]") 94 self.axes.set_ylabel("Correlation") 95 self.axes.set_title("Real Space Correlations") 96 self.fig.tight_layout() 80 97 81 98 if self.data: … … 85 102 self.axes.plot(data_idf.x, data_idf.y, 86 103 label="Interface Distribution Function") 87 self.axes.set_xlim( min(data1.x), max(data1.x) / 4)104 self.axes.set_xlim(0, max(data1.x) / 4) 88 105 self.axes.legend() 89 106 … … 115 132 116 133 self._canvas = MyMplCanvas(self.model) 117 self.mainVerticalLayout.insertWidget(0, self._canvas) 134 self.plotLayout.insertWidget(0, self._canvas) 135 self.plotLayout.insertWidget(1, NavigationToolbar2QT(self._canvas, self)) 136 self._realplot = MyMplCanvas(self.model) 137 self.plotLayout.insertWidget(2, self._realplot) 138 self.plotLayout.insertWidget(3, NavigationToolbar2QT(self._realplot, self)) 139 140 self.gridLayout_8.setColumnStretch(0, 1) 141 self.gridLayout_8.setColumnStretch(1, 3) 118 142 119 143 # Connect buttons to slots. … … 238 262 self.model.setItem(W.W_POLY, QtGui.QStandardItem("{:.3g}".format(params['A']))) 239 263 self.model.setItem(W.W_PERIOD, QtGui.QStandardItem("{:.3g}".format(params['max']))) 240 #self._realplot.data = transforms264 self._realplot.data = transforms 241 265 242 266 self.update_real_space_plot(transforms) 243 267 244 #self._realplot.draw_real_space()268 self._realplot.draw_real_space() 245 269 246 270 def update_real_space_plot(self, datas): … … 358 382 self.cmdTransform.setEnabled(False) 359 383 360 #self._realplot.data = None361 #self._realplot.draw_real_space()384 self._realplot.data = None 385 self._realplot.draw_real_space() 362 386 363 387 def setClosable(self, value=True): -
src/sas/qtgui/Perspectives/Corfunc/UI/CorfuncPanel.ui
rcb4d219 r85503bc 18 18 <layout class="QVBoxLayout" name="mainVerticalLayout"> 19 19 <item> 20 <spacer name="verticalSpacer">21 <property name="orientation">22 <enum>Qt::Vertical</enum>23 </property>24 <property name="sizeHint" stdset="0">25 <size>26 <width>20</width>27 <height>38</height>28 </size>29 </property>30 </spacer>31 </item>32 <item>33 20 <widget class="QGroupBox" name="groupBox"> 34 21 <property name="title"> … … 322 309 </item> 323 310 <item row="0" column="1"> 324 <widget class="QLineEdit" name="txtLongPeriod"/> 311 <widget class="QLineEdit" name="txtLongPeriod" width="50"> 312 <property name="minimumSize" stdset="0"> 313 <size> 314 <width>60</width> 315 <height>20</height> 316 </size> 317 </property> 318 </widget> 325 319 </item> 326 320 <item row="0" column="2"> … … 332 326 </item> 333 327 <item row="0" column="3"> 334 <widget class="QLineEdit" name="txtAvgIntThick"/> 328 <widget class="QLineEdit" name="txtAvgIntThick"> 329 <property name="minimumSize" stdset="0"> 330 <size> 331 <width>60</width> 332 <height>20</height> 333 </size> 334 </property> 335 </widget> 335 336 </item> 336 337 <item row="1" column="0"> … … 417 418 </layout> 418 419 </item> 420 <item> 421 <spacer name="verticalSpacer"> 422 <property name="orientation"> 423 <enum>Qt::Vertical</enum> 424 </property> 425 <property name="sizeHint" stdset="0"> 426 <size> 427 <width>20</width> 428 <height>38</height> 429 </size> 430 </property> 431 </spacer> 432 </item> 433 </layout> 434 </item> 435 <item row="0" column="1"> 436 <layout class="QVBoxLayout" name="plotLayout"> 419 437 </layout> 420 438 </item>
Note: See TracChangeset
for help on using the changeset viewer.