Xmipp  v3.23.11-Nereus
Macros | Functions
reconstruct_ADMM.cpp File Reference
#include "reconstruct_ADMM.h"
#include "symmetrize.h"
#include <core/metadata_extension.h>
Include dependency graph for reconstruct_ADMM.cpp:

Go to the source code of this file.

Macros

#define SYMMETRIZE_PROJECTIONS
 

Functions

void addGradientTerm (double mu, AdmmKernel &kernel, MultidimArray< double > &L, FourierTransformer &transformer, MultidimArray< std::complex< double > > &fourierKernelV, char direction)
 

Macro Definition Documentation

◆ SYMMETRIZE_PROJECTIONS

#define SYMMETRIZE_PROJECTIONS

Definition at line 37 of file reconstruct_ADMM.cpp.

Function Documentation

◆ addGradientTerm()

void addGradientTerm ( double  mu,
AdmmKernel kernel,
MultidimArray< double > &  L,
FourierTransformer transformer,
MultidimArray< std::complex< double > > &  fourierKernelV,
char  direction 
)

Definition at line 444 of file reconstruct_ADMM.cpp.

446 {
447  kernel.computeGradient(L,direction);
448 
449  transformer.FourierTransform();
450  double K=mu*MULTIDIM_SIZE(L);
451  auto xdim_2=(double)(XSIZE(L)/2);
452  double Kargument=2*PI*xdim_2/XSIZE(L);
453  FOR_ALL_ELEMENTS_IN_ARRAY3D(fourierKernelV)
454  {
455  // Calculation of L^t*L
456  // -L^2(r)*exp(-i*2*pi*(N/2)/N*(k+i+j)): the last term is a phase shift due to FFT
457  double argument=Kargument*(k+i+j);
458  double s, c;
459  //sincos(argument,&s,&c);
460  s = sin(argument);
461  c = cos(argument);
462  A3D_ELEM(fourierKernelV,k,i,j)+=-A3D_ELEM(transformer.fFourier,k,i,j)*
463  A3D_ELEM(transformer.fFourier,k,i,j)*std::complex<double>(K*c,K*s);
464  }
465 }
doublereal * c
#define MULTIDIM_SIZE(v)
MultidimArray< std::complex< double > > fFourier
Definition: xmipp_fftw.h:70
#define i
void computeGradient(MultidimArray< double > &gradient, char direction, bool adjoint=false)
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 A3D_ELEM(V, k, i, j)
#define FOR_ALL_ELEMENTS_IN_ARRAY3D(V)
#define XSIZE(v)
void direction(const MultidimArray< double > &orMap, MultidimArray< double > &qualityMap, double lambda, int size, MultidimArray< double > &dirMap, int x, int y)
void FourierTransform(T &v, T1 &V, bool getCopy=true)
Definition: xmipp_fftw.h:166
#define j
int mu
constexpr int K
#define PI
Definition: tools.h:43