Commit 1fc9063f authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

Added another check for correctness of the determined ADF ring index.

parent eb9c2796
......@@ -362,7 +362,7 @@ void Simulation::calculatePixel(ScanPoint &point, const double defocus) {
int ind = _gridman->adfBinIndex(ix, iy);
if(ind >= 0) {
if(ind >= 0 && ind < _gridman->adfDetectorGrid().size()) {
// check for not a number
auto intens = (float) pow(abs(wave(ix, iy)), 2);
if(!::isnan(intens))
......
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