Ticket #7776 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

New Algorithm: RingProfile

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: major Milestone: Release 3.0
Component: SANS Keywords:
Cc: Blocked By:
Blocking: #4032 Tester: Owen Arnold

Description

Sum of the counts against a ring (or circumference)

Inputs:

  • Centre
  • MinRadius
  • MaxRadius
  • NumBins
  • StartAngle
  • Sense

Attachments

RingProfile.png (82.5 KB) - added by Gesner Passos 7 years ago.
create_rings.py (1.5 KB) - added by Gesner Passos 7 years ago.
ring_image.py (1.3 KB) - added by Gesner Passos 7 years ago.

Change History

Changed 7 years ago by Gesner Passos

comment:1 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress

Changed 7 years ago by Gesner Passos

Changed 7 years ago by Gesner Passos

comment:2 Changed 7 years ago by Gesner Passos

Creation of the RingProfile algorithm

just execution of class_maker

re #7776

Changeset: 6613938bf19cbedc49eaee5c48a44ad9bcdc23a8

comment:3 Changed 7 years ago by Gesner Passos

Implementation of the RingProfile Algorithm

This commit adress the creation of the unit test and the implementation of the algorithm as well.

re #7776

Changeset: 61e8c9229db64213df08ad28b637a849707df866

comment:4 Changed 7 years ago by Gesner Passos

Add progress report to algorithm RingProfile

re #7776

Changeset: b97ed3abb02be507484e09d723175332dc9e8d1c

comment:5 Changed 7 years ago by Gesner Passos

Change the way to get the limit positions from workspace

Before, it tried to use the getBoundingBox from the instrument. But, if there were no sample attached to the workspace, a segmentation fault was triggered.

Now, it will try to get the limits of the position from the detectors, by querying the first available detector and the last one, and from their position guess the region defined by the instrument.

re #7776

Changeset: 6ccd6c5c1cd15f97744e41e211ac07c685ec0832

comment:6 Changed 7 years ago by Gesner Passos

Requirement Change for the output angles in RingProfile

Before, it was said that the angles in ringprofile would be the real angle from the 3d space, but this cause the other mantidplot things to break, as they are not expecting the horizontal axis to sank.

To avoid this, the requirement was changed to say that the degrees are always relative to the ring itself, which means, it will always be:

angle = i*360/NumBins

re #7776

Changeset: e52c02843b24bcafc704e89de3ae619e5ab9f37d

comment:7 Changed 7 years ago by Gesner Passos

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

Tester:

In order to help testing this ticket I've uploaded two scripts: create_rings.py and ring_image.py. Both, create workspaces that are rings around a center, and them, apply the RingProfile to small rings and concatenate the answers to cover the whole image. At the end, it creates a ring_alls workspace. Each spectrum of this workspace represents the result of RingProfile for a specific ring inside the image.

Run these scripts, change the inputs, and options. And check that they are as 'one would expect'.

I will have to create a similar algorithm, so, feedback on the code review and how to better organize it is really welcome.

comment:8 Changed 7 years ago by Owen Arnold

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

comment:9 Changed 7 years ago by Owen Arnold

This has been really well done. The documentation for this algorithm is excellent. The use of ASCII art to demonstrate the test setups is also highly useful. My one minor point would be that the X-axis label of "Scattering Angle" is wrong and will be misleading to the users.

comment:10 Changed 7 years ago by Owen Arnold

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Reopen so that axis label can be changed. I suggest that "Ring Angle" might be a better name than "Scattering Angle"

comment:11 Changed 7 years ago by Gesner Passos

  • Status changed from reopened to inprogress

comment:12 Changed 7 years ago by Gesner Passos

Change the unit of RingProfile

re #7776

Changeset: ed597edfd59e5a0847425ad6f4084debc014aebc

comment:13 Changed 7 years ago by Gesner Passos

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

comment:14 Changed 7 years ago by Owen Arnold

  • Status changed from verify to verifying

comment:15 Changed 7 years ago by Gesner Passos

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:16 Changed 7 years ago by Gesner Passos

  • Status changed from reopened to inprogress

Correct the doxygen warnings for RingProfile

re #7776

Changeset: a6f99ff6ba66723d07e03bf7625aa6d8d47a8c56

comment:17 Changed 7 years ago by Gesner Passos

Deal with cpp check related to RingProfile

There were 3 groups of warnings:

1 - scope variable of xpos, diffx, distance in the line 563. This warning was ignored, as putting these variables inside the scope (inside the loop) would be worse. 2 - unsignedLessThanZero - variable i in line 276. Corrected 3 - unreadVariable - x\y\zOutside unused line 324. Corrected.

re #7776

Changeset: c30f32d35a10f4ae6a01161b9f47149c1a8f1f87

comment:18 Changed 7 years ago by Gesner Passos

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

I checked that the doxygen warnings wave gone. But, the cppcheck is applied to the master branch. So, I can not check if they will disappear. The tester will have to do a code review of the commit in comment:17. We will afterwards check the result of the cppcheck in the master branch.

comment:19 Changed 7 years ago by Owen Arnold

  • Status changed from verify to verifying

comment:20 Changed 7 years ago by Owen Arnold

  • Status changed from verifying to closed

comment:21 Changed 7 years ago by Nick Draper

  • Component changed from Framework to SANS

comment:22 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8621

Note: See TracTickets for help on using tickets.