Fast estimate enhanced PSD. Set downsampling to 2 for halving the image size.
927 size_t Xdim, Ydim, Zdim, Ndim;
929 int minSize = 2 * (
std::max(Xdim, Ydim) / 10);
949 I.
read(fnMicrograph);
970 auto thMgr = std::unique_ptr<ThreadManager>(std::make_unique<ThreadManager>(numberOfThreads, &args));
972 if (args.Nprocessed != 0)
973 *(args.PSD) /= args.Nprocessed;
977 prog2.filter_w2 = 0.2;
978 prog2.decay_width = 0.02;
979 prog2.mask_w1 = 0.005;
982 prog2.applyFilter(*(args.PSD));
983 enhancedPSD = *(args.PSD);
985 auto downXdim = (int) ((
double)
XSIZE(enhancedPSD) / downsampling);
989 enhancedPSD.
selfWindow(firstIndex, firstIndex, lastIndex, lastIndex);
void run(ThreadFunction function, void *data=NULL)
void selfWindow(int n0, int z0, int y0, int x0, int nF, int zF, int yF, int xF, T init_value=0)
void min(Image< double > &op1, const Image< double > &op2)
void resizeNoCopy(const MultidimArray< T1 > &v)
void threadFastEstimateEnhancedPSD(ThreadArgument &thArg)
MultidimArray< double > * PSD
static void constructPieceSmoother(const MultidimArray< T > &piece, MultidimArray< T > &pieceSmoother)
MultidimArray< int > * pieceMask
void max(Image< double > &op1, const Image< double > &op2)
#define NEXT_POWER_OF_2(x)
MultidimArray< double > * pieceSmoother
double filter_w1
Bandpass filter low frequency (in Fourier space, max 0.5)
#define FIRST_XMIPP_INDEX(size)
void initZeros(const MultidimArray< T1 > &op)
#define LAST_XMIPP_INDEX(size)
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false)