535 size_t thread_id = thread_data->thread_id;
537 size_t thread_num = prm->
threads;
539 size_t &this_image = thread_data->this_image;
542 int *opt_refno = thread_data->opt_refno;
543 double *opt_psi = thread_data->opt_psi;
544 bool *opt_flip = thread_data->opt_flip;
545 double *maxcorr = thread_data->maxcorr;
551 size_t myinit, myfinal, myincr;
553 bool done_once=
false;
574 for (
size_t itrans = myinit; itrans < prm->
nr_trans; itrans+=myincr)
581 if (itrans == myinit)
629 for (
size_t i = myinit;
i != myfinal;
i += myincr)
631 if (
i%thread_num == thread_id)
636 std::cerr<<
" thread_id= "<<thread_id<<
" i= "<<
i<<
" "<<myinit<<
" "<<myfinal<<
" "<<myincr<<std::endl;
649 std::cerr <<
"XXXXpointer_allrefs2refsinmemXXXXXX" <<std::endl;
650 for (std::vector<int>::iterator
i = prm->
651 pointer_allrefs2refsinmem.begin();
654 std::cerr << *
i << std::endl;
655 std::cerr <<
"XXXXpointer_refsinmem2allrefsXXXXXX" <<std::endl;
656 for (std::vector<int>
660 std::cerr << *
i << std::endl;
661 std::cerr <<std::endl;
681 std::cerr <<
"imgno " << imgno <<std::endl;
682 std::cerr<<
"Got refno= "<<refno
687 for (
size_t itrans = 0; itrans < prm->
nr_trans; itrans++)
691 std::cerr<<
"prm->stddev_ref[refno], prm->stddev_img[itrans]: " <<
707 memcpy(&
dAi(allCorr,0),&
dAi(corr,0),
XSIZE(corr)*
sizeof(
double));
708 memcpy(&
dAi(allAng,0),&
dAi(ang,0),
XSIZE(ang)*
sizeof(
double));
716 double bestLastCorr = 99e99;
717 for (
size_t n = 0;
n < nIter;
n++)
719 for (
size_t k = 0;
k <
XSIZE(allCorr);
k++)
734 bestLastCorr = maxcorr[
n];
739 std::cerr<<
"mirror: corr "<<maxcorr;
742 std::cerr<<std::endl;
749 std::cerr <<
"DEBUG_ROB, imgno:" << imgno << std::endl;
750 std::cerr <<
"DEBUG_ROB, i:" <<
i << std::endl;
751 std::cerr <<
"DEBUG_ROB, prm->mysampling.my_neighbors[imgno][i]:" << prm->
mysampling.
my_neighbors[imgno][
i] << std::endl;
752 std::cerr<<
"straight: corr "<<maxcorr<<std::endl;
763 std::cerr<<
" rotal%% "<<total_rot
764 <<
" => prep: "<<prepare_img
765 <<
" all_refs: "<<all_rot_align
766 <<
" (of which "<<get_refs
768 <<
" refs for imgno "<<imgno<<
" )"
std::vector< int > pointer_allrefs2refsinmem
void resize(size_t Ndim, size_t Zdim, size_t Ydim, size_t Xdim, bool copy=true)
void getCurrentReference(int refno, Polar_fftw_plans &local_plans)
std::vector< int > search5d_xoff
void resizeNoCopy(const MultidimArray< T1 > &v)
int getSampleNoOuterRing() const
void rotationalCorrelation(const Polar< std::complex< double > > &M1, const Polar< std::complex< double > > &M2, MultidimArray< double > &angles, RotationalCorrelationAux &aux)
std::vector< int > search5d_yoff
void computeAverageAndStddev(double &avg, double &stddev, int mode=FULL_CIRCLES) const
double elapsed_time(ProcessorTimeStamp &time, bool _IN_SECS)
Polar< std::complex< double > > * fP_ref
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
#define DIRECT_A1D_ELEM(v, i)
pthread_mutex_t debug_mutex
void getPolarFromCartesianBSpline(const MultidimArray< T > &M1, int first_ring, int last_ring, int BsplineOrder=3, double xoff=0., double yoff=0., double oversample1=1., int mode1=FULL_CIRCLES)
Polar< std::complex< double > > * fPm_img
std::vector< std::vector< size_t > > my_neighbors
void fourierTransformRings(Polar< double > &in, Polar< std::complex< double > > &out, Polar_fftw_plans &plans, bool conjugated)
Polar< std::complex< double > > * fP_img
FourierTransformer local_transformer
std::vector< int > pointer_refsinmem2allrefs
void annotate_time(TimeStamp *time)
int barrier_wait(barrier_t *barrier)
void calculateFftwPlans(Polar_fftw_plans &out)