mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
210 stars 122 forks source link

Implement new focussed DIFC averaging for POLARIS #31021

Closed DannyHindson closed 1 year ago

DannyHindson commented 3 years ago

Helen Playford has asked if we can implement a new method of calculating an average DIFC for a bank that would get used during a unit conversion from dSpacing to TOF in the POLARIS data reduction workflow.

The calculation involves calculating an effective two theta for each detector based on the offset contained in the .cal file. An effective DIFC per bank should then be calculated based on the average L2 and the average "effective two theta" for the detectors across the bank.

The existing DIFC calculation for a bank is based on the average of the nominal two theta and the nominal L2 across the detectors (same as for all the other ISIS powder instruments).

This mirrors the calculation that happens when the POLARIS team outputs data to Gudrun. A file called something like POLARIS_17_3_gudrun.dat is sent to Gudrun containing the detector positions and the POLARIS team insert effective two theta values in this file based on a .cal file generated in Mantid. The effective two theta values are calculated in a python script called make_detector_file.py that the POLARIS instrument scientists have written

The aim of this is to evaluate whether this helps improve the reconciliation between the results they get from Gudrun and GSAS. At the moment there is a discrepancy in the peak positions in refined data depending on whether the data goes a) through Mantid\Gudrun, b) Mantid\GSAS. The DIFC value used on a focused dataset shouldn't matter because it's a little bit arbitrary + the refinement should calculate its own DIFC. Making this change in Mantid will help check whether that is true.

DannyHindson commented 1 year ago

Closing this because haven't heard back on this topic for a long while. Can always re-open the issue if Helen comes back with something