# Changeset ef74a8b in sasview

Ignore:
Timestamp:
Jan 22, 2019 12:14:30 PM (5 years ago)
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
Children:
1342f6a
Parents:
dcd6efd
Message:

Increase maximum corfunc range to 1000

Location:
src/sas
Files:
2 edited

Unmodified
Added
Removed
• ## src/sas/sascalc/corfunc/transform_thread.py

 ra859f99 # gamma3(R) = 1/R int_{0}^{R} gamma1(x) dx # trapz uses the trapezium rule to calculate the integral mask = xs <= 200.0 # Only calculate gamma3 up to x=200 (as this is all that's plotted) mask = xs <= 1000.0 # Only calculate gamma3 up to x=1000 (as this is all that's plotted) # gamma3 = [trapz(gamma1[:n], xs[:n])/xs[n-1] for n in range(2, len(xs[mask]) + 1)]j # gamma3.insert(0, 1.0) # Gamma_3(0) is defined as 1 transform1 = Data1D(xs, gamma1) transform3 = Data1D(xs[xs <= 200], gamma3) transform3 = Data1D(xs[xs <= 1000], gamma3) idf = Data1D(xs, idf)
• ## src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

 r5652efc self._transformed_data = transforms (transform1, transform3, idf) = transforms plot_x = transform1.x[transform1.x <= 200] plot_y = transform1.y[transform1.x <= 200] plot_x = transform1.x[transform1.x <= 1000] plot_y = transform1.y[transform1.x <= 1000] self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL1) # No need to shorten gamma3 as it's only calculated up to x=200 # No need to shorten gamma3 as it's only calculated up to x=1000 self._manager.show_data(transform3, TRANSFORM_LABEL3) plot_x = idf.x[idf.x <= 200] plot_y = idf.y[idf.x <= 200] plot_x = idf.x[idf.x <= 1000] plot_y = idf.y[idf.x <= 1000] self._manager.show_data(Data1D(plot_x, plot_y), IDF_LABEL)
Note: See TracChangeset for help on using the changeset viewer.