Xmipp  v3.23.11-Nereus
Classes | Functions
Program CTF Basic Parameters
Collaboration diagram for Program CTF Basic Parameters:

Classes

class  ProgCTFBasicParams
 

Functions

double evaluateIceness (MultidimArray< double > &psd, double Tm)
 

Detailed Description

Function Documentation

◆ evaluateIceness()

double evaluateIceness ( MultidimArray< double > &  psd,
double  Tm 
)

Definition at line 338 of file ctf_estimate_from_psd_base.cpp.

339 {
340  if (Tm>1.8)
341  return 0.0; // We cannot measure at 3.6A, if the Tm>1.8A
342  double R4_4=floor(XSIZE(psd)*Tm/4.4);
343  double R4_0=floor(XSIZE(psd)*Tm/4.0);
344  double R3_6=floor(XSIZE(psd)*Tm/3.6);
345  R4_4*=R4_4;
346  R4_0*=R4_0;
347  R3_6*=R3_6;
348  double N1=0, N2=0, avg1=0, avg2=0;
350  {
351  double R2=i*i+j*j;
352  if (R2>R4_4)
353  {
354  if (R2<R4_0)
355  {
356  avg1+=A2D_ELEM(psd,i,j);
357  N1+=1;
358  }
359  else if (R2<R3_6)
360  {
361  avg2+=A2D_ELEM(psd,i,j);
362  N2+=1;
363  }
364  }
365  }
366  if (N1>0 && N2>0)
367  {
368  avg1/=N1;
369  avg2/=N2;
370  return avg2/avg1;
371  }
372  return -1;
373 }
#define A2D_ELEM(v, i, j)
__host__ __device__ float2 floor(const float2 v)
#define FOR_ALL_DIRECT_ELEMENTS_IN_ARRAY2D(m)
#define i
#define XSIZE(v)
#define j