Skip to content

Commit ef74a8b

Browse files
committed
Increase maximum corfunc range to 1000
1 parent dcd6efd commit ef74a8b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/sas/sascalc/corfunc/transform_thread.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def compute(self):
4444
# ----- 3D Correlation Function -----
4545
# gamma3(R) = 1/R int_{0}^{R} gamma1(x) dx
4646
# trapz uses the trapezium rule to calculate the integral
47-
mask = xs <= 200.0 # Only calculate gamma3 up to x=200 (as this is all that's plotted)
47+
mask = xs <= 1000.0 # Only calculate gamma3 up to x=1000 (as this is all that's plotted)
4848
# gamma3 = [trapz(gamma1[:n], xs[:n])/xs[n-1] for n in range(2, len(xs[mask]) + 1)]j
4949
# gamma3.insert(0, 1.0) # Gamma_3(0) is defined as 1
5050
n = len(xs[mask])
@@ -78,7 +78,7 @@ def compute(self):
7878
self.update(msg="Fourier transform completed.")
7979

8080
transform1 = Data1D(xs, gamma1)
81-
transform3 = Data1D(xs[xs <= 200], gamma3)
81+
transform3 = Data1D(xs[xs <= 1000], gamma3)
8282
idf = Data1D(xs, idf)
8383

8484
transforms = (transform1, transform3, idf)

src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,14 @@ def transform_complete(self, transforms=None):
276276

277277
self._transformed_data = transforms
278278
(transform1, transform3, idf) = transforms
279-
plot_x = transform1.x[transform1.x <= 200]
280-
plot_y = transform1.y[transform1.x <= 200]
279+
plot_x = transform1.x[transform1.x <= 1000]
280+
plot_y = transform1.y[transform1.x <= 1000]
281281
self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL1)
282-
# No need to shorten gamma3 as it's only calculated up to x=200
282+
# No need to shorten gamma3 as it's only calculated up to x=1000
283283
self._manager.show_data(transform3, TRANSFORM_LABEL3)
284284

285-
plot_x = idf.x[idf.x <= 200]
286-
plot_y = idf.y[idf.x <= 200]
285+
plot_x = idf.x[idf.x <= 1000]
286+
plot_y = idf.y[idf.x <= 1000]
287287
self._manager.show_data(Data1D(plot_x, plot_y), IDF_LABEL)
288288

289289
# Only enable extract params button if a fourier trans. has been done

0 commit comments

Comments
 (0)