From 7f171bd4592323c18284dd97b0e04d90edf91acf Mon Sep 17 00:00:00 2001 From: Lottie Greenwood Date: Tue, 4 Nov 2014 14:33:57 +0000 Subject: [PATCH] Commit 01 Refs #3493 --- .../DataHandling/inc/MantidDataHandling/SaveAscii2.h | 5 ++--- Code/Mantid/Framework/DataHandling/src/SaveAscii2.cpp | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h index dfacc3d56224..08e2c77d4a9d 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h @@ -57,9 +57,8 @@ namespace Mantid ~SaveAscii2() {} /// Algorithm's name for identification overriding a virtual method virtual const std::string name() const { return "SaveAscii"; } - ///Summary of algorithms purpose - virtual const std::string summary() const {return "Saves a 2D workspace to a ascii file.";} - + ///Summary of algorithms purpose + virtual const std::string summary() const {return "Saves a 2D workspace to a ascii file.";} /// Algorithm's version for identification overriding a virtual method virtual int version() const { return 2; } /// Algorithm's category for identification overriding a virtual method diff --git a/Code/Mantid/Framework/DataHandling/src/SaveAscii2.cpp b/Code/Mantid/Framework/DataHandling/src/SaveAscii2.cpp index f5d2bb8ee328..0b4068ea8072 100644 --- a/Code/Mantid/Framework/DataHandling/src/SaveAscii2.cpp +++ b/Code/Mantid/Framework/DataHandling/src/SaveAscii2.cpp @@ -55,7 +55,7 @@ namespace Mantid "It is always written for workspaces with multiple spectra."); declareProperty("CommentIndicator", "#", "Character(s) to put in front of comment lines."); - + // For the ListValidator std::string spacers[6][2] = { {"CSV", ","}, {"Tab", "\t"}, {"Space", " "}, {"Colon", ":"}, {"SemiColon", ";"}, {"UserDefined", "UserDefined"} }; @@ -80,6 +80,7 @@ namespace Mantid declareProperty("AppendToFile", false, "If true, don't overwrite the file. Append to the end of it. "); + declareProperty("RaggedWorkspace", true, "If true, ensure that more than one xspectra is used. "); //in testing } /** @@ -101,8 +102,9 @@ namespace Mantid int spec_max = getProperty("WorkspaceIndexMax"); bool writeHeader = getProperty("ColumnHeader"); bool appendToFile = getProperty("AppendToFile"); - + //here we need to check for ragged? // Check whether we need to write the fourth column + bool checkRagged = getProperty("RaggedWorkspace"); //in testing m_writeDX = getProperty("WriteXError"); std::string choice = getPropertyValue("Separator"); std::string custom = getPropertyValue("CustomSeparator"); @@ -154,6 +156,7 @@ namespace Mantid idx.insert(i); } } + //figure out how to read in readX and have them be seperate lists // Add spectra list into the index list if (!spec_list.empty()) @@ -240,7 +243,7 @@ namespace Mantid auto spec = m_ws->getSpectrum(*spectraItr); auto specNo = spec->getSpectrumNo(); if (m_writeID) file << specNo << std::endl; - + for(int bin=0;bin