Ticket #7491 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Calibration: better way to switch off old calibration

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: critical Milestone: Release 2.6
Component: Framework Keywords: Calibration
Cc: anders.markvardsen@… Blocked By:
Blocking: #7511 Tester: Anders Markvardsen

Description

Currently, to calibrate, for example, MERLIN instrument. We have to follow instructions found http://www.mantidproject.org/Tube_Calibration_Examples#Running_TubeCalibDemoMerlin.py.

The procedure of switching off code from the instrument parameters and than later, having to remember to switch them on again is error prone.

So, it is necessary to find a new way to switch off old calibrated values when performing the calibration. A strategy may be to execute the loadinstrument algorithm.

Attachments

testingMerlinCalibration.py (7.1 KB) - added by Gesner Passos 7 years ago.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.7 to Backlog

comment:2 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress
  • Cc anders.markvardsen@… added
  • Milestone changed from Backlog to Release 2.6

comment:3 Changed 7 years ago by Gesner Passos

Export baseInstrument to python

The baseInstrument has the information of the positions of the detectors before loading any calibration values. Using the information from this object it will not require disabling loading the calibration values any more.

re #7491

Changeset: 3148a7794a053329ffc2dd7bb0da893f945b455e

comment:4 Changed 7 years ago by Gesner Passos

Use the detectors from baseInstrument

It nows use the position from the baseInstrument which is free from any previous calibration being applied to the detectors.

The only issue that it introduces is that you can not calibrate instruments that was moved or rotated before the acquisition of the data. Because, the baseInstrument does not consider this. Besides, any previous movement for the detector will be reset when applying the output of the calibration.

But, we consider these limitations better than having to switch off loading the calibration values through comment the region det-pos-source.

re #7491

Changeset: 32e531a1da884b5157ca40328b624a26a9080d4a

Changed 7 years ago by Gesner Passos

comment:5 Changed 7 years ago by Gesner Passos

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

Tester:

If everything works fine. Now, you should be able to open an already calibrated file, and apply the calibration, having a nice result. In order to see this, I've given you the testingMerlingCalibration.py.

Do not execute it all at once. Select part of the code till the frase "Pause and see the instrument check". Make sure the instrument preserves the previous calibration, but that the calibration of the part of the instrument that is being applied works nicely.

Repeat the same operation till the end of the file.

comment:6 Changed 7 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:7 Changed 7 years ago by Anders Markvardsen

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:8 Changed 7 years ago by Anders Markvardsen

reason for reopen when running

from Examples import TubeCalibDemoMerlin as mer mer.calibrateMerlin('MER12024.raw')

not same result

comment:9 Changed 7 years ago by Gesner Passos

  • Status changed from reopened to inprogress

Define the fitPar from the baseInstrument

It is wrong to take the length from the calibrated tube and applying to the baseInstrument.

re #7491

Changeset: 4c88cae40be0e8e386f89a6704b4e0a1f4aea07f

comment:10 Changed 7 years ago by Gesner Passos

Correct the Merlin Example

There were lacking tubes inside the door3.

re #7491

Changeset: 3a736cf96af00bbe9b6b8ee375d610a6dfb0b98c

comment:11 Changed 7 years ago by Gesner Passos

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

comment:12 Changed 7 years ago by Anders Markvardsen

  • Status changed from verify to verifying

comment:13 Changed 7 years ago by Anders Markvardsen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7491_reset_calibration'

comment:14 Changed 7 years ago by Anders Markvardsen

Running

from Examples import TubeCalibDemoMerlin as mer mer.calibrateMerlin('MER12024.raw')

gave expected result

comment:15 Changed 7 years ago by Gesner Passos

  • Blocking 7511 added

comment:16 Changed 7 years ago by Nick Draper

  • Component changed from Other to Framework

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8336

Note: See TracTickets for help on using tickets.