Skip to content
Snippets Groups Projects
Commit 8fce132b authored by Sam Jenkins's avatar Sam Jenkins
Browse files

Re #22935 made small changes and removed numspec equivalents

parent 95df3888
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ void ChopData::exec() {
size_t nbins = indexHigh - indexLow;
MatrixWorkspace_sptr workspace =
create<MatrixWorkspace>(*inputWS, nHist, BinEdges(nbins + 1));
create<MatrixWorkspace>(*inputWS, BinEdges(nbins + 1));
// Copy over X, Y and E data
PARALLEL_FOR_IF(Kernel::threadSafe(*inputWS, *workspace))
......
......@@ -428,7 +428,7 @@ void ConjoinXRuns::exec() {
// now get the size of the output
size_t numSpec = first->getNumberHistograms();
m_outWS = create<MatrixWorkspace>(*first, numSpec, Points(outBlockSize));
m_outWS = create<MatrixWorkspace>(*first, Points(outBlockSize));
// copy over the merged sample logs from the temp
m_outWS->mutableRun() = temp->run();
......
......@@ -52,7 +52,7 @@ void ConvertToMatrixWorkspace::exec() {
// Create the output workspace. This will copy many aspects fron the input
// one.
outputWorkspace = outputWorkspace = create<Workspace2D>(*inputWorkspace);
outputWorkspace = create<Workspace2D>(*inputWorkspace);
// ...but not the data, so do that here.
PARALLEL_FOR_IF(Kernel::threadSafe(*inputWorkspace, *outputWorkspace))
......
......@@ -735,7 +735,7 @@ API::MatrixWorkspace_sptr ConvertUnits::removeUnphysicalBins(
MantidVec::difference_type bins = X0.cend() - start;
MantidVec::difference_type first = start - X0.cbegin();
result = create<MatrixWorkspace>(*workspace, numSpec, BinEdges(bins));
result = create<MatrixWorkspace>(*workspace, BinEdges(bins));
for (size_t i = 0; i < numSpec; ++i) {
auto &X = workspace->x(i);
......
......@@ -706,12 +706,11 @@ API::MatrixWorkspace_sptr GeneratePeaks::createOutputWorkspace() {
<< "Using input worksapce to generate output workspace!\n";
HistogramBuilder builder;
builder.setX(std::move(inputWS->x(0).size()));
builder.setY(std::move(inputWS->y(0).size()));
builder.setX(inputWS->x(0).size());
builder.setY(inputWS->y(0).size());
builder.setDistribution(inputWS->isDistribution());
outputWS = create<MatrixWorkspace>(*inputWS, inputWS->getNumberHistograms(),
builder.build());
outputWS = create<MatrixWorkspace>(*inputWS, builder.build());
// Only copy the X-values from spectra with peaks specified in the table
// workspace.
for (const auto &iws : m_spectraSet) {
......
......@@ -57,7 +57,7 @@ void IdentifyNoisyDetectors::exec() {
// Create the output workspace a single value for each spectra.
MatrixWorkspace_sptr outputWs;
outputWs = create<MatrixWorkspace>(*inputWS, nHist, Points(1));
outputWs = create<MatrixWorkspace>(*inputWS, Points(1));
MatrixWorkspace_sptr stdDevWs;
stdDevWs = create<MatrixWorkspace>(*outputWs);
......
......@@ -79,7 +79,7 @@ void InterpolatingRebin::exec() {
const int nHists = static_cast<int>(inputW->getNumberHistograms());
// make output Workspace the same type as the input but with the new axes
MatrixWorkspace_sptr outputW =
create<MatrixWorkspace>(*inputW, nHists, BinEdges(ntcnew));
create<MatrixWorkspace>(*inputW, BinEdges(ntcnew));
// Copy over the 'vertical' axis
if (inputW->axes() > 1)
outputW->replaceAxis(1, inputW->getAxis(1)->clone(outputW.get()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment