diff --git a/src/toolbox_scs/detectors/hrixs.py b/src/toolbox_scs/detectors/hrixs.py index 63bce3454083712d22df687637b8635ecd2fa699..3dabbdd73be14cec52e408c9d3a4c49ae501e72e 100644 --- a/src/toolbox_scs/detectors/hrixs.py +++ b/src/toolbox_scs/detectors/hrixs.py @@ -398,7 +398,7 @@ class hRIXS: Example ------- - data = h.centroid(data) # find photons in all images of the run + h.centroid(data) # find photons in all images of the run data.spectrum[0, :].plot() # plot the spectrum of the first image """ if bins is None: @@ -497,7 +497,7 @@ class hRIXS: Example ------- - data = h.centroid(data) # create spectra from finding photons + h.centroid(data) # create spectra from finding photons agg = h.aggregate(data) # sum all spectra agg.spectrum.plot() # plot the resulting spectrum diff --git a/src/toolbox_scs/test/test_hrixs.py b/src/toolbox_scs/test/test_hrixs.py index 0a78db7597f8adb9188a260ead53c5f29c48ef9b..7b75cdef6a103f53f033645b34f15fba979f8588 100644 --- a/src/toolbox_scs/test/test_hrixs.py +++ b/src/toolbox_scs/test/test_hrixs.py @@ -53,7 +53,8 @@ class TestHRIXS(unittest.TestCase): ]) h.CURVE_A = 0.1 h.CURVE_B = 0.01 - data = h.centroid(data) + r = h.centroid(data) + self.assertIs(r, data) assert_array_equal(data['spectrum'], [ [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0],