Ticket #7150 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Debug reduction with splitters workspace and remove printing and debug statements from SNSPowderReduction

Reported by: Peter Peterson Owned by: Wenduo Zhou
Priority: major Milestone: Release 2.5.3
Component: Mantid Keywords: PatchCandidate,Released
Cc: Blocked By:
Blocking: Tester: Peter Peterson

Description (last modified by Wenduo Zhou) (diff)

SNSPowderReduction failed to generate multiple workspaces from run 14721 with a splitters workspace generated by proton charge.

There is a ridiculous amount of debug "print" statements in SNSPowderReduction. Got through the file and change all of the "print" to "self.log().information()" and "self.log().debug()" as appropriate. Generally the ones that start with "DB" should be at the debug log level.

Change History

comment:1 Changed 7 years ago by Wenduo Zhou

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Wenduo Zhou

  • Description modified (diff)

comment:3 Changed 7 years ago by Wenduo Zhou

  • Summary changed from Remove printing and debug statements from SNSPowderReduction to Debug reduction with splitters workspace and remove printing and debug statements from SNSPowderReduction

comment:4 Changed 7 years ago by Wenduo Zhou

git checkout --no-track -b bugfix/7150_split_workspace v2.5.0

Switched to a new branch 'bugfix/7150_split_workspace'

comment:5 Changed 7 years ago by Wenduo Zhou

Solved the split workspaces bug. Refs #7150.

Changeset: 8b4727cf29c05328b3449f99ec141e827315cf8b

comment:6 Changed 7 years ago by Wenduo Zhou

Merge difference. Refs #7150.

Changeset: 5ac722a6ae7e5bc28ec2dd2844b605f6211accbf

comment:7 Changed 7 years ago by Wenduo Zhou

Remove or relevel debug output. Refs #7150.

Changeset: 3b4232279069021fbdeb1afefd2ac2e8535bf53b

comment:8 Changed 7 years ago by Wenduo Zhou

Resolved merging conflict. Refs #7150.

Changeset: ae8535f197664fade700f42655cda94eecccfd5d

comment:9 Changed 7 years ago by Wenduo Zhou

Merge branch 'develop' of github.com:mantidproject/mantid into develop

comment:10 Changed 7 years ago by Wenduo Zhou

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

How to verify

Run the script below:

cal_file = "PG3_PAC_d12358_2013_01_23.cal" char_file = "PG3_characterization_2012_11_29-HR-mods.txt" savedir = "/home/wzz/Projects/MantidTests/Tickets/Ticket7112/Temp/"

# Load data Load(Filename=r'PG3_14721_event.nxs', OutputWorkspace='PG3_14721_log', LoadLogs=True)

# Generate event filter GenerateEventsFilter(

InputWorkspace='PG3_14721_log', OutputWorkspace='ProtonChargeFilter', InformationWorkspace='ProtonChargeFilterInfo', LogName='proton_charge', MinimumLogValue='0', MaximumLogValue='20000000', LogValueInterval=8900000, TitleOfSplitters='Proton Charge')

# Filter events to as a reference if False:

FilterEvents(InputWorkspace='PG3_14721_event',

OutputWorkspaceBaseName='PG3', InformationWorkspace='ProtonChargeFilterInfo', SplitterWorkspace='ProtonChargeFilter',GroupWorkspaces='1')

# reduce a series of runs SNSPowderReduction(

VanadiumNumber=-1, Instrument="PG3", RunNumber=[14721], Extension="_event.nxs", PreserveEvents=True, CalibrationFile=cal_file, CharacterizationRunsFile=char_file, LowResRef=15000, RemovePromptPulseWidth=50, Binning=-0.0004, BinInDspace=True, FilterBadPulses=False, SaveAs="gsas", OutputDirectory=savedir, NormalizeByCurrent=True, FinalDataUnits="dSpacing", SplittersWorkspace="ProtonChargeFilter", Sum = False)

You should find 3 reduced workspaces as the result. PG3_14721_0 cannot be normalized by current because the proton charges are zero. PG3_14721_1 has 1 event. PG3_14721_2 is normalized. But the signal is poor.

Last edited 7 years ago by Wenduo Zhou (previous) (diff)

comment:11 Changed 7 years ago by Peter Peterson

This was branched off of the v2.5.0 tag and is in the bugfix/7150_split_workspace branch.

comment:12 Changed 7 years ago by Wenduo Zhou

Merge branch 'develop' of github.com:mantidproject/mantid into develop into 6856_ConvertToDiffractionMDWS_v2

comment:13 Changed 7 years ago by Wenduo Zhou

Merge branch 'develop' of github.com:mantidproject/mantid into develop into 6856_ConvertToDiffractionMDWS_v2

comment:14 Changed 7 years ago by Peter Peterson

  • Status changed from verify to verifying
  • Tester set to Peter Peterson

comment:15 Changed 7 years ago by Peter Peterson

Merge remote branch 'origin/bugfix/7150_split_workspace'

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py

Re #7150.

Changeset: cd0030a02f24f7eeec766506694b261da5ee0448

comment:16 Changed 7 years ago by Peter Peterson

Merge remote branch 'origin/bugfix/7150_split_workspace' into release/2.5.x

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py

Re #7150.

Changeset: 1a147277ba694449b5c372853372e2c67d755897

comment:17 Changed 7 years ago by Peter Peterson

  • Status changed from verifying to closed

While verifying this ticket #7183 and #7184 were created.

comment:18 Changed 7 years ago by Alex Buts

Merge remote-tracking branch 'origin/feature/7155_migrate_PearlMCAbsorption' into develop

comment:19 Changed 7 years ago by Alex Buts

Merge remote-tracking branch 'origin/feature/7155_migrate_PearlMCAbsorption' into 7090_runpythonscript

comment:20 Changed 7 years ago by Peter Peterson

Merge remote branch 'origin/bugfix/7150_split_workspace' into release/2.5.x

Conflicts:

Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py

Re #7150.

Changeset: 1a147277ba694449b5c372853372e2c67d755897

comment:21 Changed 7 years ago by Nick Draper

  • Keywords PatchCandidate,Released added; PatchCandidate removed

comment:22 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7996

Note: See TracTickets for help on using tickets.