Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::ModelHelixProcessor Class Reference

#include <processor.h>

Inheritance diagram for EMAN::ModelHelixProcessor:

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

Collaboration graph
[legend]
List of all members.

Protected Member Functions

float radprofile (float r, int type)

Detailed Description

Definition at line 6889 of file processor.h.


Member Function Documentation

float ModelHelixProcessor::radprofile float  r,
int  type
[protected]
 

Definition at line 9921 of file processor.cpp.

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

09922               : modified from EMAN1 Cylinder.C by Wen Jiang
09923 {
09924         // r in angstrom
09925         double ret = 0;//iterations ==> rounding is problematic with float types if 15 < r < 20 and really bad if 20 < r < 30
09926         if (type == 0) { // pure Gaussian falloff
09927                 r /= 2;
09928                 ret = exp(-r * r);
09929         } else if (type == 1) { // pure Gaussian falloff + negative dip, so mean is 0
09930                 r /= 2;
09931                 ret = (1 - r * r / 4) * exp(-r * r / 4);
09932         } else if (type == 2) {
09933                 // polynomial fitting to the radial profile of real helix density
09934                 // f=a0*x^n+a1+x^(n-1)+ ... +a[n-1]*x+an
09935                 //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};
09936 
09937                 // now the fitting to the original profile
09938                 if (r >= 12.2)
09939                         return 0; //We don't want that part of the polynomial --> goes way below zero
09940                 static float an[15] = { -3.9185246832229140e-16f,
09941                                 3.3957205298900993e-14f, 2.0343351971222658e-12f,
09942                                 -4.4935965816879751e-10f, 3.0668169835080933e-08f,
09943                                 -1.1904544689091790e-06f, 2.9753088549414953e-05f,
09944                                 -4.9802112876220150e-04f, 5.5900917825309360e-03f,
09945                                 -4.0823714462925299e-02f, 1.8021733669148599e-01f,
09946                                 -4.0992557296268717e-01f, 3.3980328566901458e-01f,
09947                                 -3.6062024812411908e-01f, 1.0000000000000000e+00f };
09948 
09949                 ret = an[0];
09950                 for (int i = 1; i < 15; i++) {
09951                         ret = ret * r + an[i];
09952                 }
09953         }
09954         return (float)ret;
09955 }


The documentation for this class was generated from the following files:
Generated on Mon Jul 19 13:07:31 2010 for EMAN2 by  doxygen 1.4.4