From 6ff6c7c1ab3bc2d4930faf9a7032a312fe4f758e Mon Sep 17 00:00:00 2001 From: Vickie Lynch Date: Thu, 26 Jun 2014 14:39:01 -0400 Subject: [PATCH] Refs #9763 header changes only --- .../Framework/DataHandling/src/SaveAscii.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Code/Mantid/Framework/DataHandling/src/SaveAscii.cpp b/Code/Mantid/Framework/DataHandling/src/SaveAscii.cpp index 0874bac65b43..8e7129591c4c 100644 --- a/Code/Mantid/Framework/DataHandling/src/SaveAscii.cpp +++ b/Code/Mantid/Framework/DataHandling/src/SaveAscii.cpp @@ -73,6 +73,8 @@ namespace Mantid declareProperty("ColumnHeader", true, "If true, put column headers into file. "); + declareProperty("ICEFormat", false, "If true, special column headers for ICE in file. "); + } /** @@ -114,6 +116,19 @@ namespace Mantid sep = " , "; } std::string comment = getPropertyValue("CommentIndicator"); + std::string errstr = "E"; + std::string comstr = " , "; + bool ice = getProperty("ICEFormat"); + if (ice) + { + // overwrite properties so file can be read by ICE + errstr = "error"; + comstr = ", "; + writeHeader = true; + write_dx = false; + comment = "#features:"; + choice = "CSV"; + } // Create an spectra index list for output std::set idx; @@ -153,13 +168,13 @@ namespace Mantid if (idx.empty()) for(int spec=0;spec::const_iterator spec=idx.begin();spec!=idx.end();++spec) { - file << " , Y" << *spec << " , E" << *spec; + file << comstr << "Y" << *spec << comstr << errstr << *spec; if (write_dx) file << " , DX" << *spec; } file << std::endl;