Ticket #8702: rebin_full_bins_only_test.py
| File rebin_full_bins_only_test.py, 405 bytes (added by Arturs Bekasovs, 7 years ago) |
|---|
| Line | |
|---|---|
| 1 | import numpy as np |
| 2 | |
| 3 | ws = WorkspaceFactory.create("Workspace2D", 1, 10, 9) |
| 4 | |
| 5 | xValues = np.array(range(1,11)) * 0.5 # 0.5 1.0 1.5 2.0 2.5 ... |
| 6 | yValues = np.empty(9); yValues.fill(3.0) # 3.0 3.0 3.0 .... |
| 7 | |
| 8 | ws.setX(0, xValues) |
| 9 | ws.setY(0, yValues) |
| 10 | |
| 11 | mtd.addOrReplace("ws", ws) |
| 12 | |
| 13 | result = Rebin("ws", "0.5,2.0,5.0", FullBinsOnly=True) |
| 14 | # result = Rebin("ws", "0.5,2.0,5.0") - this would include the smaller last bin |
| 15 |
