Xmipp  v3.23.11-Nereus
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members

#include <art_crystal.h>

Inheritance diagram for CrystalARTRecons:
Inheritance graph
[legend]
Collaboration diagram for CrystalARTRecons:
Collaboration graph
[legend]

Public Member Functions

void readParams (XmippProgram *program)
 
void print (std::ostream &o) const
 std::cout << crystal_prm; More...
 
void preProcess (GridVolume &vol_basis0, int level=FULL, int rank=-1)
 
void singleStep (GridVolume &vol_in, GridVolume *vol_out, Projection &theo_proj, Projection &read_proj, int sym_no, Projection &diff_proj, Projection &corr_proj, Projection &alig_proj, double &mean_error, int numIMG, double lambda, int act_proj, const FileName &fn_ctf, const MultidimArray< int > *maskPtr, bool refine)
 
void postProcess (GridVolume &vol_basis)
 
void applySymmetry (GridVolume &vol_in, GridVolume *vol_out, int grid_type)
 
- Public Member Functions inherited from ARTReconsBase
virtual ~ARTReconsBase ()
 
void initHistory (const GridVolume &vol_basis0)
 
void iterations (GridVolume &vol_basis, int rank=-1)
 

Static Public Member Functions

static void defineParams (XmippProgram *program, const char *prefix=nullptr, const char *comment=nullptr)
 
- Static Public Member Functions inherited from ARTReconsBase
static void defineParams (XmippProgram *program, bool mpiMode=false)
 

Public Attributes

double a_mag
 
double b_mag
 
double ang_a2b_deg
 angle from a to b (degrees) More...
 
double ang_x2a_deg
 angle from x axis to a (degrees) More...
 
Matrix1D< double > avox
 First lattice vector (voxel units) More...
 
Matrix1D< double > bvox
 Second lattice vector (voxel units) More...
 
bool fill_space
 Fill space, repeat unit cell all over the space. More...
 
Matrix1D< double > a
 First lattice vector (BCC units) More...
 
Matrix1D< double > b
 Second lattice vector (BCC units) More...
 
Matrix1D< double > aint
 First lattice vector approximated to integer numbers (BCC units) More...
 
Matrix1D< double > bint
 Second lattice vector approximated to integer numbers (BCC units) More...
 
Matrix1D< double > ai
 ai=aint/2 as double numbers More...
 
Matrix1D< double > bi
 bi=aint/2 as double numbers More...
 
int space_group
 space_group More...
 
MultidimArray< int > unit_cell_mask
 
- Public Attributes inherited from ARTReconsBase
BasicARTParameters artPrm
 

Detailed Description

ART+crystal parameters. Here only those specific parameters for crystals are found, the rest of parameters common with normal ART should be looked up in BasicARTParameters

Definition at line 43 of file art_crystal.h.

Member Function Documentation

◆ applySymmetry()

void CrystalARTRecons::applySymmetry ( GridVolume vol_in,
GridVolume vol_out,
int  grid_type 
)
virtual

Force the trial volume to be symmetric.

Reimplemented from ARTReconsBase.

Definition at line 388 of file art_crystal.cpp.

389 {
391 }
Matrix1D< double > bint
Second lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:72
MultidimArray< int > unit_cell_mask
Definition: art_crystal.h:85
int space_group
space_group
Definition: art_crystal.h:78
void symmetrizeCrystalVolume(GridVolume &vol_in, const Matrix1D< double > &eprm_aint, const Matrix1D< double > &eprm_bint, int eprm_space_group, const MultidimArray< int > &mask, int grid_type)
Definition: symmetries.cpp:301
Matrix1D< double > aint
First lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:70

◆ defineParams()

void CrystalARTRecons::defineParams ( XmippProgram program,
const char *  prefix = nullptr,
const char *  comment = nullptr 
)
static

Definition at line 36 of file art_crystal.cpp.

37 {
38  std::string line = " [--crystal ] : Crystal mode activation";
39 
40  if(nullptr != prefix)
41  line = prefix + line;
42  if (nullptr != comment)
43  line = line + " : " + comment;
44 
45  program->addParamsLine(line);
46  program->addParamsLine(" [--mag_a <mag>] : Magnitude of the first lattice vector");
47  program->addParamsLine(" [--mag_b <mag>] : Magnitude of the second lattice vector");
48  program->addParamsLine(" [--ang_a2b_deg <angle>] : Angle from vector a to vector b");
49  program->addParamsLine(" [--ang_x2a_deg <angle=0>] : Angle from vector x to vector a");
50  program->addParamsLine(" [--fill_space] : Repeat unit cell all over the space (pixels)");
51 
52 }
void addParamsLine(const String &line)

