Ticket #8291 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Make CheckWorkspacesMatch Output More Detailed Information on EventWorskpace

Reported by: Wenduo Zhou Owned by: Wenduo Zhou
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: petersonpf@… Blocked By:
Blocking: Tester: Russell Taylor

Description

CheckWorkspacesMatch can only tell whether two workspace matches or not, but lacks of detailed information, such as how many spectra are different, the difference is TOF or pulse, and etc.

These information are very helpful to find out the mismatched EventWorkspaces generated from LoadEventNexus and LoadEventPreNexus.

Change History

comment:1 Changed 7 years ago by Wenduo Zhou

  • Status changed from new to inprogress

comment:2 Changed 7 years ago by Wenduo Zhou

Enabled CheckWorkspacesMatch to output more info. Refs #8291.

  1. CheckWorkspacesMatch: Enhanced with output information
  2. EventList: More optional output at information log level.
  3. Events: More optional output at information log level for comparison

Changeset: ed836bc7fc6aac76dd1d53d694819c72cefdf99d

comment:3 Changed 7 years ago by Wenduo Zhou

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

The changes in Event and EventsList to output more log information slow down some other algorithms. And this ticket is for the purpose to investigate the bug in LoadEventPreNexus only. Russell suggested not to put it to master.

comment:4 Changed 7 years ago by Wenduo Zhou

  • Status changed from verify to reopened
  • Resolution wontfix deleted

It is better to have CheckWorkspacesMatch work as the ticket requests. Do the comparison outside EventsList and thus Event, such as nothing else will be affected.

comment:5 Changed 7 years ago by Wenduo Zhou

  • Status changed from reopened to inprogress

comment:6 Changed 7 years ago by Wenduo Zhou

Started to redo the work. Refs #8291.

Changeset: 7907c691b27728b8534e274115e21c7fcc1cd9d2

comment:7 Changed 7 years ago by Wenduo Zhou

Re-implemented the enhancement within this algorithm. Refs #8291.

Changeset: 92f6cc1969fdee0ed044660caad8c8792c8ebbe6

comment:8 Changed 7 years ago by Wenduo Zhou

Made change to print more information. Refs #8291.

Changeset: 6342f858202472c690ff53fe92aecfe6cc41b950

comment:9 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 825f24b36a631774bc8d12fa27a395b212014dc8

comment:10 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 7968c0850a7fe9dcefe5805bc16155f89ca6a580

comment:11 Changed 7 years ago by Wenduo Zhou

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

For testers

  1. Load some event nexus and event pre nexus data, such as /SNS/PG3/IPTS-5186/0/6760/ and /SNS/PG3/IPTS-8957/0/15583/;
  1. Run CheckWorkspacesMatch() on these 2 workspaces.
  • Make 'CheckType', 'CheckAxes', 'CheckSpectraMap', 'CheckInstrument' and 'CheckMasking' to be true.
  • Make 'CheckAllData' to be false. In this case, CheckWorkspacesMatch should do a quick check to report whether the 2 workspaces are identical. For PG3_6760, they should not be matched;
  1. Set 'CheckAllData' to true. Input an integer to NumberMismatchedSpectraToPrint as how many number of mismatched spectra will be printed out; Be noted that 'WorkspaceIndex' should be left blank at this point.
  1. Pick up any spectrum output from last step, and set to 'WorkspaceIndex'. Turn the log level to information. By this, you can see a one-to-one event comparison printed out in MantidPlot.

comment:12 Changed 7 years ago by Russell Taylor

  • Status changed from verify to reopened
  • Resolution fixed deleted

There are compiler (Windows) & cppcheck warnings to resolve.

comment:13 Changed 7 years ago by Wenduo Zhou

  • Status changed from reopened to inprogress

Removed warnings. Refs #8291.

Changeset: 1c21fa99762dbd749cd343eb7418630aa1324b96

comment:14 Changed 7 years ago by Wenduo Zhou

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

comment:15 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:16 Changed 7 years ago by Wenduo Zhou

Cleaned codes. Refs #8291.

Changeset: 3822155e7de6da1a9c06b23d960313c970bdb247

comment:17 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 0699d6e365627d457cb816744913f7e35969bcb5

comment:18 Changed 7 years ago by Wenduo Zhou

Cleaned codes. Refs #8291.

Changeset: facfc7b84de34e6ab02184cb25a4bf272c25294e

comment:19 Changed 7 years ago by Wenduo Zhou

Resolved the conflict. Refs #8291.

Changeset: a497a7ed94380ccd7a92f19021eaf2ebd6b43478

comment:20 Changed 7 years ago by Russell Taylor

My latest round of comments on this. Basically, I'm looking for it all to be less complicated and as concise as possible.

  • Only have one of NumberMismatchedSpectraToPrint & WorkspaceIndex - probably the latter (could make it an array property) - but it needs a better name. Perhaps "DetailedPrintIndices". It should also be enabled for Workspace2D inputs by upping the logging level from debug to information for matching indices.
  • An event workspace will have the same type of event in all spectra, so just check that before entering the loop and stop checking if they don't match. Therefore you can lose the "sameeventtype" and "numunequaltoftypespectra" variables.
  • Local variables should be camelCase for readability, e.g. numunequalpulseevents should be numUnequalPulseEvents
  • Line 926 should presumably be &&, not &
  • Lose the 'magic' tempnumunequal = -1 by moving up the incrementing of numunequalnumeventsspectra to where the check is made.

comment:21 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 825f24b36a631774bc8d12fa27a395b212014dc8

comment:22 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 7968c0850a7fe9dcefe5805bc16155f89ca6a580

comment:23 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 0699d6e365627d457cb816744913f7e35969bcb5

comment:24 Changed 7 years ago by Wenduo Zhou

Resolved the conflict. Refs #8291.

Changeset: a497a7ed94380ccd7a92f19021eaf2ebd6b43478

comment:25 Changed 7 years ago by Russell Taylor

  • Milestone changed from Release 3.1 to Release 3.2

comment:26 Changed 7 years ago by Wenduo Zhou

  • Blocking 8222 removed

comment:27 Changed 7 years ago by Wenduo Zhou

Resolved the conflict. Refs #8291.

Changeset: 9a198b7089d03331e587d201486ea15a53b3e881

comment:28 Changed 7 years ago by Wenduo Zhou

Cleaned the codes. Refs #8291.

Changeset: b4e56a012904a12c84de0769ea00af6c3a26b774

comment:29 Changed 7 years ago by Wenduo Zhou

Resolved the conflict during rebase. Refs #8291.

Changeset: 804bb558b860f47885c7118b718f819995c4b159

comment:30 Changed 7 years ago by Wenduo Zhou

Resolved conflict. Refs #8291.

Changeset: 1f8001d544051f3684b09e1a7b067151b8f09d22

comment:31 Changed 7 years ago by Wenduo Zhou

Fixed some errors in resolving conflict. Refs #8291.

Changeset: 48e491c7f8895f8dd5b121b661730c315e239bc3

comment:32 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/8291_redo_checkwsmatch_detailinfo'

Full changeset: d2e300d780401dc4b843ac21de6a4c50061ffc50

comment:33 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9136

Note: See TracTickets for help on using tickets.