Ticket #6585 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

SANS: SetDetectorOffsets

Reported by: Anders Markvardsen Owned by: Anders Markvardsen
Priority: blocker Milestone: Release 2.5
Component: Mantid Keywords:
Cc: stephen.king@…, gesner.passos@… Blocked By:
Blocking: Tester: Roman Tolchenov

Description

SetDetectorOffsets does not appear to be working properly

Hi Anders,

So below is what you sent me before Christmas. Attached is the Python routine I showed you this morning.

As you can see I’ve commented out the two lines re-loading the data file and calling MoveInstrumentComponent. But the output seems to show that no offsets have been applied to the detector positions.

So either SetDetectorOffsets is not doing what it should, or some way of ‘forcing’ the application of the offset specified by SetDetectorOffsets is necessary?

Thanks, Steve

From: Markvardsen, Anders (STFC,RAL,ISIS) Sent: 18 December 2012 12:39 To: King, Stephen (STFC,RAL,ISIS) Subject: RE: det position corrections

Hi Steve,

The python method in ISISCommandInterface.py which exposes this is

def SetDetectorOffsets(bank, x, y, z, rot, radius, side):

"""

Adjust detector position away from position defined in IDF. On SANS2D the detector banks can be moved around. This method allows fine adjustments of detector bank position in the same way as the DET/CORR userfile command works. Hence please see http://www.mantidproject.org/SANS_User_File_Commands#DET for details.

Note, for now, this command will only have an effect on runs loaded after this command have been executed (because it is when runs are loaded that components are moved away from the positions set in the IDF)

@param bank: Must be either 'front' or 'rear' (not case sensitive) @param x: shift in mm @param y: shift in mm @param z: shift in mm @param rot: shift in degrees @param radius: shift in mm @param side: shift in mm

Hope this helps, Anders

From: King, Stephen (STFC,RAL,ISIS) Sent: 18 December 2012 12:03 To: Markvardsen, Anders (STFC,RAL,ISIS) Subject: det position corrections

Hi Anders,

What Python algorithm do I need to call from a script to apply

DET/CORR FRONT RADIUS 48.0 DET/CORR FRONT SIDE 0.0

corrections to SANS2D data I’ve just read in.

For the other offset corrections like

DET/CORR FRONT Z 47.0

MoveInstrumentComponent did the trick but that seems to be specific to X, Y & Z...

Thanks, Steve

Attachments

flatgen.py (21.0 KB) - added by Anders Markvardsen 8 years ago.
output.txt (2.4 KB) - added by Anders Markvardsen 8 years ago.

Change History

Changed 8 years ago by Anders Markvardsen

Changed 8 years ago by Anders Markvardsen

comment:1 Changed 8 years ago by Anders Markvardsen

Enable x_corr, y_corr and z_corr for LOQ. re #6585

I.e. enable the above to have an effect for this method when loading LOQ also

Changeset: ee5751b1793e92c2b08c8915bebab12b5c6d5444

comment:2 Changed 8 years ago by Anders Markvardsen

  • Cc stephen.king@…, gesner.passos@… added

comment:3 Changed 8 years ago by Anders Markvardsen

Speaking to Steve - no support needed for the other paramters of SetDetectorOffsets for LOQ data

comment:4 Changed 8 years ago by Anders Markvardsen

Make use of SetDetectorOffsets. re #6585

Changeset: 216f2125fc949e65fe31b6879bf1e7abe836db1d

comment:5 Changed 8 years ago by Anders Markvardsen

Ensure units in SetDetectorOffSets is mm. re #6585

Changeset: 2fd56cc57c62a509a1dc360801718344126254a6

comment:6 Changed 8 years ago by Anders Markvardsen

  • Status changed from new to accepted

To test e.g. run systemtest SANSLOQCan2D with different values for the 2nd to the 4th parameter of the SetDetectorOffsets method.

What you see is that it moves the rear either by plotting the colour plot of the output from the systemtest and observe the center has moved if the 2nd and 3rd param has changed or by looking at history of the result workspace and at the bottom see the MoveComponent entry matching the change in offset by SetDetectorOffsets

comment:7 Changed 8 years ago by Anders Markvardsen

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

comment:8 Changed 8 years ago by Anders Markvardsen

Forgot to commit this one. re #6585

Changeset: 3ce5631866a553b10ddf7b654ed145c6a51becba

comment:9 Changed 8 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:10 Changed 8 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Ran the test with different offsets and it worked as described.

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7431

Note: See TracTickets for help on using tickets.