Ticket #10642 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

GetDetectorOffsets doesn't shift peak to reference location

Reported by: Martyn Gigg Owned by: Nick Draper
Priority: critical Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Dan Nixon

Description (last modified by Martyn Gigg) (diff)

POLARIS are using CrossCorrelate & GetDetectorOffsets to produce a calibration file.

The aim of the process is to align all the spectra using a reference data set and then shift everything so the reference peak position is at an ideal d spacing value. This value is known for a set of standard materials.

At the moment the offset produced doesn't shift the peak close to the ‘ideal’ value; it only calculates a relative shift using the reference peak position (Dreference) to align all the spectra. So when the focussed data set is refined it does not agree with the ideal values. So a second part needs to be added to GetDetectorOffsets to achieve the final calibration to the ‘ideal’ value by producing an additional global offset for all spectra to the ‘ideal’ value.

The current system also makes it impossible to run CrossCorrelate/GetDetectorOffsets on different banks using peaks in difference positions and combine the results as the resulting peaks don't then sit on top of one another. If the offset included a shift value as

(DIdeal – FittedPeakCentre)/(FittedPeakCentre)

added on to what is currently calculated then should do the job. Also it is possible that FittedPeakCentre could replace the current Dreference and be obtained rather than specified.

Attachments

calibration_problem.pdf (473.9 KB) - added by Martyn Gigg 6 years ago.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Description modified (diff)

comment:2 Changed 6 years ago by Martyn Gigg

  • Description modified (diff)

Changed 6 years ago by Martyn Gigg

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Martyn Gigg

comment:4 Changed 6 years ago by Martyn Gigg

The best way to deal with this for now is to have a Mode switch with two modes: Relative & Absolute

Relative will behave exactly as it does currently and will be the default whereas Absolute will use the above formula for the offset. This will enable us to keep backwards compatibility with the current behaviour and allow users to try both approaches.

comment:5 Changed 6 years ago by Martyn Gigg

  • Owner changed from Martyn Gigg to Nick Draper

The line to change should be 208 in GetDetectorOffsets.cpp where the mode should define whether the offset above is added to the currently calculated offset value.

The instrument scientist to get in touch with is Matt Tucker at ISIS.

Last edited 6 years ago by Martyn Gigg (previous) (diff)

comment:6 Changed 6 years ago by Nick Draper

  • Status changed from assigned to inprogress

re #10642 add absoloute mode

Changeset: a9506b2edddfb58d34df78eca2fdeefee6a6e81e

comment:7 Changed 6 years ago by Nick Draper

re #10642 Added an optional Dideal parameter and adjusted formula

Changeset: b0de619331873e0f022928386c8e388ebf914a2f

comment:8 Changed 6 years ago by Nick Draper

Matt Tucker is happy with the changes

Nick,

It looks like the latest version should produce the results we need, thank you.

Now we just need to work out how to get peak fitting working but that is a problem for another day.

Best wishes,
Matt

From: <Draper>, - <Nick>, <RAL>, "Draper, N (Nick)" <nick.draper@stfc.ac.uk>
Date: Thursday, 4 December 2014 18:02
To: Matt Tucker <matt.tucker@stfc.ac.uk>
Subject: Changes to GetDetectorOffsets

Matt,
 
Could you please let me know before the end of Friday if the changes I’ve made are what ou need?
The installers here will have the latest changes.
http://builds.mantidproject.org/job/develop_clean/529/
 
Regards,
Nick Draper

comment:9 Changed 6 years ago by Nick Draper

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

To Test

  1. unit and system tests should pass.
  2. That along with Matt Tuckers approval in comment 8 is pretty much it.
  3. However feel free to play with the algorithm, the unit test will give you some sample parameters.

comment:10 Changed 6 years ago by Dan Nixon

  • Status changed from verify to verifying
  • Tester set to Dan Nixon

comment:11 Changed 6 years ago by Dan Nixon

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/10642_absolute_getdetectoroffsets'

Full changeset: 7946616f6406e7f4f4365db867e879b86f5c810d

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11484

Note: See TracTickets for help on using tickets.