- Timestamp:
- Jul 17, 2017 9:53:16 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:
- 7cde638
- Parents:
- 2a54ba5
- Location:
- src/sas
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/corfunc/transform_thread.py
r2a54ba5 r22194b1 35 35 # gamma3(R) = 1/R int_{0}^{R} gamma1(x) dx 36 36 # trapz uses the trapezium rule to calculate the integral 37 gamma3 = [trapz(gamma1[:n], xs[:n])/xs[n-1] for n in range(1, len(xs+1))] 37 mask = xs <= 200.0 # Only calculate gamma3 up to x=200 (as this is all that's plotted) 38 gamma3 = [trapz(gamma1[:n], xs[:n])/xs[n-1] for n in range(2, len(xs[mask]) + 1)] 39 gamma3.insert(0, 1.0) # Gamma_3(0) is defined as 1 38 40 gamma3 = np.array(gamma3) 39 41 except Exception as e: … … 50 52 51 53 transform1 = Data1D(xs, gamma1) 52 transform3 = Data1D(xs , gamma3)54 transform3 = Data1D(xs[xs <= 200], gamma3) 53 55 54 56 transforms = (transform1, transform3) -
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r412c509 r22194b1 281 281 plot_y = transform1.y[np.where(transform1.x <= 200)] 282 282 self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL1) 283 plot_x = transform3.x [np.where(transform3.x <= 200)]284 plot_y = transform3.y [np.where(transform3.x <= 200)]283 plot_x = transform3.x 284 plot_y = transform3.y 285 285 self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL3) 286 286 # Only enable extract params button if a fourier trans. has been done
Note: See TracChangeset
for help on using the changeset viewer.