Ticket #4203 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Extend SmoothNeighbours to include a Gaussian weighting option

Reported by: Nick Draper Owned by: Owen Arnold
Priority: critical Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Vickie Lynch

Description

Talk to Jon Taylor to see how this was applied in Libisis.

Change History

comment:1 Changed 9 years ago by Owen Arnold

  • Status changed from new to accepted

Also see #4150 as there is work currently undergoing to change the API of the SmoothNeighbours algorithm.

comment:2 Changed 9 years ago by Owen Arnold

refs #4203 Refactoring of existing weighting logic

Start work on this by implementing WeightedSum as a strategy. This does not affect the current algorithm API as care will be needed when that is done. Strategies introduced are NullWeighting, FlatWeighting and LinearWeighting to encapuslate the existing weighting logic. These strategies are separately tested. Changeset: 236bb97e8e602e799fac406ae9ed4fdafdc020df

comment:3 Changed 9 years ago by Owen Arnold

refs #4203. Fix unused arg warning.

Changeset: a9d4ed17b07747ddc87d9688107de24df56784e9

comment:4 Changed 9 years ago by Owen Arnold

refs #4203 Now employs intesection of num neighbours and radius.

Tests pass, but additional tests not added yet. Changeset: 0d286f29eb1173e5ea415b61de206d3387f4cab5

comment:5 Changed 9 years ago by Owen Arnold

refs #4203 4150. Extract and test a separate filtering type

Changeset: ba9942b2c55b4af3d01adbc05d8247facb6ba38c

comment:6 Changed 9 years ago by Owen Arnold

refs #4203 4150. Better way of finding initial detector

Changeset: 7fa318d4e1b81167ed4dd5882612ad6240a3322b

comment:7 Changed 9 years ago by Owen Arnold

refs #4203 4150. Parabolic strategy and associated tests

Changeset: 9eca06009f9780c3ed3c075ef8afc59035b1ed52

comment:8 Changed 9 years ago by Owen Arnold

refs #4203 4150. Update SNS single crystal reduction script

Changeset: 4a9eb901471cb386ac058820f2c9edcc498dadf4

comment:9 Changed 9 years ago by Owen Arnold

refs #4203 #4150. Fix iterator usage error + warnings

Changeset: 3233895b75dcbb9fbfc1af2853ccb0e1e974e84b

comment:10 Changed 9 years ago by Owen Arnold

refs #4203 #4150. Fix unused arg warning

Changeset: ea2a83db6c14bc1d2d26eed49755e46ebf7df3da

comment:11 Changed 9 years ago by Owen Arnold

refs #4203 #4150. Minor change to wiki docs

Changeset: 2b6fc8367a1741d54f1dab584e617a5a1be0b16c

comment:12 Changed 9 years ago by Owen Arnold

refs #4203 #4150. Minor change to wiki docs

Changeset: 020e92fea6d85318dc5b0ae3a633a6228d9a0f49

comment:13 Changed 9 years ago by Owen Arnold

refs #4203. Refactor into separate class.

Too many different weighting strategies now to hold all withing SmoothNeighbours itself

Changeset: 12ffcdbd35e49d9b2024bc50f63e0a8bea708693

comment:14 Changed 9 years ago by Owen Arnold

refs #4203. Fix GCC errors and warnings.

Changeset: d39302c975b82b90c0f2b39a6b379cee6a5ad2a4

comment:15 Changed 9 years ago by Owen Arnold

refs #4203. More GCC errors and warnings fixed.

Changeset: 7e84a13bcad52ab5ffd9af5b95e9b2ee76c3e88c

comment:16 Changed 9 years ago by Owen Arnold

refs #4203. Gaussian smoothing strategy.

Changeset: 613f3c2e768ba4e6e559a4c63ffc63991435dc3b

comment:17 Changed 9 years ago by Owen Arnold

refs #4257 #4203. Fix GCC errors and warnings

Changeset: 254d448a5da5724c4fb970c448f31d78a4b82c07

comment:18 Changed 9 years ago by Owen Arnold

refs #4257 #4203. GCC Warning fixes.

Changeset: 808377e7a999c186c17f74bbabbb72b221d8ac69

comment:19 Changed 9 years ago by Owen Arnold

refs #4257 #4203. GCC Warning fixes.

Changeset: f8eb952c7f5d2439aab25fbdeaea2d973344579e

comment:20 Changed 9 years ago by Owen Arnold

refs #4203 change existing to 1D. Just a rename

Changeset: 26d4daf145b003f13416776df5483284975df333

comment:21 Changed 9 years ago by Owen Arnold

refs #4203. Apply 1D Gaussian and document

Changeset: 174821e9f85ab6bb070ebf231a67fc3d4485c802

comment:22 Changed 9 years ago by Owen Arnold

refs #4288 #4203. Changes to NNs made.

Changes made and Unit tests corrected and re-run. Seems to have worked okay.

Changeset: 8b0d6a1a8413fd153898f3dbeabfddaa29b91e97

comment:23 Changed 9 years ago by Owen Arnold

refs #4288 #4203. Gaussian and Parabolic weighting updated.

Parabolic weighting can now work for non-rectangular detectors. Updated gaussian smoothing to be consistent with LibISIS. Also updated documentation for SmoothNeighbours.

Changeset: 752651aca9329755dd03b4c68b747669e5105caa

comment:24 Changed 9 years ago by Owen Arnold

refs #4203. Fix type usage warnings

Changeset: 5a55872ee8a1e19778be9d3bc6ac9a4b28369541

comment:25 Changed 9 years ago by Owen Arnold

  • Status changed from accepted to verify
  • Resolution set to fixed

To Tester:

The example script shows the usage of Gaussian smoothing

path_to_ws = C:/Users/spu92482/Documents/mantid/mantid/Test/AutoTestData/CNCS_7860_event.nxs LoadEventNexus(Filename=r"path_to_ws",OutputWorkspace="cncs") SmoothNeighbours( InputWorkspace="cncs", OutputWorkspace="sigma_half", RadiusUnits="NumberOfPixels", Radius=100, NumberOfNeighbours=48, WeightedSum="Gaussian", Sigma=0.5)

Opening the originally loaded and the smoothed in the instrument view should show the effect of gaussian smoothing.

Other tests

  • Set the logs to 'information' and verify that it record the usage of Gaussian smoothing.
  • Check the unit tests to verify that Guassian weighting is working as expected

comment:26 Changed 9 years ago by Vickie Lynch

  • Status changed from verify to verifying
  • Tester set to Vickie Lynch

comment:27 Changed 9 years ago by Vickie Lynch

  • Status changed from verifying to closed

Ran script suggested and the show instrument view was much smoother after smoothing.

comment:28 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5050

Note: See TracTickets for help on using tickets.