Skip to content

Commit

Permalink
Commit 01 Refs #3493
Browse files Browse the repository at this point in the history
  • Loading branch information
Lottie Greenwood committed Nov 4, 2014
1 parent f892a19 commit 7f171bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions Code/Mantid/Framework/DataHandling/src/SaveAscii2.cpp
Expand Up @@ -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"} };
Expand All @@ -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
}

/**
Expand All @@ -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");
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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<m_nBins;bin++)
{

Expand Down

0 comments on commit 7f171bd

Please sign in to comment.