Ticket #7144 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Fix ConvertSpectrumAxis algorithm

Reported by: Dereck Kachere Owned by: Martyn Gigg
Priority: critical Milestone: Release 2.6
Component: Indirect Inelastic Keywords:
Cc: spencer.howells@… Blocked By:
Blocking: Tester: Arturs Bekasovs

Description (last modified by Nick Draper) (diff)

Currently, ConvertToSpectrumAxis is incorrectly converting from theta to Q. The algorithm is used by Elwin, meaning all the output workspaces from the Elwin interface are wrong.

Fix this and look into the possibility of limiting the conversions carried out by this algorithm.

Change History

comment:1 Changed 7 years ago by Dereck Kachere

  • Priority changed from major to critical
  • Description modified (diff)
  • Summary changed from Calculate Q value correctly in Elwin to Fix ConvertSpectrumAxis algorithm

comment:2 Changed 7 years ago by Dereck Kachere

refs #7144 New versions of the algorithm.

First few changes.

Changeset: 6962092ef393b25b41c6909ab2c33c37c6991201

comment:3 Changed 7 years ago by Dereck Kachere

refs #7144 Refactored old alg

Changeset: 3e823dc2c0e3766f3d060bc9fe1f4be1e4607218

comment:4 Changed 7 years ago by Dereck Kachere

refs #7144 More refactoring

Work in progress still

Changeset: ba26da9ee59df702050104bd5e69d62743a0b7bd

comment:5 Changed 7 years ago by Dereck Kachere

refs #7144 Latest version of the alg and unit test.

Changeset: c6c4a2eb8593392fd795b2f32cafd8b4836207bb

comment:6 Changed 7 years ago by Dereck Kachere

refs #7144 Few more additions - test still under construction.

Changeset: 94b7243c79a19314c86ed01c967f47cf1bbd5c87

comment:7 Changed 7 years ago by Dereck Kachere

refs #7144 More up-to-date version

Q and QSquared values in the algorithm are given in units of Angstroms

Changeset: 66017e538916706cb70a8e6f5898528bc0c9f9eb

comment:8 Changed 7 years ago by Dereck Kachere

refs #7144 Added a couple more tests

A bit of refactoring needed to finalise the algorithm and the test.

Changeset: 31fca5e0fa4f1a2eabbc6bea28e3052e3ed20ff3

comment:9 Changed 7 years ago by Dereck Kachere

refs #7144 Refactored code and made a few additions and deletions.

Changeset: 373758ba1cdf465098ae2df0560b3a7bb188b2b0

comment:10 Changed 7 years ago by Dereck Kachere

refs #7144 Solved a conflict

Changeset: 426770544448d60e69c35b192f8865aa9722e353

comment:11 Changed 7 years ago by Dereck Kachere

refs #7144 Modified overloads on helper function.

Helper function was modified for unit test purposes.

Changeset: 3b1361e8932b6dae6ca5c2bf0ece41c6ec9f9d6e

comment:12 Changed 7 years ago by Dereck Kachere

refs #7144 Some more refactoring

Changeset: 57765ec2e9aac127eedf87e133ae3fba7fdf326e

comment:13 Changed 7 years ago by Dereck Kachere

  • Status changed from new to accepted

comment:14 Changed 7 years ago by Dereck Kachere

refs #7144 Corrected the inputs for energy.

The input was in Joules and not in meV and were not accounted for in the calculations.

Changeset: 93b4ceb74fd6ea2f1b7a6634997434020fc81c12

comment:15 Changed 7 years ago by Dereck Kachere

refs #7144 Files for new version of ConvertSpectrumAxis algorithm.

Changeset: 686498f3bdf97ff7841a40fdcf68892c6277770f

comment:16 Changed 7 years ago by Dereck Kachere

A systemtest branch of the same name - 7144_new_v_cov_spectrum_axis - needs to be merged into master at the same time as this ticket

Last edited 7 years ago by Dereck Kachere (previous) (diff)

comment:17 Changed 7 years ago by Dereck Kachere

refs #7144 Updated reference results.

Changeset: d2b93d1e36f8740b4de48f92ac80ef5664100b5e

comment:18 Changed 7 years ago by Dereck Kachere

refs #7144 Removed unused variable.

Changeset: 126380b256dc4a673e37b9d21390a57a2a1302c7

comment:19 Changed 7 years ago by Dereck Kachere

  • Owner changed from Dereck Kachere to Martyn Gigg
  • Status changed from accepted to assigned

comment:20 Changed 7 years ago by Martyn Gigg

Fix bug in Q calculation. Use theta not 2 theta. Refs #7144

Changeset: 3e539ea8758bf08a39ff38d7180a735a836fcb1f

comment:21 Changed 7 years ago by Martyn Gigg

Add progress reporting to elastic window. Refs #7144

Changeset: 0b88e6fe0dba4214e242706c134c91ba72ed5b06

comment:22 Changed 7 years ago by Martyn Gigg

Update reference results for Elwin & MSDFit

Fixing ConvertSpectrumAxis requires an update to the results. Refs #7144

Changeset: de8ad759836e48319ea2e85f3edfdc56c227aab4

comment:23 Changed 7 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:24 Changed 7 years ago by Martyn Gigg

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

Branch: feature/7144_new_v_conv_spectrum_axis in both code and systemtests repos

Tester: Use the script below to check the values are what you expect by displaying the detector table to see the two theta angles (labelled Theta!) and using Q=4*pi*sin(theta)/lambda & lambda = sqrt(81.787/efixed) where efixed = 1.845 meV

nxs = Load(Filename="irs26176_graphite002_red.nxs")
ws = ConvertSpectrumAxis(InputWorkspace=nxs,Target="ElasticQ")

axis1 = ws.getAxis(1)
print ws.getValue(0)
print ws.getValue(1)

comment:25 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verify to verifying
  • Tester set to Arturs Bekasovs

comment:26 Changed 7 years ago by Arturs Bekasovs

Merge remote-tracking branch 'origin/feature/7144_new_v_conv_spectrum_axis'

Refs #7144 Conflicts:

Code/Mantid/Framework/TestHelpers/inc/MantidTestHelpers/WorkspaceCreationHelper.h

Changeset: bb6357fae43e1fea9810d16b0387ef8b2997f2a3

comment:27 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verifying to closed

Compared the Slice Views of the original workspace and converted one, noticed the difference in axis. Run the Python script provided and checked that the values are corresponding to the ones expected.

comment:28 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:29 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Indirect Inelastic
  • Description modified (diff)

comment:30 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7990

Note: See TracTickets for help on using tickets.