Ticket #7814 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Add an optional date parameter to the grouping XML files

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: minor Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #7762 Tester: Roman Tolchenov

Description (last modified by Arturs Bekasovs) (diff)

In grouping XML files we can currently specify an instrument name and LoadDetectorsGroupingFile will use it to load information about the instrument, e.g. detector-spectra map.

However, for some cases, instrument name is not enough, as we might have multiple IDFs for one instrument for different time periods. LoadInstrument (internally used by LoadDetectorsGroupingFile) takes the most recent one, but sometimes that's not what is needed.

For example, there is a grouping description for EMU with 32 detectors, but the most recent IDF for EMU has 96 detectors, which introduces problems. date parameter will help to specify which IDF we want to link grouping file to.

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress
  • Description modified (diff)
  • Summary changed from Add a date field to the grouping XML files to Add an optional date parameter to the grouping XML files

A parameter should, obviously, be optional.

comment:2 Changed 7 years ago by Arturs Bekasovs

Parse date from the XML file.

Plus minor fixes to code layout.

Refs #7814

Changeset: d08b36e52f4ff3c8b32aefb7a12ceefcaaf1fc39

comment:3 Changed 7 years ago by Arturs Bekasovs

Make the algorithm use date to load the right IDF.

Plus some code clean-up.

Refs #7814

Changeset: 12a9847e39fab8f173f2690746862541fafbf7c9

comment:4 Changed 7 years ago by Arturs Bekasovs

The only thing left to do - add a date parameter to the existing grouping files.

comment:5 Changed 7 years ago by Arturs Bekasovs

Update EMU instrument groupings.

That's apparently the only one which need to be changed, as has instrument versions with different number of detectors.

Refs #7814

Changeset: b7e02c230afeaecd56d8d3ec4ad9cb4c72432836

comment:6 Changed 7 years ago by Arturs Bekasovs

Renamed meaningless 'date' attribute to 'valid-on'.

Refs #7814

Changeset: 0bc6a221ece1964cdbab381c0c32cc5604bfd9ce

comment:7 Changed 7 years ago by Arturs Bekasovs

Let getInstrumentFilename method handle the empty date case.

Refs #7814

Changeset: 4b902a3fab038a085ca1d393fde74b258981e2f1

comment:8 Changed 7 years ago by Arturs Bekasovs

Renamed attribute to something even more meaningful.

Refs #7814

Changeset: 1fbb0c60383daead8d59e3a941ae36cb277e42f5

comment:9 Changed 7 years ago by Arturs Bekasovs

Added a unit test for a use case.

Plus some code cleaning.

Refs #7814

Changeset: b152d4bb5c5b821090a673f0415c987ea11409c7

comment:10 Changed 7 years ago by Arturs Bekasovs

Tester:

There is a new attribute 'idf-date' added to EMU grouping XML files. Read the description of the ticket and make sure you understand why it is needed. You need to check that it is used correctly.

So, basically, using LoadDetectorsGroupingFile you need to load instrument/Grouping/EMU_Detector_Grouping_LF_32.xml and check that the resulting GroupingWorkspace has 32 histograms, i.e. IDF for EMU with 32 detectors was used. Afterwards, load the instrument/Grouping/EMU_Detector_Grouping_LF_96.xml and check that IDF for EMU with 96 detectors was used. As an additional check, load any other grouping XML in the same folder, and check that the files without any 'idf-date' specified are loaded correctly.

An appropriate unit test was added, so you might want to check if it is adequate.

comment:11 Changed 7 years ago by Arturs Bekasovs

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

comment:12 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7762 added

(In #7762) Touches the same stuff. Better to update it all on one go.

comment:13 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:14 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7814_grouping_date_parameter'

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8659

Note: See TracTickets for help on using tickets.