 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
18 char ax,
CTFparam& ctf,
int action,
double wiener,
21 double ddef = ((double)i - p->
image[img_num].
origin()[0])*scale;
23 ddef = ((double)i - p->
image[img_num].
origin()[1])*scale;
40 for ( xx=0, i*=p->
sizeX(), j=i+img_num*p->
image_size(); xx<p->sizeX(); xx++, i++, j++ )
52 CTFparam& ctf,
int action,
double wiener,
double tilt,
56 char ax = (fabs(axis)<
M_PI/4)?
'x':
'y';
58 double scale(pn->
sampling(0)[1]*tan(tilt));
61 cout <<
"Image " << img_num <<
": " << tilt*180.0/
M_PI << endl;
65 dispatch_queue_t myq = dispatch_queue_create(NULL, NULL);
66 dispatch_apply(nn, dispatch_get_global_queue(0, 0), ^(
size_t i){
71 cout <<
"Line " << n <<
"\r" << flush;
76 #pragma omp parallel for
77 for (
long i=0; i<nn; i++ ) {
83 cout <<
"Line " << n <<
"\r" << flush;
89 cout <<
"Lines calculated [" << img_num <<
"]: " << n << endl;
110 double wiener,
double tilt,
double tilt_inc,
double axis)
123 cout <<
"Action: " << action << endl;
124 cout <<
"Size: " << p->
size() << endl;
125 cout <<
"Images: " << p->
images() << endl;
126 cout <<
"Sampling: " << p->
sampling(0) << endl;
127 cout <<
"Tilt angle and increment: " << tilt*180/
M_PI <<
" " << tilt_inc*180/
M_PI << endl;
128 cout <<
"Tilt axis: " << axis*180/
M_PI << endl << endl;
133 for (
long nn=0; nn<pn->
images(); ++nn, tilt += tilt_inc )
fft_plan fft_setup(fft_direction dir, int opt=0)
Sets up a plan for fast Fourier transforms.
int complex_multiply(Bimage *p)
Calculates the product of a complex image with a simple image.
Bimage * img_ctf_calculate(CTFparam cp, int action, double wiener, Vector3< long > size, Vector3< double > sam, double lores=0, double hires=0)
Calculates a CTF complex image.
void set(long j, double v)
Sets a single value at the given index.
Bimage * img_ttf_simulate(Bimage *pn, CTFparam &ctf, int action, double wiener, double tilt, double tilt_inc, double axis)
Calculates an exact tilted CTF imposed image.
Vector3< long > size() const
int img_ttf_simulate_line(Bimage *p, Bimage *pn, long img_num, long i, char ax, CTFparam &ctf, int action, double wiener, double scale, fft_plan plan)
void origin(double x, double y, double z)
long img_ttf_simulate_one(Bimage *p, Bimage *pn, long img_num, CTFparam &ctf, int action, double wiener, double tilt, double axis, fft_plan plan)
int fft_destroy_plan(fft_plan plan)
Deallocates a plan for fast Fourier transforms.
Functions for CTF (contrast transfer function) processing.
General image parameter class.
Header file for general utilities.
void origin(double ox, double oy, double oz)
Bimage * extract(long nn)
Extracts one sub-image into new image structure.
void sampling(long nn, Vector3< double > u)