Skip to content

Commit

Permalink
Refs #9763 header changes only
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Jun 26, 2014
1 parent ebeab29 commit 6ff6c7c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/SaveAscii.cpp
Expand Up @@ -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. ");

}

/**
Expand Down Expand Up @@ -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<int> idx;
Expand Down Expand Up @@ -153,13 +168,13 @@ namespace Mantid
if (idx.empty())
for(int spec=0;spec<nSpectra;spec++)
{
file << " , Y" << spec << " , E" << spec;
file << comstr << "Y" << spec << comstr << errstr << spec;
if (write_dx) file << " , DX" << spec;
}
else
for(std::set<int>::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;
Expand Down

0 comments on commit 6ff6c7c

Please sign in to comment.