Changeset 457f735 in sasview
- Timestamp:
- Jul 11, 2017 5:05:13 AM (7 years ago)
- Branches:
- master, 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 412c509
- Parents:
- 03e3902
- Location:
- src/sas
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/corfunc/transform_thread.py
rd03228e r457f735 25 25 return 26 26 try: 27 gamma = dct((iqs-background)*qs**2)28 gamma = gamma / gamma.max()27 gamma1 = dct((iqs-background)*qs**2) 28 gamma1 = gamma1 / gamma1.max() 29 29 except: 30 30 self.update(msg="Fourier transform failed.") … … 36 36 37 37 xs = np.pi*np.arange(len(qs),dtype=np.float32)/(q[1]-q[0])/len(qs) 38 transform = Data1D(xs, gamma) 38 transform1 = Data1D(xs, gamma1) 39 transform3 = Data1D() 39 40 40 self.complete(transform=transform) 41 transforms = (transform1, transform3) 42 43 self.complete(transforms=transforms) 41 44 42 45 class HilbertThread(CalcThread): -
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r7432acb r457f735 257 257 StatusEvent(status=msg)) 258 258 259 def transform_complete(self, transform =None):259 def transform_complete(self, transforms=None): 260 260 """ 261 261 Called from FourierThread when calculation has completed 262 262 """ 263 263 self._transform_btn.SetLabel("Transform") 264 if transform is None:264 if transforms is None: 265 265 msg = "Error calculating Transform." 266 266 if self.transform_type == 'hilbert': … … 270 270 self._extract_btn.Disable() 271 271 return 272 self._transformed_data = transform 272 self._transformed_data = transforms 273 (transform1, transform3) = transforms 273 274 import numpy as np 274 plot_x = transform .x[np.where(transform.x <= 200)]275 plot_y = transform .y[np.where(transform.x <= 200)]275 plot_x = transform1.x[np.where(transform1.x <= 200)] 276 plot_y = transform1.y[np.where(transform1.x <= 200)] 276 277 self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL1) 277 278 # Only enable extract params button if a fourier trans. has been done … … 286 287 """ 287 288 try: 288 params = self._calculator.extract_parameters(self._transformed_data )289 params = self._calculator.extract_parameters(self._transformed_data[0]) 289 290 except: 290 291 params = None -
src/sas/sasgui/perspectives/corfunc/corfunc_state.py
r7432acb r457f735 59 59 self.q = None 60 60 self.iq = None 61 # TODO: Add extrapolated data and transformed data (when implemented)62 61 63 62 def __str__(self):
Note: See TracChangeset
for help on using the changeset viewer.