◆ postProcess()

void CrystalARTRecons::postProcess ( GridVolume vol_basis)
virtual

Finish iterations. For WLS: delete residual images Else: do nothing.

Reimplemented from ARTReconsBase.

Definition at line 382 of file art_crystal.cpp.

383 {
384  if (fill_space)
385  expandToFillSpace(artPrm, *this, vol_basis);
386 }
bool fill_space
Fill space, repeat unit cell all over the space.
Definition: art_crystal.h:62
void expandToFillSpace(const BasicARTParameters &prm, const CrystalARTRecons &eprm, GridVolume &vol)
BasicARTParameters artPrm

◆ preProcess()

void CrystalARTRecons::preProcess ( GridVolume vol_basis0,
int  level = FULL,
int  rank = -1 
)
virtual

Produce Initial and Side information for ART+crystal. This function computes from the ART+crystal parameters things like the integer<–>float lattice vector matrices, the unit cell mask. The reconstructed volume size can be modified such that the unit cell mask fits.

Reimplemented from ARTReconsBase.

Definition at line 114 of file art_crystal.cpp.

115 {
116  // Lattice vectors in BCC units
119 
120  // Compute space_group
121  if (artPrm.fn_sym != "")
123  ang_a2b_deg);
124  else
126 
127  // Integer lattice vectors ----------------------------------------------
131  ang_a2b_deg, aint, bint, D,
132  space_group);
133  // Define two more useful lattice vectors
134  ai = aint / 2;
135  bi = bint / 2;
136 
137  // Set general deformation pointer to this matrix
138  artPrm.D = new Matrix2D<double>;
139  *(artPrm.D) = D;
140  artPrm.D->resize(3, 3);
141  MAT_ELEM(*(artPrm.D), 2, 2) = 1;
143  *(artPrm.Dinv) = artPrm.D->inv();
145 
146  // Unit cell mask within volume -----------------------------------------
147  // Compute the 4 parallelogram corners
148  Matrix1D<double> c1 = ai + bi;
149  Matrix1D<double> c2 = -ai + bi;
150  Matrix1D<double> c3 = -c1;
151  Matrix1D<double> c4 = -c2;
152  Matrix1D<double> c1c3 = c1 - c3; // These extra variables are needed because
153  Matrix1D<double> c2c4 = c2 - c4; // the compiler messes up
154 
155  // Resize unit cell mask
156  // The unit mask is a little bigger to avoid the possibility of losing
157  // any basis due to a too tight mask.
158  int mask_xdim = CEIL(XMIPP_MAX(ABS(XX(c1c3)), ABS(XX(c2c4)))) + 3;
159  int mask_ydim = CEIL(XMIPP_MAX(ABS(YY(c1c3)), ABS(YY(c2c4)))) + 3;
160  unit_cell_mask.initZeros(mask_ydim, mask_xdim);
162 
163  // Resize the reconstructed volume
164  Matrix1D<double> r1(3), r2(3);
165  for (size_t n = 0; n < vol_basis0.VolumesNo(); n++)
166  {
167  Image<double> &V = vol_basis0(n);
168  ZZ(r1) = XMIPP_MIN(ZZ(r1), STARTINGZ(V()));
169  ZZ(r2) = XMIPP_MAX(ZZ(r2), FINISHINGZ(V()));
170  }
177  vol_basis0.resize(r1, r2);
178 
179  // Fill the unit cell mask
180  Matrix1D<double> r(2);
182  {
183  // Position vector of actual BCC element been considered
184  YY(r) = i;
185  XX(r) = j;
186 
187  // Vectors from r to each corner
188  Matrix1D<double> c1r = c1 - r;
189  Matrix1D<double> c2r = c2 - r;
190  Matrix1D<double> c3r = c3 - r;
191  Matrix1D<double> c4r = c4 - r;
192 
193  // Product of each of these vectors with tha parallelogram borders
194  int sgn[4];
195  sgn[0] = SGN0_VEC_PRODUCT(c1r, -ai);
196  sgn[1] = SGN0_VEC_PRODUCT(c2r, -bi);
197  sgn[2] = SGN0_VEC_PRODUCT(c3r, ai);
198  sgn[3] = SGN0_VEC_PRODUCT(c4r, bi);
199 
200 #ifdef DEBUG_A_LOT
201 
202  std::cout << "(x,y)=(" << XX(r) << "," << YY(r) << ") " << sgn[0] << sgn[1]
203  << sgn[2] << sgn[3] << std::endl;
204 #endif
205 
206  // Now check if point is inside
207  int inside_table[4][4] = {
208  {1, 1, 1, 1},
209  {0, 1, 1, 1},
210  {1, 0, 1, 1},
211  // 1,1,0,1, Take this side out
212  // 1,1,1,0, Take this side out
213  {0, 0, 1, 1}
214  // 1,0,0,1, and their three Vertex
215  // 1,1,0,0,
216  // 0,1,1,0
217  };
218 #define INSIDE_ACCORDING_TO(n) \
219  sgn[0]==inside_table[n][0] && sgn[1]==inside_table[n][1] && \
220  sgn[2]==inside_table[n][2] && sgn[3]==inside_table[n][3]
221 
222  for (int n = 0; n < 4; n++)
223  if (INSIDE_ACCORDING_TO(n))
224  {
225  unit_cell_mask(i, j) = 1;
226 #ifdef DEBUG_A_LOT
227 
228  std::cout << " Inside\n";
229 #endif
230 
231  break;
232  }
233  }
234 
235  // Now calculate side info of basel class
236  ARTReconsBase::preProcess(vol_basis0);
237 
238  // Show all parameters --------------------------------------------------
239 #ifdef DEBUG
240  std::cout << "avox= " << avox.transpose() << std::endl;
241  std::cout << "bvox= " << bvox.transpose() << std::endl;
242  std::cout << "grid_relative_size= " << artPrm.grid_relative_size << std::endl;
243  std::cout << "a= " << a.transpose() << std::endl;
244  std::cout << "b= " << b.transpose() << std::endl;
245  std::cout << "aint= " << aint.transpose() << std::endl;
246  std::cout << "bint= " << bint.transpose() << std::endl;
247  std::cout << "ai= " << ai.transpose() << std::endl;
248  std::cout << "bi= " << bi.transpose() << std::endl;
249  std::cout << "D= " << D;
250  std::cout << "Check that a=D*aint " << (D*aint).transpose() << std::endl;
251  std::cout << "Check that b=D*bint " << (D*bint).transpose() << std::endl;
252  std::cout << "Symmetry group: " << space_group;
253  ImageXmipp I;
254  I = unit_cell_mask;
255  I.write("unit_cell_mask.xmp");
256  std::cout << "unit_cell_mask shape=";
258  std::cout << std::endl;
259 #endif
260 }
#define INSIDE_ACCORDING_TO(n)
Matrix1D< double > avox
First lattice vector (voxel units)
Definition: art_crystal.h:58
#define XMIPP_MAX(x, y)
Definition: xmipp_macros.h:193
Basis basis
Basis function. By default, blobs.
Definition: basic_art.h:97
#define FINISHINGX(v)
void printShape(std::ostream &out=std::cout) const
void resize(const Matrix1D< double > &corner1, const Matrix1D< double > &corner2)
Definition: grids.h:873
Matrix2D< double > * D
Definition: basic_art.h:365
double grid_relative_size
Relative size for the grid.
Definition: basic_art.h:141
void inv(Matrix2D< T > &result) const
Definition: matrix2d.cpp:663
Matrix1D< double > bint
Second lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:72
FileName fn_sym
File containing symmetries.
Definition: basic_art.h:173
Matrix1D< double > a
First lattice vector (BCC units)
Definition: art_crystal.h:66
void computeIntegerLattice(const Matrix1D< double > &a, const Matrix1D< double > &b, double a_mag_grid, double b_mag_grid, double ang_a2b_deg, Matrix1D< double > &aint, Matrix1D< double > &bint, Matrix2D< double > &D, int space_group)
#define FINISHINGZ(v)
#define STARTINGX(v)
#define i
#define SGN0_VEC_PRODUCT(cir, a)
#define FOR_ALL_ELEMENTS_IN_ARRAY2D(m)
Matrix1D< T > transpose() const
Definition: matrix1d.cpp:644
#define STARTINGY(v)
#define MAT_ELEM(m, i, j)
Definition: matrix2d.h:116
int crystallographicSpaceGroup(double mag_a, double mag_b, double ang_a2b_deg) const
Definition: symmetries.cpp:541
size_t VolumesNo() const
Definition: grids.h:1003
Matrix1D< double > b
Second lattice vector (BCC units)
Definition: art_crystal.h:68
Matrix1D< double > ai
ai=aint/2 as double numbers
Definition: art_crystal.h:74
MultidimArray< int > unit_cell_mask
Definition: art_crystal.h:85
#define XX(v)
Definition: matrix1d.h:85
void transpose(double *array, int size)
#define CEIL(x)
Definition: xmipp_macros.h:225
virtual void preProcess(GridVolume &vol_basis0, int level=FULL, int rank=-1)
Produce Plain side information from the Class parameters.
void write(const FileName &fn) const
#define ABS(x)
Definition: xmipp_macros.h:142
Matrix1D< double > bvox
Second lattice vector (voxel units)
Definition: art_crystal.h:60
Matrix1D< double > bi
bi=aint/2 as double numbers
Definition: art_crystal.h:76
double ang_a2b_deg
angle from a to b (degrees)
Definition: art_crystal.h:54
#define XMIPP_MIN(x, y)
Definition: xmipp_macros.h:181
#define j
#define YY(v)
Definition: matrix1d.h:93
#define FINISHINGY(v)
void setD(Matrix2D< double > *_D)
Definition: basis.h:123
#define sym_P1
Definition: symmetries.h:54
float r2
BasicARTParameters artPrm
void initZeros(const MultidimArray< T1 > &op)
int space_group
space_group
Definition: art_crystal.h:78
#define STARTINGZ(v)
int * n
Matrix1D< double > aint
First lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:70
#define ZZ(v)
Definition: matrix1d.h:101
void resize(size_t Ydim, size_t Xdim, bool noCopy=false)
Definition: matrix2d.cpp:1022
SymList SL
A list with the symmetry matrices.
Definition: basic_art.h:330
Matrix2D< double > * Dinv
Just the inverse of D.
Definition: basic_art.h:367
float r1

