- Timestamp:
- Oct 24, 2017 10:04:16 AM (7 years ago)
- Children:
- c1b3ffb
- Parents:
- f159d1b
- Location:
- src/sas/qtgui/Perspectives/Corfunc
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
rf159d1b rf7b73d5 59 59 self.axes.axvline(self.qmax2) 60 60 if self.extrap: 61 print(self.extrap)62 61 self.axes.plot(self.extrap.x, self.extrap.y) 63 62 64 63 self.draw() 65 64 65 def drawRealSpace(self): 66 self.fig.clf() 67 68 self.axes = self.fig.add_subplot(111) 69 self.axes.set_xscale("linear") 70 self.axes.set_yscale("linear") 71 72 if self.data: 73 self.axes.plot(self.data.x, self.data.y) 74 75 self.draw() 66 76 67 77 … … 91 101 92 102 self._canvas = MyMplCanvas(self) 103 self._realplot = MyMplCanvas(self) 93 104 self.verticalLayout_7.insertWidget(0,self._canvas) 105 self.verticalLayout_7.insertWidget(1, self._realplot) 94 106 95 107 # Connect buttons to slots. … … 106 118 self.extractBtn.clicked.connect(self.action) 107 119 self.extrapolateBtn.clicked.connect(self.extrapolate) 108 self.transformBtn.clicked.connect(self. action)120 self.transformBtn.clicked.connect(self.transform) 109 121 110 122 self.calculateBgBtn.clicked.connect(self.calculateBackground) … … 159 171 self.porodK.setValue(params['K']) 160 172 self.porodSigma.setValue(params['sigma']) 161 print(params)162 173 self._canvas.extrap = extrapolation 163 174 self._canvas.drawQSpace() 164 175 176 177 def transform(self): 178 if self.fourierBtn.isChecked(): 179 method = "fourier" 180 elif self.hilbertBtn.isChecked(): 181 method = "hilbert" 182 183 extrap = self._canvas.extrap 184 bg = self._calculator.background 185 def updatefn(*args, **kwargs): 186 pass 187 188 def completefn(transform): 189 self._realplot.data = transform 190 self._realplot.drawRealSpace() 191 192 self._calculator.compute_transform(extrap, method, bg, completefn, updatefn) 165 193 166 194 -
src/sas/qtgui/Perspectives/Corfunc/UI/CorfuncPanel.ui
r22e6043 rf7b73d5 15 15 </property> 16 16 <layout class="QGridLayout" name="gridLayout"> 17 <item row="0" column="0"> 18 <layout class="QVBoxLayout" name="verticalLayout_7"> 17 <item row="1" column="0"> 18 <layout class="QVBoxLayout" name="verticalLayout_7" stretch="1,0,0"> 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>40</height> 28 </size> 29 </property> 30 </spacer> 31 </item> 19 32 <item> 20 33 <layout class="QHBoxLayout" name="horizontalLayout_2"> … … 156 169 <layout class="QHBoxLayout" name="horizontalLayout_3"> 157 170 <item> 158 <layout class="QVBoxLayout" name="verticalLayout_2" >171 <layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,1,1"> 159 172 <item alignment="Qt::AlignHCenter"> 160 173 <widget class="QLabel" name="label_5"> … … 169 182 <string>Fourier</string> 170 183 </property> 184 <property name="checked"> 185 <bool>true</bool> 186 </property> 171 187 </widget> 172 188 </item> … … 181 197 </item> 182 198 <item> 183 <layout class="QVBoxLayout" name="verticalLayout" >199 <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1"> 184 200 <item alignment="Qt::AlignHCenter"> 185 201 <widget class="QLabel" name="label_3"> … … 191 207 <item> 192 208 <layout class="QFormLayout" name="formLayout"> 209 <property name="sizeConstraint"> 210 <enum>QLayout::SetMinimumSize</enum> 211 </property> 212 <property name="fieldGrowthPolicy"> 213 <enum>QFormLayout::FieldsStayAtSizeHint</enum> 214 </property> 193 215 <item row="0" column="0"> 194 216 <widget class="QDoubleSpinBox" name="qMin"> … … 256 278 </item> 257 279 <item> 258 <layout class="QVBoxLayout" name="verticalLayout_6" >280 <layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,1"> 259 281 <item alignment="Qt::AlignHCenter"> 260 282 <widget class="QLabel" name="label_13"> … … 265 287 </item> 266 288 <item> 267 <layout class="QHBoxLayout" name="horizontalLayout" >289 <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0"> 268 290 <item> 269 291 <widget class="QPushButton" name="extrapolateBtn">
Note: See TracChangeset
for help on using the changeset viewer.