Ticket #9378 (closed: fixed)
Fast Log Filtering for inelastic case
Reported by: | Andrei Savici | Owned by: | Wenduo Zhou |
---|---|---|---|
Priority: | blocker | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | |
Cc: | owen.arnold@… | Blocked By: | |
Blocking: | Tester: | Vickie Lynch |
Description (last modified by Andrei Savici) (diff)
In general case T_sample-T_pulse = L_1/v_i, where L_1 is the sample to moderator distance, and v_i is the incident velocity. L_2 is the sample to detector distance. TOF is the time of flight from moderator to detector.
For elastic case, the velocity of the neutron is constant, v_i=v=(L_1+L_2)/TOF, so
T_sample=T_pulse+(L_1*TOF)/(L_1+L_2)
For direct geometry inelastic, the incident energy is fixed ( stored as Ei in the workspace ) v_i=sqrt(Ei)*sqrt(2.*PhysicalConstants::meV/PhysicalConstants::NeutronMass)
T_sample=T_pulse+L_1/sqrt(Ei)/sqrt(2.*PhysicalConstants::meV/PhysicalConstants::NeutronMass)
For indirect, TOF=L_1/v_i+L_2/v_f, where v_f is the final velocity. For indirect geometry spectrometers, the final energy is constant (but different from one detector to the next), and stored on the parameter map for each detector as Efixed. v_f=sqrt(Efixed)*sqrt(2.*PhysicalConstants::meV/PhysicalConstants::NeutronMass)
T_sample=T_pulse+TOF-L_2/sqrt(Efixed)/sqrt(2.*PhysicalConstants::meV/PhysicalConstants::NeutronMass)
Change History
comment:2 Changed 6 years ago by Owen Arnold
- Status changed from new to assigned
- Priority changed from major to blocker
- Milestone changed from Backlog to Release 3.2
I'm raising the priority of this because the filtering calculation is incorrect at the moment. It should be corrected prior to the release.
comment:3 Changed 6 years ago by Wenduo Zhou
- Status changed from assigned to inprogress
Refs #9378. Changed input properties.
- Added input properties to support inelastic TOF correction;
- Added contents in wiki for new feature;
- Modified unit test because of change in properties.
Changeset: 3f2c8ac7b750bd07bf9ee973671529eb68389f30
comment:4 Changed 6 years ago by Wenduo Zhou
Refs #9378. Modified event time correction for splitting.
The correction formula for splitting is generalized to T_pulse + toffactor * TOF + tofshift
The printdetail option is removed because the code is well tested.
Changeset: a06ec5bae75359bcd4ff126ef624000f6b72b586
comment:5 Changed 6 years ago by Wenduo Zhou
Added event time correction for inelastic instrument. Refs #9378.
Changeset: da4f9ee63de496228397a6c6a23093418d4a2c6a
comment:6 Changed 6 years ago by Wenduo Zhou
Made error message more detailed. Refs #9378.
Changeset: a61c96885fe64fe6dfbbd27d3d51c0d8bc7ce0b5
comment:7 Changed 6 years ago by Wenduo Zhou
Added 2 unit tests to EventListTest for new methods. Refs #9378.
Changeset: 597f4feffffd0022a6121b371c365be8acdfec3d
comment:8 Changed 6 years ago by Wenduo Zhou
Added more unit tests. Refs #9378.
Changeset: 5b3360e3ffcfa04add18d9c72e3406a52188916b
comment:9 Changed 6 years ago by Wenduo Zhou
Refs #9378. Added property to output splitted workspace names.
And make unit tests to use this to clean all the output workspaces.
Changeset: db131032f9593ec425c3cc1859988509c181dfdb
comment:10 Changed 6 years ago by Wenduo Zhou
Resolved conflicts. Refs #9378.
Changeset: 3dc499e3fa92442d110e93b6e86e1cf890858d49
comment:11 Changed 6 years ago by Wenduo Zhou
Fixed doxygen and cppcheck errors. Refs #9378.
Changeset: 1640422ed7a095e9d68802b06b645c33351954d3
comment:12 Changed 6 years ago by Wenduo Zhou
Refs #9378. Avoided a unit test error on Mac only.
It might come from the different pseudo random number sequence from different C++ compiler.
Changeset: df50fbb2a4acbbc811a68d8589b084185b3e9577
comment:13 Changed 6 years ago by Martyn Gigg
Slightly better workaround for unknown Python workspace types.
It's still a sticking-plaster fix as it's a little late in the cycle to implement the plugin exposure to Python. Refs #9378
Changeset: 5c949d7fc9893cfc371424ac64a3642f47ad4ff7
comment:14 Changed 6 years ago by Wenduo Zhou
Refs #9378. Attempted to fix a valgrid error.
Changeset: 9781bbed0775abcfb770c8ff6313062a100b2299
comment:15 Changed 6 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
For tester
Find some data from direct and indirect inelastic scattering instrument. Use GenerateEventsFilter to create splitter workspace in format of MatrixWorkspace (i.e., using option 'FastLog'). Then run FilterEvents by choosing appropriate TOFCorrection option.
Check the unit tests of FilterEvents and EventList, too.
comment:16 Changed 6 years ago by Vickie Lynch
- Status changed from verify to verifying
- Tester set to Vickie Lynch
comment:17 Changed 6 years ago by Vickie Lynch
- Status changed from verifying to verify
- Tester Vickie Lynch deleted
git merge conflicts
comment:18 Changed 6 years ago by Vickie Lynch
- Status changed from verify to verifying
- Tester set to Vickie Lynch
comment:19 Changed 6 years ago by Vickie Lynch
Refs #9378 fix merge conflicts
Changeset: c959d9ac531ddaebec90a3f12a167dfcb16f3cfc
comment:20 Changed 6 years ago by Vickie Lynch
- Status changed from verifying to closed
When I sum the split workspaces, they look the same as the original but a few events are lost. Please make new ticket to see if these events are on the boundaries. Also the log workspace in GenerateEventsFilter should have the word Optional removed from description.
comment:21 Changed 6 years ago by Wenduo Zhou
Resolved conflicts. Refs #9378.
Changeset: 3dc499e3fa92442d110e93b6e86e1cf890858d49
comment:22 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10221