Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTER IDF should position detectors at twoTheta #20991

Closed
gemmaguest opened this issue Oct 23, 2017 · 0 comments · Fixed by #20997
Closed

INTER IDF should position detectors at twoTheta #20991

gemmaguest opened this issue Oct 23, 2017 · 0 comments · Fixed by #20997
Assignees
Labels
High Priority An issue or pull request that if not addressed is severe enough to postponse a release. Reflectometry Issues and pull requests related to reflectometry
Milestone

Comments

@gemmaguest
Copy link
Member

Expected behavior

The INTER IDF should reposition detectors to twoTheta on Load.

Actual behavior

If using a linear detector, the detector is positioned at theta instead of twoTheta.

Steps to reproduce the behavior

Run the following script. Both the point and linear detectors should be re-positioned on load to twoTheta=2.6, but currently the linear detector is being placed at theta=1.3 instead. (Note that the output of this script is not exact because the pixel centre is not positioned precisely at twoTheta. This is expected.)

import math
 
def getTwoThetaForPixel(wkspace, detId):
    inst = wkspace.getInstrument()
    det = inst.getDetector(detId)
    return wkspace.detectorTwoTheta(det) * 180 / math.pi
 
print "Expected twoTheta=2.6 in both cases"
 
print "INTER43572 point-detector puts detectors at twoTheta (nearest pixel is 4):"
pixel=4
ws=Load(Filename='INTER43572')
detTwoTheta = getTwoThetaForPixel(ws,pixel)
print '  Detector ID',pixel,'twoTheta =', detTwoTheta
 
print "INTER43583 linear-detector puts detectors at theta instead of twoTheta (nearest pixel is 2047):"
pixel=2047
ws=Load(Filename='INTER43583')
detTwoTheta = getTwoThetaForPixel(ws,pixel)
print '  Detector ID',pixel,'twoTheta =', detTwoTheta

Platforms affected

All

@gemmaguest gemmaguest added the Reflectometry Issues and pull requests related to reflectometry label Oct 23, 2017
@gemmaguest gemmaguest added this to the Release 3.12 milestone Oct 23, 2017
edwardb96 pushed a commit that referenced this issue Oct 23, 2017
edwardb96 pushed a commit that referenced this issue Feb 15, 2018
edwardb96 pushed a commit that referenced this issue Feb 20, 2018
LoadDetectorInfo appeared to be using castaround and substr to check
precisions of loaded values to n decimal places. This commit changes
to the use of TS_ASSERT_DELTA using 1.e-n to achieve the same
effect.

This also simplified the test cases and reduces the required
precision in some cases due to the fact that for detector positions 1.e-3 is
accurate to the milimetre anyway.
edwardb96 pushed a commit that referenced this issue Feb 21, 2018
martyngigg added a commit that referenced this issue Mar 21, 2018
…definitions

Re #20991: Updated Reflectometry IDFs.
edwardb96 pushed a commit that referenced this issue Mar 22, 2018
peterfpeterson pushed a commit that referenced this issue Mar 27, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
(cherry picked from commit 8930aa1)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
(cherry picked from commit da3f0d8)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
(cherry picked from commit 7314a5d)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
(cherry picked from commit 54a947e)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
(cherry picked from commit 30327a6)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
This reverts commit 30327a6.

(cherry picked from commit c8ba192)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
(cherry picked from commit cbc85b7)
Matthew-Andrew pushed a commit that referenced this issue Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority An issue or pull request that if not addressed is severe enough to postponse a release. Reflectometry Issues and pull requests related to reflectometry
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants