Commit e6825647 authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

Fixed some if condition that made the ADF loop surprisingly slow.

parent c55315a9
......@@ -362,7 +362,7 @@ void Simulation::calculatePixel(ScanPoint &point, const double defocus) {
int ind = _gridman->adfBinIndex(ix, iy);
if(ind >= 0 && ind < (int)_gridman->adfDetectorGrid().size()) {
if(ind >= 0) {
// 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