mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
211 stars 124 forks source link

SANS: Add all RAW metadata to LoadSpice2D #14318

Closed ricleal closed 9 years ago

ricleal commented 9 years ago

The output workspace should include all the metdata from the XML file in the form of XPath. Something like:

Counters/detector = 19033907.000000
Counters/monitor = 3977251.000000
Counters/time = 1800.000000
Header/Beam_Blocked_Run_Number = 0
Header/Builtin_Command = scan n 0 preset time 1800
Header/Command = scan n=0 preset time 1800
Header/Comment = none
Header/Detector_Sensitivity_Run_Number = 0
Header/Empty_Run_Number = 0
ricleal commented 9 years ago

I created an XMLHandler and I hope that others use it rather than duplicate code in the algorithms:

Framework/DataHandling/inc/MantidDataHandling/XmlHandler.h
Framework/DataHandling/src/XmlHandler.cpp

I added a few new properties: total detector distance and detector to silicon window distance. According to Lisa, the distance to use is:

total_sample_detector_distance = sample_detector_distance + sample_detector_distance_offset + sample_si_window_distance

The DataHandlingTest_LoadSpice2dTest ensures all this.

Note that detector is still moved to sample_detector_distance! Just for back compatibility with BioSans... I guess they don't use the sample_si_window_distance.