Commit 83fd095f authored by Yaroslav Gevorkov's avatar Yaroslav Gevorkov
Browse files

catch bad input

parent be431fc0
......@@ -28,6 +28,9 @@ PinkIndexer::PinkIndexer(const ExperimentSettings& experimentSettings, Considere
int PinkIndexer::indexPattern(Lattice& indexedLattice, Vector2f& centerShift, Array<bool, Dynamic, 1>& fittedPeaks, RowVectorXf& intensities,
const Matrix3Xf& meanReciprocalPeaks_1_per_A, int threadCount)
{
if (meanReciprocalPeaks_1_per_A.cols() < 2)
return 0;
Matrix2Xf detectorPeaks_m;
reciprocalToRealProjection.project(detectorPeaks_m, meanReciprocalPeaks_1_per_A);
return indexPattern(indexedLattice, centerShift, fittedPeaks, intensities, detectorPeaks_m, threadCount);
......@@ -36,6 +39,9 @@ int PinkIndexer::indexPattern(Lattice& indexedLattice, Vector2f& centerShift, Ar
int PinkIndexer::indexPattern(Lattice& indexedLattice, Vector2f& centerShift, Array<bool, Dynamic, 1>& fittedPeaks, RowVectorXf& intensities,
const Matrix2Xf& detectorPeaks_m, int threadCount)
{
if (detectorPeaks_m.cols() < 2)
return 0;
Matrix3Xf ucsDirections;
Array2Xf ucsBorderNorms;
backprojection.backProject(detectorPeaks_m, ucsDirections, ucsBorderNorms);
......
Markdown is supported
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