From e218a564e629c52a245e5a99d2f332bc95212df4 Mon Sep 17 00:00:00 2001
From: Karl Palmen <karl.palmen@stfc.ac.uk>
Date: Mon, 13 Feb 2012 14:33:17 +0000
Subject: [PATCH] Early work on adding instrument data for re #4781

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
---
 Code/Mantid/Framework/API/src/ExperimentInfo.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Code/Mantid/Framework/API/src/ExperimentInfo.cpp b/Code/Mantid/Framework/API/src/ExperimentInfo.cpp
index 1d82801bd6a..a631bc9eea9 100644
--- a/Code/Mantid/Framework/API/src/ExperimentInfo.cpp
+++ b/Code/Mantid/Framework/API/src/ExperimentInfo.cpp
@@ -572,6 +572,18 @@ namespace API
     file->writeData("type", "text/plain"); // mimetype
     file->closeGroup();
 
+    // Add new group that could contain instrument data
+    file->makeGroup("new_group","NXData", true);
+    std::vector<double> angles(6);
+    for( int i=0; i<6; i++) angles[i] = 15.0*(i+1);
+    file->makeGroup("Detector_1","NXDetector", true);
+    file->writeData("Polar_angle",angles);
+    file->closeGroup();
+    file->makeGroup("Detector_2","NXDetector", true);
+    file->writeData("Polar_angle",angles);
+    file->closeGroup();
+    file->closeGroup();
+
     file->closeGroup(); // (close the instrument group)
 
     m_sample->saveNexus(file, "sample");
-- 
GitLab