◆ print()

void CrystalARTRecons::print ( std::ostream &  o) const
virtual

std::cout << crystal_prm;

Reimplemented from ARTReconsBase.

Definition at line 89 of file art_crystal.cpp.

90 {
91  o << "Crystal information ------------------------------------------" << std::endl;
92  o << "Lattice vector a: " << a.transpose() << std::endl;
93  o << "Lattice vector b: " << b.transpose() << std::endl;
94  o << "mag_a: " << a_mag << std::endl;
95  o << "mag_b: " << b_mag << std::endl;
96  o << "ang_a2b_deg: " << ang_a2b_deg << std::endl;
97  o << "ang_x2a_deg: " << ang_x2a_deg << std::endl;
98  o << "Fill space: " << fill_space << std::endl;
99  o << "Symmetry group: " << space_group << std::endl;
100 }
Matrix1D< double > a
First lattice vector (BCC units)
Definition: art_crystal.h:66
Matrix1D< T > transpose() const
Definition: matrix1d.cpp:644
double ang_x2a_deg
angle from x axis to a (degrees)
Definition: art_crystal.h:56
Matrix1D< double > b
Second lattice vector (BCC units)
Definition: art_crystal.h:68
double ang_a2b_deg
angle from a to b (degrees)
Definition: art_crystal.h:54
bool fill_space
Fill space, repeat unit cell all over the space.
Definition: art_crystal.h:62
int space_group
space_group
Definition: art_crystal.h:78

