Ticket #7441 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Make use of containsRectDetecors in SmoothNeighbours

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: minor Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By: #4443
Blocking: Tester: Keith Brown

Description (last modified by Arturs Bekasovs) (diff)

Currently SmoothNeighbours is assuming that the instrument has rectangular detectors only if it was specified manually, e.g. by setting Radius < 0. A method implemented in #4443 allows us to determine that automatically, so SmoothNeighbours could benefit from that.

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to accepted
  • Owner set to Arturs Bekasovs

comment:2 Changed 7 years ago by Nick Draper

  • Status changed from accepted to assigned

comment:3 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:4 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

Added new custom dialog for SmoothNeighbours algorithm

Refs #7441

Changeset: 6f1150ea4e33b6c77df238dcdced04653cd435b5

comment:5 Changed 7 years ago by Arturs Bekasovs

Checkpointing work to perform a rebase

Refs #7441

Changeset: a007ce87677578a2e7b475794573aa7119e3f836

comment:6 Changed 7 years ago by Arturs Bekasovs

Make ContaintsRectDetectors deal with situations when instrument does not have sample or source.

Refs #7441

Changeset: 1ca1df0df07860818a92632a81e5a09854836573

comment:7 Changed 7 years ago by Arturs Bekasovs

Move previous value getting logic to separated method.

Might be useful when we need to get previous value, without setting it.

Refs #7441

Changeset: f9e44b2adfe4cb8d1cea6c47732ed359dc033e7a

comment:8 Changed 7 years ago by Arturs Bekasovs

Added mapping between group names and group box widgets.

In that way we can e.g. hide some group widgets, as is done in SmoothNeighboursDialog.

Refs #7441

Changeset: 097b57eacc8aa5ffdbd5d2baab029894810f67f7

comment:9 Changed 7 years ago by Arturs Bekasovs

Implemented hiding of unrelevant parameter group in the dialog.

Refs #7441

Changeset: b5158e017ad2eef449ba293cb45981db29a2407e

comment:10 Changed 7 years ago by Arturs Bekasovs

Made use of automatic intrument type determination.

Refs #7441

Changeset: 2eaccd5e0b6ade0d66b6d4ed63c6447867aafa3e

comment:11 Changed 7 years ago by Arturs Bekasovs

Done some refactoring

Refs #7441

Changeset: ec19953f4cda76764843234a121cd63c15d4a7cd

comment:12 Changed 7 years ago by Arturs Bekasovs

Added helper method to create a workspace with cylindrical instrument.

Refs #7441

Changeset: e3916fad193ea39773d59b8c5c84fb822b3c80cc

comment:13 Changed 7 years ago by Arturs Bekasovs

Added description of how detector IDs are assigned

Refs #7441

Changeset: b7e6ac20905f7f45cd0062b2bc5b55c5f95d2f00

comment:14 Changed 7 years ago by Arturs Bekasovs

Updated tests to use automatic instr. type determination

Refs #7441

Changeset: a0d672db5ba9ae131f9169b2fd0c001d58f8c567

comment:15 Changed 7 years ago by Arturs Bekasovs

Made the dialog work properly for workspace groups.

Refs #7441

Changeset: d8a3a29394424adba416f019fc6bfa2f70405774

comment:16 Changed 7 years ago by Arturs Bekasovs

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Description modified (diff)

Branch: 7441_use_auto_rect_detectors

Tester: To test, run MantidPlot, and load the following workspaces:

  • SystemTests/Data/SANS2D/SANS2D00000808.nxs - rectangular instrument
  • AutoTestData/CNCS_7860_event.nxs - non-uniform instrument
  • AutoTestData/argus0031800.nxs - non-uniform instrument (group workspace)

Then, set the log level to "Debug" and run the SmoothNeighbours algorithm. Notice that the set of parameters asked is changed for different types of instruments. Execute the algorithm. Check that the method of finding neighbors is different for different workspaces (an appropriate log message should be printed). Compare the Instrument views of the workspaces, to make sure that smoothing happened as expected. Check that appropriate parameters are asked for group workspace, and that algorithm runs correctly.

comment:17 Changed 7 years ago by Keith Brown

  • Status changed from verify to verifying
  • Tester set to Keith Brown

comment:18 Changed 7 years ago by Keith Brown

when running CNCS_7860_event, a couple of the logs didn't have line breaks, see below.

Parameters:
  Name: InputWorkspace, Value: CNCS_7860_event, Default?: No, Direction: Input
  Name: OutputWorkspace, Value: 7860, Default?: No, Direction: Output
  Name: WeightedSum, Value: Flat, Default?: Yes, Direction: Input
  Name: Sigma, Value: 0.5, Default?: Yes, Direction: Input
  Name: IgnoreMaskedDetectors, Value: 0, Default?: No, Direction: Input
  Name: PreserveEvents, Value: 0, Default?: No, Direction: Input8 cores found. Performing sort with 1 cores per EventList, in 0 threads, using a chunk size of 320.

  Name: AdjX, Value: 1, Default?: Yes, Direction: Input
  Name: AdjY, Value: 1, Default?: Yes, Direction: Input
  Name: SumPixelsX, Value: 1, Default?: Yes, Direction: Input
  Name: SumPixelsY, Value: 1, Default?: Yes, Direction: Input
  Name: ZeroEdgePixels, Value: 0, Default?: Yes, Direction: Input
  Name: RadiusUnits, Value: Meters, Default?: Yes, Direction: Input
  Name: Radius, Value: 0, Default?: Yes, Direction: Input
  Name: NumberOfNeighbours, Value: 8, Default?: Yes, Direction: Input
  Name: SumNumberOfNeighbours, Value: 1, Default?: Yes, Direction: InputSmoothNeighbours processing NOT assuming rectangular detectors.

Read-locking CNCS_7860_event
Smoothing with Flat Weighting

However this is just in the log at debug level so it has no impact on the algorithm itself. I'll pass the testing and open that as a trivial fix in another ticket.

comment:19 Changed 7 years ago by Keith Brown

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7441_use_auto_rect_detectors'

comment:20 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8287

Note: See TracTickets for help on using tickets.