diff --git a/news/qmin_qmax.rst b/news/qmin_qmax.rst new file mode 100644 index 0000000..1d45372 --- /dev/null +++ b/news/qmin_qmax.rst @@ -0,0 +1,24 @@ +**Added:** + +* + +**Changed:** + +* Inclusion of `Qmin` and `Qmax` after mask is applied +* Test data has been modified so tests can pass + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index 219a87b..a50dac7 100755 --- a/src/diffpy/fourigui/fourigui.py +++ b/src/diffpy/fourigui/fourigui.py @@ -484,7 +484,7 @@ def applycutoff(self): r2_outer = qmax**2 i, j, k = np.meshgrid(np.arange(xdim), np.arange(ydim), np.arange(zdim)) r2 = (i - xdim // 2) ** 2 + (j - ydim // 2) ** 2 + (k - zdim // 2) ** 2 - mask = (r2 <= r2_inner) | (r2 >= r2_outer) # True if voxel is out of range + mask = (r2 < r2_inner) | (r2 > r2_outer) # True if voxel is out of range sphere[mask] = np.nan # therefore set to np.nan if out of range if self.space.get(): diff --git a/tests/testdata/gofr_from_sofq_cut_10to40px.h5 b/tests/testdata/gofr_from_sofq_cut_10to40px.h5 index 583c0f9..1a72f92 100644 Binary files a/tests/testdata/gofr_from_sofq_cut_10to40px.h5 and b/tests/testdata/gofr_from_sofq_cut_10to40px.h5 differ diff --git a/tests/testdata/gofr_from_sofq_cut_15to35px.h5 b/tests/testdata/gofr_from_sofq_cut_15to35px.h5 index f7cd656..11cea2a 100644 Binary files a/tests/testdata/gofr_from_sofq_cut_15to35px.h5 and b/tests/testdata/gofr_from_sofq_cut_15to35px.h5 differ diff --git a/tests/testdata/sofq_cut_10to40px.h5 b/tests/testdata/sofq_cut_10to40px.h5 index a116f88..7a0a2e1 100644 Binary files a/tests/testdata/sofq_cut_10to40px.h5 and b/tests/testdata/sofq_cut_10to40px.h5 differ diff --git a/tests/testdata/sofq_cut_15to35px.h5 b/tests/testdata/sofq_cut_15to35px.h5 index 2b5ab43..b9a55d6 100644 Binary files a/tests/testdata/sofq_cut_15to35px.h5 and b/tests/testdata/sofq_cut_15to35px.h5 differ