Ticket #8095 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Angular detectors data generated by save_nxspe are incorrect for rings

Reported by: Alex Buts Owned by: Alex Buts
Priority: major Milestone: Release 3.0
Component: Direct Inelastic Keywords:
Cc: robert.bewley@… Blocked By:
Blocking: Tester: Owen Arnold

Description

Two pictures, attached to the ticket illustrate this for LET one is obtained using precaluclated phx file and another one -- from data, located in nxspe.

Attachments

right_angles.tif (283.0 KB) - added by Alex Buts 7 years ago.
correct theta
wrong_angles.tif (162.2 KB) - added by Alex Buts 7 years ago.
wrong theta

Change History

Changed 7 years ago by Alex Buts

correct theta

Changed 7 years ago by Alex Buts

wrong theta

comment:1 Changed 7 years ago by Alex Buts

  • Cc robert.bewley@… added
  • Milestone changed from Backlog to Release 3.0

comment:2 Changed 7 years ago by Alex Buts

  • Status changed from new to inprogress

comment:3 Changed 7 years ago by Alex Buts

refs #8095 presumably fixed issue

but the unit tests still need some work on

Changeset: b5a40a1637a5c8c928a744d71cdf8664e549fa0b

comment:4 Changed 7 years ago by Alex Buts

refs #8095 Unit tests fixed

and hopefully correct

Changeset: 8dab6c20308412974afb28ea1638a718f7e4b64e

comment:5 Changed 7 years ago by Alex Buts

refs #8095 Make it run multithreaded

Changeset: 0d2b6c383cd4ff0c21b720b437d9f6482a1fd1d2

comment:6 Changed 7 years ago by Alex Buts

refs #8095 fixing Unix warnings

and correct parallel interrupt region defined

Changeset: 4b01211d4a1e28d1b10760834576bba482277047

comment:7 Changed 7 years ago by Alex Buts

refs #8095 Another Unix warning

Changeset: d3f0dc8cd08e6486d4a09a9d938b1db83a9aae5d

comment:8 Changed 7 years ago by Alex Buts

refs #8095 Comments and Doxygen

Changeset: 6efb23d3c0223f72813605b2b6b3482bbc699878

comment:9 Changed 7 years ago by Alex Buts

It is not really easy to test this ticket unless you know mslice and can easy reduce some ISIS inelastic data into energy transfer.

If you can, then you can reduce some inelastic data using rings map for this cycle, generate nxspe file and load it into mslice using and not using correspondent par file. (take par from nxspe). The result should be (almost) identical. This would be an easy and comprehensive testing and I may do it with an instrument scientist. Actually, current LET system test uses rings map so one may only need correspondent .par which can be found at https://svn.isis.rl.ac.uk/InstrumentFiles/trunk/let (I think any rings.par or phx will do)

The error was not in SaveNXSE itself but in the child algorithm, FindDetectorsPar. The problem was the reliance of this algorithm on calculating centre of mass for rings and using this value to identify the ring itself and its derived parameters.

This would not work for rings which do not cover symmetric (vrt. the folding transformation around the plain, containing the beam line) areas of scattering angle (for incomplete rings of equal theta angels).

This is why I've completely rewritten the algorithm. The code become slower, but I have compensated it by multithreaded execution.

Tester not familiar with reduction and mslice can generate par or phx file (SavePAR or SavePHX) for an instrument (this will run FindDetectorsPar and save results into correspondent file) and compare R Phi and Theta values for Mantid detectors (Show Detectors) with R Phi and Theta in par or phx file. This is a sanity check and values should coincide. Then tester should group detectors into blocks and do the same for the instrument with combined detectors. Angular parameters for combined detectors should be very similar to the Mantid one.

Main part of FindDetectorsPar algorithm deals with calculations of angular sizes of the simple or combined detectors as seen from the sample. I do not know how these values are currently used so can not check them thoroughly (there are also number of approximations made when calculating these values) but these values should look reasonable.

Last edited 7 years ago by Alex Buts (previous) (diff)

comment:10 Changed 7 years ago by Alex Buts

refs #8095 fixing parallel issue on MAC

Changeset: cca2486cd3b0da4f62ce686a896be6b286b20e1b

comment:11 Changed 7 years ago by Alex Buts

refs #8095 save check for undefined detector.

Changeset: b5bca483a43da3e68801464a4126867fe7adc9b0

comment:12 Changed 7 years ago by Alex Buts

refs #8095 use reset instead of = to free the shared pointer

in the expression written to avoid MAC hung-up problem

Changeset: 870f1fb8e93ae208f8bb0dcae33f6acdca910016

comment:13 Changed 7 years ago by Alex Buts

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

comment:14 Changed 7 years ago by Andrei Savici

How do you generate the rings? If you use GenerateGroupingPowder to generate the xml grouping file, it automatically generates the par file to be used with SaveNXSPE

comment:15 Changed 7 years ago by Alex Buts

There are number of map files used in ISIS to construct rings. They are generated by matlab programs which I have never seen. The references for LET and other instruments are above but be careful with them as (e.g. MAPS rings (parker rins)) will not group virgin workspace correctly. It needs some additional manipulations. Let rings seems will work on fresh workspace.

but if you have ring-grouped workspace and do not provide par file when saving nxspe, the algorithm should generate and save to nxspe detector coordinates similar to one in the par file you have. This will be good and simple check.

There were some issues when using GenerateGroupingPowder for ISIS and I am not sure if they are resolved (something to do with 4 to 1 mapping or other oddities)

comment:16 Changed 7 years ago by Alex Buts

refs #8095 NXSPE version have changed to 1.2

to indicate to clients that detector's information is processed differently.

Changeset: 94c5e346795ab5d3561a1cd0e1ae42a939d3f0fe

comment:17 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Direct Inelastic

comment:18 Changed 7 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:19 Changed 7 years ago by Owen Arnold

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8095_wrongAngles'

Full changeset: 11a8af5f1ef27b8982a0a7a8d234d2ce135228a2

comment:20 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8940

Note: See TracTickets for help on using tickets.