Ticket #7890 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Event mode files split monitors from detectors, but the SP/DET map on both contain the monitors

Reported by: Nick Draper Owned by: Gesner Passos
Priority: major Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #7643 Tester: Martyn Gigg

Description

From Rob Dalgleish

He wants to merge the monitors and dets into a single workspace, but is finding the sp/det map is wrong if he does so (duplicated monitors)

I have just saved an event mode file on OffSpec and read it into Mantid successfully.
However,
I f I now load the monitors as well I find that I cannot conjoin the workspaces because the detector workspace still contains the detector information for the monitors.

Is this correct? It does not seem correct to me. I would expect to only to see the information relating to the detectors I have loaded.

It means that the following test script breaks at the checkoverlapping point

# Load the event mode Data
Load(Filename=r'L:\RawData\cycle_13_2\OFFSPEC00023308.nxs',OutputWorkspace='OFFSPEC00023308',SingleBankPixelsOnly='0',LoadMonitors='1')

# load the histogram data from the Nexus file
w2=LoadNexus('23308')

w1_hist=RebinToWorkspace('OFFSPEC00023308','w2',PreserveEvents=False)
w1_mon_hist=RebinToWorkspace('OFFSPEC00023308_monitors','w2' ,PreserveEvents=False)
ConjoinWorkspaces('w1_mon_hist','w1_hist',CheckOverlapping=True)
RenameWorkspace('w1_mon_hist',OutputWorkspace='w1_hist')

Attachments

sansadd2_error.txt (19.4 KB) - added by Martyn Gigg 7 years ago.
sansadd2_error.txt

Change History

comment:1 Changed 7 years ago by Martyn Gigg

  • Status changed from new to inprogress

comment:2 Changed 7 years ago by Martyn Gigg

  • Summary changed from Envent mode files split monitors from detectors, but the SP/DET map on both contain the monitors to Event mode files split monitors from detectors, but the SP/DET map on both contain the monitors

It looks like a bug that was introduced in #6191. The monitor IDs used to be filtered out of the main spectra/detector map but now the map is simply reduced in size by the number of monitors. If the monitors are at the end then this will still work but not if they are anywhere else. The OFFSPEC monitors are defined at the start.

comment:3 Changed 7 years ago by Martyn Gigg

Allow an ignore list on constructing SpectrumDetectorMapping.

Enables filtering of given IDs when the list is first constructed. Refs #7890

Changeset: 8e1cc318a92c17cf756410a4fae0323d3c5a7e3d

comment:4 Changed 7 years ago by Martyn Gigg

Fix spectrum numbering for ISIS event files.

Uses new ignore id feature on SpectrumDetectorMapping and also sets the spectrum numbers on the resized EventWorkspace to those from the file. The default numbering scheme of starting at 1 is not sufficient as a monitor block may be start of the table. Refs #7890

Changeset: da7c0c809f4ad082b899fb0f461eefacceea6433

comment:5 Changed 7 years ago by Martyn Gigg

Branch: bugfix/7890_isis_event_monitors

Tester: If you load the event file mentioned in the description and check the workspace detector table you should find that no monitors are in the workspace and that the first spectrum has spectrum number 4.

The whole script in the description should now run to completion and the final workspace, w1_hist, should have a detector table that then includes the monitors with the numbers starting at 1.

comment:6 Changed 7 years ago by Martyn Gigg

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

comment:7 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

This has broken the windows/mac system tests but not the RHEL6/Ubuntu ones.

comment:8 Changed 7 years ago by Martyn Gigg

  • Status changed from reopened to inprogress

Correct fix for the spectrum numbering in ISIS event files.

Refs #7890

Changeset: db8b889fdffbdc4228aae81dc0863c2b5f821415

comment:9 Changed 7 years ago by Martyn Gigg

Add a .expected file for the LET event nexus files.

Checks the spectrum numbering when the monitors are at the other end. Refs #7890

Changeset: 7453f0a8f21001e2cc6a2763b33ea0fbe2147532

comment:10 Changed 7 years ago by Martyn Gigg

Branch: bugfix/7890_isis_event_monitors in both code & systemtests repository

Tester: If you load the event file mentioned in the description (it is in the systemtests/Data) and check the workspace detector table you should find that no monitors are in the workspace and that the first spectrum has spectrum number 4.

The whole script in the description should now run to completion and the final workspace, w1_hist, should have a detector table that then includes the monitors with the numbers starting at 1.

comment:11 Changed 7 years ago by Martyn Gigg

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

comment:12 Changed 7 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:13 Changed 7 years ago by Gesner Passos

This ticket may have side effects in adding SANS data.

comment:14 Changed 7 years ago by Gesner Passos

It breaks the 'correction' (wrong correction) done in #7600.

comment:15 Changed 7 years ago by Nick Draper

  • Status changed from verifying to reopened
  • Resolution fixed deleted

All good now, but Gesner has reported a side effect in the adding of SANS workspaces (an earlier fix is conflicting with this one). Reopened to Gesner to remove his earlier fix.

comment:16 Changed 7 years ago by Nick Draper

  • Owner changed from Martyn Gigg to Gesner Passos

comment:17 Changed 7 years ago by Gesner Passos

  • Status changed from reopened to inprogress

comment:18 Changed 7 years ago by Gesner Passos

Correction of SANS adding data

revert changes made in #7600 that was build over a bug in loading event data.

re #7890

Changeset: 4d663cf040328ce4f21699bf28746949117e090c

comment:19 Changed 7 years ago by Gesner Passos

The idea here is that if you are able to retest #7600, and it is correct, this test can pass. The first part of this ticket was tested by Nick and he found it working properly.

comment:20 Changed 7 years ago by Gesner Passos

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

comment:21 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

I have tried the test in #7600 but it fails after loading run 16189.

I have attached a copy of the results log with log level at information that shows the error message. It seems to be a problem with the ConjoinWorkspaces line.

Changed 7 years ago by Martyn Gigg

sansadd2_error.txt

comment:22 Changed 7 years ago by Gesner Passos

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

We found it is working.

comment:23 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester changed from Nick Draper to Martyn Gigg

comment:24 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/7890_isis_event_monitors'

comment:25 Changed 7 years ago by Gesner Passos

  • Blocking 7643 added

comment:26 Changed 7 years ago by Gesner Passos

Merge remote-tracking branch 'origin/bugfix/7890_isis_event_monitors' into bugfix/7643_sans2d_fixing_reduction

Full changeset: e78debb6e0f2b50289e2fe18f6cfde5e466c0984

comment:27 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8735

Note: See TracTickets for help on using tickets.