EMAN2
Protected Member Functions | List of all members
EMAN::ModelHelixProcessor Class Reference

#include <processor.h>

Inheritance diagram for EMAN::ModelHelixProcessor:
Inheritance graph
[legend]
Collaboration diagram for EMAN::ModelHelixProcessor:
Collaboration graph
[legend]

Protected Member Functions

float radprofile (float r, int type)
 

Additional Inherited Members

- Public Types inherited from EMAN::Processor
enum  fourier_filter_types {
  TOP_HAT_LOW_PASS , TOP_HAT_HIGH_PASS , TOP_HAT_BAND_PASS , TOP_HOMOMORPHIC ,
  GAUSS_LOW_PASS , GAUSS_HIGH_PASS , GAUSS_BAND_PASS , GAUSS_INVERSE ,
  GAUSS_HOMOMORPHIC , BUTTERWORTH_LOW_PASS , BUTTERWORTH_HIGH_PASS , BUTTERWORTH_HOMOMORPHIC ,
  KAISER_I0 , KAISER_SINH , KAISER_I0_INVERSE , KAISER_SINH_INVERSE ,
  SHIFT , TANH_LOW_PASS , TANH_HIGH_PASS , TANH_HOMOMORPHIC ,
  TANH_BAND_PASS , RADIAL_TABLE , CTF_
}
 Fourier filter Processor type enum. More...
 
- Public Member Functions inherited from EMAN::Processor
virtual ~Processor ()
 
virtual void process_inplace (EMData *image)=0
 To process an image in-place. More...
 
virtual EMDataprocess (const EMData *const image)
 To proccess an image out-of-place. More...
 
virtual void process_list_inplace (vector< EMData * > &images)
 To process multiple images using the same algorithm. More...
 
virtual string get_name () const =0
 Get the processor's name. More...
 
virtual Dict get_params () const
 Get the processor parameters in a key/value dictionary. More...
 
virtual void set_params (const Dict &new_params)
 Set the processor parameters using a key/value dictionary. More...
 
virtual TypeDict get_param_types () const
 Get processor parameter information in a dictionary. More...
 
virtual string get_desc () const =0
 Get the descrition of this specific processor. More...
 
- Static Public Member Functions inherited from EMAN::Processor
static string get_group_desc ()
 Get the description of this group of processors. More...
 
static void EMFourierFilterInPlace (EMData *fimage, Dict params)
 Compute a Fourier-filter processed image in place. More...
 
static EMDataEMFourierFilter (EMData *fimage, Dict params)
 Compute a Fourier-processor processed image without altering the original image. More...
 
- Protected Attributes inherited from EMAN::Processor
Dict params
 

Detailed Description

Definition at line 9237 of file processor.h.

Member Function Documentation

◆ radprofile()

float ModelHelixProcessor::radprofile ( float  r,
int  type 
)
protected

Definition at line 13135 of file processor.cpp.

13137{
13138 // r in angstrom
13139 double ret = 0;//iterations ==> rounding is problematic with float types if 15 < r < 20 and really bad if 20 < r < 30
13140 if (type == 0) { // pure Gaussian falloff
13141 r /= 2;
13142 ret = exp(-r * r);
13143 } else if (type == 1) { // pure Gaussian falloff + negative dip, so mean is 0
13144 r /= 2;
13145 ret = (1 - r * r / 4) * exp(-r * r / 4);
13146 } else if (type == 2) {
13147 // polynomial fitting to the radial profile of real helix density
13148 // f=a0*x^n+a1+x^(n-1)+ ... +a[n-1]*x+an
13149 //float an[11]={2.847024584977009e-10,-3.063997224364090e-08,1.418801040660860e-06,-3.678676414383996e-05,5.804871622801710e-04,-5.640340018430164e-03,3.208802421493864e-02,-9.068475313823952e-02,7.097329559749284e-02,-9.993347339658298e-02,1.000000000000000e+00};
13150
13151 // now the fitting to the original profile
13152 if (r >= 12.2)
13153 return 0; //We don't want that part of the polynomial --> goes way below zero
13154 static float an[15] = { -3.9185246832229140e-16f,
13155 3.3957205298900993e-14f, 2.0343351971222658e-12f,
13156 -4.4935965816879751e-10f, 3.0668169835080933e-08f,
13157 -1.1904544689091790e-06f, 2.9753088549414953e-05f,
13158 -4.9802112876220150e-04f, 5.5900917825309360e-03f,
13159 -4.0823714462925299e-02f, 1.8021733669148599e-01f,
13160 -4.0992557296268717e-01f, 3.3980328566901458e-01f,
13161 -3.6062024812411908e-01f, 1.0000000000000000e+00f };
13162
13163 ret = an[0];
13164 for (int i = 1; i < 15; i++) {
13165 ret = ret * r + an[i];
13166 }
13167 }
13168 return (float)ret;
13169}

Referenced by EMAN::ModelEMCylinderProcessor::process_inplace(), and EMAN::ApplyPolynomialProfileToHelix::process_inplace().


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