Ticket #10102 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

RebinByTimeAtSample first implementation

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: critical Milestone: Release 3.3
Component: Diffraction Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

Rebin a TOF event workspace according to TatSample = PulseTime + TOF * L1/(L1 +L2)

Make the documentation clear that the first implementation of this is only to work for the elastic case. The inelastic cases will have to be added later.

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #10102. Sort by time at sample.

Changeset: 2f7078388a6235a5fec084501e595e25bcb06864

comment:3 Changed 6 years ago by Owen Arnold

refs #10102. Consolidate calcuations.

The splitters vectors, and the new sorting require the same time at sample calculation. I've made the calculation into a free funciton, which is used by both. This should help at a very fundamental level, because the rebinning (new working on) functionality should match the filtering functionality.

Changeset: e841d5a4c79bf29883eba3773f8277c54d7f119b

comment:4 Changed 6 years ago by Owen Arnold

refs #10102. Filtering implemented and tested.

Changeset: 674828d318a7499ac247a0108941aad6fee13edc

comment:5 Changed 6 years ago by Owen Arnold

refs #10102. Implement and test histogramming.

We need to be able to histogram according to time at sample.

Changeset: 67493b534803aeb9d560bbab1c5a75f738077105

comment:6 Changed 6 years ago by Owen Arnold

refs #10102. Find min and max timeatsample in workspace.

Implemented and tested. This will allow us to find the X-range for our rebinning if the user does not supply all arguments to params.

Changeset: b38d28f2dd487f451153613d3c19debbff6b4ed9

comment:7 Changed 6 years ago by Owen Arnold

refs #10102. RebinByTimeAtSample - works like RebinByPulseTime.

Added new algorithm. Shamelessly copy pasted a large portion of this (including the tests). Later refactoring step will be required to really reduce the duplication here, both for the tests and for the algorithms themselves.

Changeset: 1e2c6559c954b7ddd482eedb43781b78e1540347

comment:8 Changed 6 years ago by Owen Arnold

refs #10102. Base class for algorithms common

Changeset: 080f99b9254988154bd5bf40ea4a01749d083ea5

comment:9 Changed 6 years ago by Owen Arnold

refs #10102. Move more to the base class.

Changeset: a980d64fa6fd89a51c9e051bcf7de1c61f780ac1

comment:10 Changed 6 years ago by Owen Arnold

I still need to refactor and extend tests, and update the rst for the new algorithm.

comment:11 Changed 6 years ago by Owen Arnold

refs #10102. More reuse achieved.

Made the method to find the min and max values across all spectrum virtual and therefore polymorphic amongst each subtype of the base algorithm.

Changeset: 7a6434f42399d4bbc10aec4f244cf64e0c141fda

comment:12 Changed 6 years ago by Owen Arnold

refs #10102. Refactor to base test class.

Templated base class taking algorithm as type argument. Shared test code is much neater now. Duplication is at an absolute minimal.

Changeset: 915fe44cd8f8a018f6bede60f473739d6a17252c

comment:13 Changed 6 years ago by Owen Arnold

refs #10102. Add sample time filtering test.

Discount the PulseTime entirely in a unit test and use the L1, L2 distances as the control factors for the filtering.

Changeset: bbaa6f175e819c0d15c39d09e74261fea9960571

comment:14 Changed 6 years ago by Owen Arnold

refs #10102. Explicitly provide template argument.

Changeset: ab399210d9b0079e1f490ff1e81bcc373564f139

comment:15 Changed 6 years ago by Owen Arnold

refs #10102. Documentation.

Changeset: 0234c3cb271817184ad71600ed5a3576dccb4e6c

comment:16 Changed 6 years ago by Owen Arnold

refs #10102. Kill type conversion warning.

Changeset: 4ec5f8f94d2ab7191df99ca361c6da682e65f24e

comment:17 Changed 6 years ago by Owen Arnold

refs #10102. Amend documentation.

Changeset: 764192025edf750afc6027df16376e6bb3f693cd

comment:18 Changed 6 years ago by Owen Arnold

refs #10102. Fix doxygen and cpp warnings.

Changeset: 702938e0f3ce4e467a95e00f36f32408078f2df4

comment:19 Changed 6 years ago by Owen Arnold

  • Owner set to Owen Arnold

comment:20 Changed 6 years ago by Owen Arnold

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Summary changed from RebinByTimeAtSample to RebinByTimeAtSample first implementation

Tester. This algorithm is ready, although usage examples with real data are hard to supply because both the pulse time and the event tof are taken into account, as well as the instrument geometry. I suggest the following:

  • Code review the changes
  • Check the functional unit tests, which do a good job of establishing whether the rebinning is working properly by using virtual instruments around fake event data.

I will be working with users here at ISIS who want to plot in absolute time. so there will be further opportunities to verify this prototype.

comment:21 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

There is a Sphinx warning about in RebinByTimeAtSample-v1.rst: http://builds.mantidproject.org/job/develop_clean/label=rhel6-build/287/warnings3Result/. It looks there's an extra 's' on :refs: when it should be :ref: on line 47

comment:22 Changed 6 years ago by Martyn Gigg

comment:23 Changed 6 years ago by Owen Arnold

  • Status changed from reopened to inprogress

refs #10102. Fix sphinx warnings

Changeset: 9d6f74fcd97625597fba12b8ac4d8321d6830317

comment:24 Changed 6 years ago by Owen Arnold

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

comment:25 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:26 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to closed

It works well. So the ticket is closed.

comment:27 Changed 6 years ago by Owen Arnold

Merge remote-tracking branch 'origin/feature/10102_rebin_by_t_at_sample' into feature/10102_rebin_by_t_at_sample

Full changeset: 08c6337aef5f698799f3adff71a14f2ef32681fd

comment:28 Changed 6 years ago by Wenduo Zhou

Merge remote-tracking branch 'origin/feature/10102_rebin_by_t_at_sample'

Full changeset: 9013d2f543857185ec179cdff42320f56ad3f8ea

comment:29 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10944

Note: See TracTickets for help on using tickets.