Ticket #10463 (assigned)

Opened 6 years ago

Last modified 5 years ago

LoadNexusProcessed

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Backlog
Component: Framework Keywords: Student
Cc: Blocked By:
Blocking: Tester:

Description

Look in LoadNexusProcessed, and you will see several places:

histo = m_spec_min - 1; 

This is not correct. The spectrum number to workspace index number is not necessarily offset by one, and hardcoding it like this is bound to cause trouble in the future. There's plenty of functional test coverage here, so you're unlikely to really break things in the process of fixing. However, do check that the solution does not degrade performance.

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Owner changed from Anyone to Owen Arnold
  • Status changed from new to infoneeded

Owen can you elaborate a bit on the correct way to get the mapping in this case.

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from infoneeded to new

Once 10385 has been merged to master (currently waiting). Look at extractMappingInfo, particularly detgroup.openNXInt("spectra") because this is where the information comes from.

One way around this problem would be to try to perform readInstrumentGroup, which calls the methods above, as early as possible in the processing, as this gets the correct information, and would avoid you having to make the same call twice.

My suggestion would be to deliberately write a file where the spectrum numbers are not offset by 1 to the workspace index. This would be a good regression test case. This could be achieved by running crop workspace, and saving the result, which could then be loaded via LoadNexusProcessed.

On a related note, many of the load algorithms are in a really bad state! They are extremely hard to read, contain lots of duplicated code. I fear that this is going to come back and bite us!

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:4 Changed 6 years ago by Nick Draper

Moved to the backlog at the code freeze of R3.3

comment:5 Changed 6 years ago by Nick Draper

  • Milestone changed from Release 3.3 to Backlog

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11305

Note: See TracTickets for help on using tickets.