Skip to content
Snippets Groups Projects
Commit 9cbcb4e3 authored by Karl Palmen's avatar Karl Palmen
Browse files

Allow for no spectra re #21444


Signed-off-by: default avatarKarl Palmen <karl.palmen@stfc.ac.uk>
parent dc62f352
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,9 @@ MatrixWorkspace_sptr removeZeros(MatrixWorkspace_sptr &ws,
const size_t nspec = ws->getNumberHistograms();
MatrixWorkspace_sptr outWS =
WorkspaceFactory::Instance().create(ws, nspec, maxItCount, maxItCount);
if (itCount.size() == 0) {
return outWS; // In case, we don't have any spectra
}
for (size_t spec = 0; spec < nspec; spec++) {
auto &inDataY = ws->dataY(spec);
outWS->setPoints(spec, Points(maxItCount, LinearGenerator(0.0, 1.0)));
......
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