◆ readParams()

void CrystalARTRecons::readParams ( XmippProgram program)
virtual

Read special parameters from command line.

Reimplemented from ARTReconsBase.

Definition at line 54 of file art_crystal.cpp.

55 {
57  artPrm.is_crystal = true;
58  a_mag = program->getDoubleParam("--mag_a");
60  b_mag = program->getDoubleParam("--mag_b");
62  ang_a2b_deg = program->getDoubleParam("--ang_a2b_deg");
63  ang_x2a_deg = program->getDoubleParam("--ang_x2a_deg");
64  fill_space = program->checkParam("--fill_space");
65  avox.resize(2);
66  bvox.resize(2);
67  //DISCLAMER: I know this 0 and 90 degrees cases are rather silly but
68  //when debugging is so good that 90 is 90 and not 90.000001
69  //NOTE:ang_x2a_deg is applied ONLY in the final volume
70  //when moving from basis to voxels
71 
72  XX(avox) = a_mag;
73  YY(avox) = 0.;
74 
75  if (ang_a2b_deg == 90.)
76  {
77  XX(bvox) = 0;
78  YY(bvox) = b_mag;
79  }
80  else
81  {
84  }
85 
86 }
bool is_crystal
Is this a crystal 0 means NO 1 YES.
Definition: basic_art.h:252
Matrix1D< double > avox
First lattice vector (voxel units)
Definition: art_crystal.h:58
double getDoubleParam(const char *param, int arg=0)
#define SIND(x)
Definition: xmipp_macros.h:347
double sampling
Sampling rate.
Definition: basic_art.h:170
virtual void readParams(XmippProgram *program)
double ang_x2a_deg
angle from x axis to a (degrees)
Definition: art_crystal.h:56
#define XX(v)
Definition: matrix1d.h:85
void resize(size_t Xdim, bool copy=true)
Definition: matrix1d.h:410
Matrix1D< double > bvox
Second lattice vector (voxel units)
Definition: art_crystal.h:60
double ang_a2b_deg
angle from a to b (degrees)
Definition: art_crystal.h:54
#define YY(v)
Definition: matrix1d.h:93
bool fill_space
Fill space, repeat unit cell all over the space.
Definition: art_crystal.h:62
bool checkParam(const char *param)
BasicARTParameters artPrm
#define COSD(x)
Definition: xmipp_macros.h:329

