 #ifndef NDEBUG
 #   define DEBUG_CUDASHRINKWRAP 0  // change this if you want to turn on debugging
 #else
-#   define DEBUG_CUDASHRINKWRAP 0  // leave this as it is
+#   define DEBUG_CUDASHRINKWRAP 2  // leave this as it is
 #endif
 
 #include <iostream>

#    include <fftw3.h>    // kinda problematic to mix this with cufft, but should work if it isn't cufftw.h
#    include "algorithms/vectorReduce.hpp"
#    include "algorithms/vectorElementwise.hpp"
#endif
#include "libs/cudacommon.hpp"
#include "libs/checkCufftError.hpp"

        const float maskedAbsMax = cudaVectorMax( dpIsMasked, nElements, rStream );
        const float maskedThreshold = rIntensityCutOffAutoCorel * maskedAbsMax;
        cudaKernelCutOff<<<nBlocks,nThreads,0,rStream>>>( dpIsMasked, nElements, maskedThreshold, 1.0f, 0.0f );
        CUDA_ERROR( cudaPeekAtLastError() );

        /* copy original image into fftw_complex array @todo: add random phase */
        cudaKernelCopyToRealPart<<<nBlocks,nThreads,0,rStream>>>( dpCurData, dpIntensity, nElements );
        CUDA_ERROR( cudaPeekAtLastError() );

        /* in the first step the last value for g is to be approximated
         * by g'. The last value for g, called g_k is needed, because
