Commit be66f4ab authored by Yaroslav Gevorkov's avatar Yaroslav Gevorkov
Browse files

handle case with many peaks of same intensity

parent d62beb01
...@@ -306,6 +306,20 @@ namespace pinkIndexer ...@@ -306,6 +306,20 @@ namespace pinkIndexer
} }
} }
if (peaksKept_normsIntensities < consideredPeaksCount)
{
for (int i = 0; i < peaksKept_norms && peaksKept_normsIntensities < consideredPeaksCount; i++)
{
if (intensities[i] == minIntensity)
{
ucsDirections.col(peaksKept_normsIntensities) = ucsDirections.col(i);
ucsBorderNorms.col(peaksKept_normsIntensities) = ucsBorderNorms.col(i);
intensities[peaksKept_normsIntensities] = intensities[i];
peaksKept_normsIntensities++;
}
}
}
ucsDirections.conservativeResize(NoChange, peaksKept_normsIntensities); ucsDirections.conservativeResize(NoChange, peaksKept_normsIntensities);
ucsBorderNorms.conservativeResize(NoChange, peaksKept_normsIntensities); ucsBorderNorms.conservativeResize(NoChange, peaksKept_normsIntensities);
intensities.conservativeResize(peaksKept_normsIntensities); intensities.conservativeResize(peaksKept_normsIntensities);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment