Ticket #9778 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Add possibility to return normalization forkspace from NormalizeToMonitor algorithm

Reported by: Alex Buts Owned by: Alex Buts
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description (last modified by Alex Buts) (diff)

This ticket is part of critical ticket #9769, which contains C++ code changes made in ticket #9769.

The changes were used to test the #9769, but are not critical for its final functionality

This is useful addition used in testing. New property added to algorithm and if this property is set, the workspace used in normalization to monitor is added to data-service and can be retrieved for the subsequent analysis.

Change History

comment:1 Changed 6 years ago by Alex Buts

  • Description modified (diff)

comment:2 Changed 6 years ago by Alex Buts

  • Description modified (diff)

comment:3 Changed 6 years ago by Alex Buts

refs #9778 Helper method to get normalization workspace from the alg:

NormaliseToMonitor

Conflicts:

Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py

Changeset: c90a0d2d02db0a345cc7b44d5d4207342c1a1161

comment:4 Changed 6 years ago by Alex Buts

refs #9778 missing changes lost extracting code changes from #9769

Changeset: ae906b54475c11c9f9424f2e3da9b58c4e909628

comment:5 Changed 6 years ago by Alex Buts

  • Status changed from new to assigned

comment:6 Changed 6 years ago by Alex Buts

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

This is simple changes used to debug #9769 and extracted from there. I make them and used for debugging #9769 but they are not necessary for production run of this ticket. Despite that, changes can be useful in similar debug situations.

Changes are pretty simple and I verified they work for #9769. Test by code review and look at unit tests modifications for the changes.

Tester can try and look at the Normalize to Monitor in different situations and look how the normalization workspace looks like.

comment:7 Changed 6 years ago by Alex Buts

  • Milestone changed from Release 3.2 to Release 3.3

comment:8 Changed 6 years ago by Martyn Gigg

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

comment:9 Changed 6 years ago by Martyn Gigg

This is not the correct way to go about outputting an additional workspace from the algorithm. No algorithm should interact directly with the AnalysisDataService. The proper way to do this would be to replace the new NormalizationFactorWSName property with an optional output WorkspaceProperty. I would also rename the property to something like NormFactorWS.

In the algorithm you would then do this:

std::string normWSName = getPropertyValue("NormFactorWS");

if(!normWSName.empty())
{
  setProperty("NormFactorWS", m_monitor} 
}

comment:10 Changed 6 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:11 Changed 6 years ago by Alex Buts

  • Status changed from reopened to inprogress

refs #9778 Changed NormaliseToMonitor according to tester's suggestion

and added the check that the names of the target workspace and the normalization workspace are different.

Changeset: 313bc650b5555c3cd23ddf6927941bf48d41f6ad

comment:12 Changed 6 years ago by Alex Buts

refs #9778 Added more tests to verify return normalization option

Changeset: 507fc6c59055234f4550bc1c7bf9caf0887c86d2

comment:13 Changed 6 years ago by Alex Buts

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

not sure if the fix worth efforts spent as it would do initial job it was written for more difficult, but here it is.

There are number of unit test which verify new return option. A tester can check them from gui or rely on unit tests to pass.

comment:14 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:15 Changed 6 years ago by Alex Buts

  • Status changed from verifying to closed

Merge branch 'master' into feature/9778_normToMonitorReturns

Full changeset: 0549dc91390c1a693897dadad8afba108c583205

comment:16 Changed 6 years ago by Alex Buts

Merge branch 'master' into feature/9778_normToMonitorReturns

Full changeset: f3b68e5de0fdb2f5afb9346ee5ff706f561ca4c4

comment:17 Changed 6 years ago by Alex Buts

Merge branch 'master' into feature/9778_normToMonitorReturns

Full changeset: d0052bd35a99f1b97150411ceca82ad7597dfef4

comment:18 Changed 6 years ago by Martyn Gigg

Merge remote-tracking branch 'origin/feature/9778_normToMonitorReturns'

Full changeset: e3b98944bde386f7d44f5cb28bb6b93e77f53fca

comment:19 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10620

Note: See TracTickets for help on using tickets.