◆ singleStep()

void CrystalARTRecons::singleStep ( GridVolume vol_in,
GridVolume vol_out,
Projection theo_proj,
Projection read_proj,
int  sym_no,
Projection diff_proj,
Projection corr_proj,
Projection alig_proj,
double &  mean_error,
int  numIMG,
double  lambda,
int  act_proj,
const FileName fn_ctf,
const MultidimArray< int > *  maskPtr,
bool  refine 
)
virtual

Run a single step of ART. An ART iteration is compound of as many steps as projections, this function runs a single step of the process. In ART the pointer to the output volume must point to the same vol_in, while in SIRT it should point to a second volume. The read projection must be provided to the algorithm but the rest of projections are output by the routine. The mean error is also an output. numIMG is a normalizing factor to be used in SIRT, if you are running pure ART then this factor should be 1.

The symmetry matrix from which the view is derived must be given in sym_no.

Reimplemented from ARTReconsBase.

Definition at line 267 of file art_crystal.cpp.

289 {
290  // Only works for blob volumes .............................................
291  if (artPrm.basis.type != Basis::blobs)
293  "This function only works with blob volumes");
294 
295  // Compute lattice vectors to be used ......................................
296  Matrix1D<double> aint, bint, shift;
297  aint.resize(2);
298  bint.resize(2);
299  shift.resize(3);
300  shift.initZeros();
301 
302  symmetrizeCrystalVectors(aint, bint, shift, this->space_group, sym_no,
303  this->aint, this->bint);
304  // Project structure .......................................................
305  // The correction image is reused in this call to store the normalizing
306  // projection, ie, the projection of an all-1 volume
307 
308  project_Crystal_Volume(vol_in, artPrm.basis, theo_proj,
309  corr_proj, YSIZE(read_proj()), XSIZE(read_proj()),
310  read_proj.rot(), read_proj.tilt(), read_proj.psi(), shift,
311  aint, bint, *(artPrm.D), *(artPrm.Dinv), this->unit_cell_mask,
313  double shift_X, shift_Y;
314 
315  // #define DEBUG_SHIFT
316 #ifdef DEBUG_SHIFT
317 
318  Matrix2D<double> A(3, 3);
319  A.initIdentity();
320  dMij(A, 0, 2) = 8;
321  dMij(A, 1, 2) = -5;
322  std::cout << "A" << A;
323  //move read_proj
324  FOR_ALL_DIRECT_ELEMENTS_IN_MATRIX2D(theo_proj())
325  dMij(theo_proj(), i, j) = dMij(read_proj(), i, j);
326  applyGeometry(IMGMATRIX(read_proj), A, IMGMATRIX(theo_proj), IS_NOT_INV, WRAP);
327 #endif
328 #undef DEBUG_SHIFT
329 
330  if (artPrm.ref_trans_after != -1 &&
331  imagen_no > artPrm.ref_trans_after && imagen_no != 0)
332  {
333  CorrelationAux aux;
334  calculate_and_find_correlation_max_proj(read_proj, theo_proj,
335  alig_proj,
336  shift_X, shift_Y,
339  imagen_no, aux);
340 
341  // Apply correction
342  Matrix2D<double> Correction(3, 3);
343  alig_proj().resize(read_proj());
344  Correction.initIdentity();
345 
346  dMij(Correction, 0, 2) = - shift_X;
347  dMij(Correction, 1, 2) = - shift_Y;
348  //copy theo_proj to a temporal matrix
350  dAij(alig_proj(), i, j) = dAij(read_proj(), i, j);
351  applyGeometry(xmipp_transformation::LINEAR, IMGMATRIX(alig_proj), IMGMATRIX(read_proj), Correction,
352  xmipp_transformation::IS_NOT_INV, xmipp_transformation::WRAP);
353  }
354  // Now compute differences .................................................
355  double applied_lambda = lambda / numIMG; // In ART mode, numIMG=1
356  mean_error = 0;
357  diff_proj().resize(read_proj());
358 
360  {
361  // Compute difference image and error
362  IMGPIXEL(diff_proj, i, j) = IMGPIXEL(read_proj, i, j) - IMGPIXEL(theo_proj, i, j);
363  mean_error += IMGPIXEL(diff_proj, i, j) * IMGPIXEL(diff_proj, i, j);
364 
365  // Compute the correction image
366  if (ABS(IMGPIXEL(corr_proj, i, j)) < 1)
367  IMGPIXEL(corr_proj, i, j) = SGN(IMGPIXEL(corr_proj, i, j));
368  IMGPIXEL(corr_proj, i, j) =
369  applied_lambda * IMGPIXEL(diff_proj, i, j) / IMGPIXEL(corr_proj, i, j);
370  }
371  mean_error /= XSIZE(diff_proj()) * YSIZE(diff_proj());
372 
373  // Backprojection of correction plane ......................................
374  project_Crystal_Volume(*vol_out, artPrm.basis, theo_proj,
375  corr_proj, YSIZE(read_proj()), XSIZE(read_proj()),
376  read_proj.rot(), read_proj.tilt(), read_proj.psi(), shift,
377  aint, bint, *(artPrm.D), *(artPrm.Dinv), this->unit_cell_mask,
379 }
#define YSIZE(v)
Basis basis
Basis function. By default, blobs.
Definition: basic_art.h:97
void calculate_and_find_correlation_max_proj(Projection const &proj1, Projection const &proj2, Projection &proj_temp, double &shift_X, double &shift_Y, double const max_step, int ref_trans_after, int imagen_no, CorrelationAux &aux)
Definition: refinement.cpp:151
#define REPORT_ERROR(nerr, ErrormMsg)
Definition: xmipp_error.h:211
double psi(const size_t n=0) const
#define FOR_ALL_DIRECT_ELEMENTS_IN_ARRAY2D(m)
#define dAij(M, i, j)
Matrix2D< double > * D
Definition: basic_art.h:365
void applyGeometry(int SplineDegree, MultidimArray< std::complex< double > > &V2, const MultidimArray< std::complex< double > > &V1, const Matrix2D< double > &A, bool inv, bool wrap, std::complex< double > outside, MultidimArray< double > *BcoeffsPtr)
#define BACKWARD
Definition: blobs.cpp:1092
Matrix1D< double > bint
Second lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:72
tBasisFunction type
Basis function to use.
Definition: basis.h:52
double rot(const size_t n=0) const
#define IMGMATRIX(I)
#define i
#define FOR_ALL_ELEMENTS_IN_ARRAY2D(m)
double tilt(const size_t n=0) const
double * lambda
MultidimArray< int > unit_cell_mask
Definition: art_crystal.h:85
#define dMij(m, i, j)
Definition: matrix2d.h:139
void resize(size_t Xdim, bool copy=true)
Definition: matrix1d.h:410
#define XSIZE(v)
#define ABS(x)
Definition: xmipp_macros.h:142
void project_Crystal_Volume(GridVolume &vol, const Basis &basis, Projection &proj, Projection &norm_proj, int Ydim, int Xdim, double rot, double tilt, double psi, const Matrix1D< double > &shift, const Matrix1D< double > &aint, const Matrix1D< double > &bint, const Matrix2D< double > &D, const Matrix2D< double > &Dinv, const MultidimArray< int > &mask, int FORW, int eq_mode)
void initZeros()
Definition: matrix1d.h:592
double ref_trans_step
Refine the translation alignement after n projection presentations.
Definition: basic_art.h:187
#define j
#define FORWARD
Definition: blobs.cpp:1091
void symmetrizeCrystalVectors(Matrix1D< double > &aint, Matrix1D< double > &bint, Matrix1D< double > &shift, int space_group, int sym_no, const Matrix1D< double > &eprm_aint, const Matrix1D< double > &eprm_bint)
Definition: symmetries.cpp:44
int ref_trans_after
Refine the translation alignement after n projection presentations.
Definition: basic_art.h:184
BasicARTParameters artPrm
int space_group
space_group
Definition: art_crystal.h:78
Incorrect value received.
Definition: xmipp_error.h:195
#define SGN(x)
Definition: xmipp_macros.h:155
Matrix1D< double > aint
First lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:70
Matrix2D< double > * Dinv
Just the inverse of D.
Definition: basic_art.h:367
#define IMGPIXEL(I, i, j)

Member Data Documentation

◆ a

Matrix1D<double> CrystalARTRecons::a

First lattice vector (BCC units)

Definition at line 66 of file art_crystal.h.

◆ a_mag

double CrystalARTRecons::a_mag

First lattice vector module (user supplies it in arbitrary units but it is divided by sampling as soon as it is initialized)

Definition at line 49 of file art_crystal.h.

◆ ai

Matrix1D<double> CrystalARTRecons::ai

ai=aint/2 as double numbers

Definition at line 74 of file art_crystal.h.

◆ aint

Matrix1D<double> CrystalARTRecons::aint

First lattice vector approximated to integer numbers (BCC units)

Definition at line 70 of file art_crystal.h.

◆ ang_a2b_deg

double CrystalARTRecons::ang_a2b_deg

angle from a to b (degrees)

Definition at line 54 of file art_crystal.h.

◆ ang_x2a_deg

double CrystalARTRecons::ang_x2a_deg

angle from x axis to a (degrees)

Definition at line 56 of file art_crystal.h.

◆ avox

Matrix1D<double> CrystalARTRecons::avox

First lattice vector (voxel units)

Definition at line 58 of file art_crystal.h.

◆ b

Matrix1D<double> CrystalARTRecons::b

Second lattice vector (BCC units)

Definition at line 68 of file art_crystal.h.

◆ b_mag

double CrystalARTRecons::b_mag

Second lattice vector module (user supplies it in arbitrary units but it is divided by sampling as soon as it is initialized)

Definition at line 52 of file art_crystal.h.

◆ bi

Matrix1D<double> CrystalARTRecons::bi

bi=aint/2 as double numbers

Definition at line 76 of file art_crystal.h.

◆ bint

Matrix1D<double> CrystalARTRecons::bint

Second lattice vector approximated to integer numbers (BCC units)

Definition at line 72 of file art_crystal.h.

◆ bvox

Matrix1D<double> CrystalARTRecons::bvox

Second lattice vector (voxel units)

Definition at line 60 of file art_crystal.h.

◆ fill_space

bool CrystalARTRecons::fill_space

Fill space, repeat unit cell all over the space.

Definition at line 62 of file art_crystal.h.

◆ space_group

int CrystalARTRecons::space_group

space_group

Definition at line 78 of file art_crystal.h.

◆ unit_cell_mask

MultidimArray<int> CrystalARTRecons::unit_cell_mask

Unit cell mask. This mask is defined in the BCC space and it represent a parallelogram defined by points (-a-b)/2, (-a+b)/2, (a-b)/2, (a+b)/2. The reconstruction will be only performed for the basis inside this mask. Be careful that this is a 2D mask for a 3D reconstruction.

Definition at line 85 of file art_crystal.h.


The documentation for this class was generated from the following files: