EMAN2
Public Member Functions
EMAN::Util::FakeKaiserBessel Class Reference

#include <util.h>

Inheritance diagram for EMAN::Util::FakeKaiserBessel:
Inheritance graph
[legend]
Collaboration diagram for EMAN::Util::FakeKaiserBessel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FakeKaiserBessel (float alpha, int K, float r_, float v_, int N_, float vtable_=0.f, int ntable_=5999)
float sinhwin (float x) const
 Kaiser-Bessel Sinh window function.
float i0win (float x) const
 Kaiser-Bessel I0 window function.
void build_I0table ()
 2*pi*alpha*r*vadjust

Detailed Description

Definition at line 304 of file util.h.


Constructor & Destructor Documentation

EMAN::Util::FakeKaiserBessel::FakeKaiserBessel ( float  alpha,
int  K,
float  r_,
float  v_,
int  N_,
float  vtable_ = 0.f,
int  ntable_ = 5999 
) [inline]

Definition at line 306 of file util.h.

                {

Member Function Documentation

void Util::FakeKaiserBessel::build_I0table ( ) [virtual]

2*pi*alpha*r*vadjust

Reimplemented from EMAN::Util::KaiserBessel.

Definition at line 2236 of file util_sparx.cpp.

References EMAN::Util::round(), and sqrt().

                                         {
        i0table.resize(ntable+1); // i0table[0:ntable]
        int ltab = int(round(float(ntable)/1.1f));
        fltb = float(ltab)/(K/2);
        float val0 = sqrt(facadj)*static_cast<float>(gsl_sf_bessel_I1(facadj));
        for (int i=ltab+1; i <= ntable; i++) i0table[i] = 0.f;
        for (int i=0; i <= ltab; i++) {
                float s = float(i)/fltb/N;
                if (s < vadjust) {
                        float rt = sqrt(1.f - pow(s/vadjust, 2));
                        i0table[i] = sqrt(facadj*rt)*static_cast<float>(gsl_sf_bessel_I1(facadj*rt))/val0;
                } else {
                        i0table[i] = 0.f;
                }
        }
}
float Util::FakeKaiserBessel::i0win ( float  x) const [virtual]

Kaiser-Bessel I0 window function.

Reimplemented from EMAN::Util::KaiserBessel.

Definition at line 2227 of file util_sparx.cpp.

References sqrt().

                                               {
        float val0 = sqrt(facadj)*float(gsl_sf_bessel_I1(facadj));
        float absx = fabs(x);
        if (absx > vadjust) return 0.f;
        float rt = sqrt(1.f - pow(absx/vadjust, 2));
        float res = sqrt(facadj*rt)*float(gsl_sf_bessel_I1(facadj*rt))/val0;
        return res;
}
float Util::FakeKaiserBessel::sinhwin ( float  x) const [virtual]

Kaiser-Bessel Sinh window function.

Reimplemented from EMAN::Util::KaiserBessel.

Definition at line 2253 of file util_sparx.cpp.

References sqrt().

                                                 {
        float val0 = sinh(fac)/fac;
        float absx = fabs(x);
        if (0.0 == x) {
                float res = 1.0f;
                return res;
        } else if (absx == alphar) {
                return 1.0f/val0;
        } else if (absx < alphar) {
                float rt = sqrt(1.0f - pow((x/alphar), 2));
                float facrt = fac*rt;
                float res = (sinh(facrt)/facrt)/val0;
                return res;
        } else {
                float rt = sqrt(pow((x/alphar),2) - 1.f);
                float facrt = fac*rt;
                float res = (sin(facrt)/facrt)/val0;
                return res;
        }
}

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