Ticket #4922 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

New Polaris IDF returns incorrect r,t,p

Reported by: Anders Markvardsen Owned by: Anders Markvardsen
Priority: blocker Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

The new Polaris IDF happens to have been defined such that its detector shapes are defined relative to (0,0,0). In Mantid we have so far allowed 100% flexibility with respect to which coordinate system users define their shapes.

In Ron's case he just happen to chose to define his shapes relative to (0,0,0). The result of this is that the Instrument looks perfect in MantidPlot instrument view and e.g. calculating solid angle will work fine, but if you ask for the position of such detectors the answer will be at (0,0,0) resulting in L2 values = zero and e.g. diffraction focusing not working.

Note a ticket should be created to test whether other instruments also have defined the origin of their shapes different from the position on the shape the instrument scientist regards as the actual position to calculate L2 from. This might be the case, but has just not been noticed so far because the difference in these positions have been small.

For now there are two possible solutions

  1. An attribute is added to the shape class, called e.g. m_L2point, m_detectorPoint or m_locationPoint .... In Mantid when detectorTwoTheta, detectorPhi and detectorR etc called it is checked if the detector has a shape, if yes it is the m_locationPoint of the shape is used in calculation L2 etc.
  2. A policy is put in place which insist on the orgin of shapes to be defined to be with respect to the point the scientists regards as the r,t,p position of the detector.

Change History

comment:1 Changed 9 years ago by Anders Markvardsen

  • Priority changed from critical to blocker

comment:2 Changed 9 years ago by Anders Markvardsen

Allow shape origin to be modified. re #4922

When using <combine-components-into-one-shape> to define complicated detector shapes, the origin which an instrument scientist uses to define the shape may easily be chosen different from the origin of the shape which corresponds to its L2 value.

Allow an additional IDF tag <translate-rotate-combined-shape-to> which if present will translate and rotate the shape before it is actually created in memory (and stored in *.vtp file)

Changeset: a09e2fd1f89c9e56940cdd0a098dbf890c05f890

comment:3 Changed 9 years ago by Anders Markvardsen

Note #4928 was created to investigate: "Note a ticket should be created to test whether other instruments also have defined the origin of their shapes different from the position on the shape the instrument scientist regards as the actual position to calculate L2 from. This might be the case, but has just not been noticed so far because the difference in these positions have been small"

comment:4 Changed 9 years ago by Anders Markvardsen

Allow shape origin to be modified. re #4922

When using <combine-components-into-one-shape> to define complicated detector shapes, the origin which an instrument scientist uses to define the shape may easily be chosen different from the origin of the shape which corresponds to its L2 value.

Allow an additional IDF tag <translate-rotate-combined-shape-to> which if present will translate and rotate the shape before it is actually created in memory (and stored in *.vtp file)

Changeset: a09e2fd1f89c9e56940cdd0a098dbf890c05f890

comment:5 Changed 9 years ago by Anders Markvardsen

Ron Smith updated Polaris IDF shape origins. re #4922

Changeset: f4f4d9c32498259d849e1c238f3d083224218fd0

comment:6 Changed 9 years ago by Anders Markvardsen

Delete old new Ron Polaris. re #4922

Should have deleted this one with the previous commit.

Changeset: f0423c4fb41683383e7f6799f83be3b4ba57b079

comment:7 Changed 9 years ago by Anders Markvardsen

Ron Smith updated Polaris IDF shape origins. re #4922 (cherry picked from commit f4f4d9c32498259d849e1c238f3d083224218fd0)

Changeset: 68759272177db2a9955eaa5ab78c1164f19679ea

comment:8 Changed 9 years ago by Anders Markvardsen

Delete old new Ron Polaris. re #4922

Should have deleted this one with the previous commit. (cherry picked from commit f0423c4fb41683383e7f6799f83be3b4ba57b079)

Changeset: 9c0ab52e14fab902d97c8fe7422b1ea503931994

comment:9 Changed 9 years ago by Anders Markvardsen

Ron Smith updated Polaris IDF shape origins. re #4922

Changeset: f4f4d9c32498259d849e1c238f3d083224218fd0

comment:10 Changed 9 years ago by Anders Markvardsen

Delete old new Ron Polaris. re #4922

Should have deleted this one with the previous commit.

Changeset: f0423c4fb41683383e7f6799f83be3b4ba57b079

comment:11 Changed 9 years ago by Anders Markvardsen

  • Status changed from new to accepted

In the end Ron redefined his the shape origins of this geometry detector shapes which now means that the correct r,t,p values are returned.

comment:12 Changed 9 years ago by Anders Markvardsen

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

comment:13 Changed 9 years ago by Anders Markvardsen

Note Wiki http://www.mantidproject.org/InstrumentDefinitionFile#Using_.3Ccombine-components-into-one-shape.3E was updated to describe <translate-rotate-combined-shape-to>. Although Ron chose not to use it someone else may find it useful in the future.

comment:14 Changed 8 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:15 Changed 8 years ago by Martyn Gigg

  • Status changed from verifying to closed

So this actually went in to the patch release and we were happy with that.

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5768

Note: See TracTickets for help on using tickets.