#include <stack>
#include "ctf.h"
#include "emdata.h"
#include <iostream>
#include <cmath>
#include <cstring>
#include <gsl/gsl_sf_bessel.h>
#include <gsl/gsl_errno.h>
#include <vector>
#include <boost/shared_ptr.hpp>
Include dependency graph for emdata_sparx.cpp:
Go to the source code of this file.
Classes | |
class | ctf_store |
class | ctf_store_new |
Defines | |
#define | rdata(i, j, k) rdata[(i-1)+((j-1)+(k-1)*ny)*(size_t)nx] |
#define | square(x) ((x)*(x)) |
#define | proj(ix, iy, iz) proj[ix-1+(iy-1+(iz-1)*ny)*(size_t)nx] |
#define | pnewimg(ix, iy, iz) pnewimg[ix-1+(iy-1+(iz-1)*ny)*(size_t)nx] |
#define | in(i, j, k) in[i+(j+(k*ny))*(size_t)nx] |
#define | in(i, j, k) in[i+(j+(k*ny))*(size_t)nx] |
#define | QUADPI 3.141592653589793238462643383279502884197 |
#define | DGR_TO_RAD QUADPI/180 |
#define | rdata(i, j, k) rdata[(i-1)+((j-1)+(k-1)*ny)*(size_t)nx] |
#define | X(i) X[i-1] |
#define | Y(j) Y[j-1] |
#define | Z(k) Z[k-1] |
#define | avagadro (6.023*(double)pow(10.0,23.0)) |
#define | density_protein (1.36) |
#define | R (0.61803399f) |
#define | C (1.f-R) |
#define | QUADPI 3.141592653589793238462643383279502884197 |
#define | DGR_TO_RAD QUADPI/180 |
#define | fint(i, j, k) fint[(i-1) + ((j-1) + (k-1)*ny)*(size_t)lsd] |
#define | fout(i, j, k) fout[(i-1) + ((j-1) + (k-1)*nyn)*(size_t)lsdn] |
#define | fint(jx, jy, jz) fint[jx + (jy + jz*ny)*(size_t)nox] |
#define | fint(jx, jy, jz) fint[jx + (jy + jz*ny)*(size_t)nx] |
#define | fout(jx, jy, jz) fout[jx + (jy + jz*ny)*(size_t)nx] |
Functions | |
float | dist (int lnlen, const float *line_1, const float *line_2) |
float | dist_r (int lnlen, const float *line_1, const float *line_2) |
void | swapx (float *a, float *b, float *temp, size_t nbytes) |
Helper function for EMData::fft_shuffle, below. | |
ostream & | operator<< (ostream &os, const Pixel &peak) |
float | circumference (EMData *emdata, int npixel) |
|
Definition at line 5925 of file emdata_sparx.cpp. |
|
Definition at line 5928 of file emdata_sparx.cpp. Referenced by EMAN::EMData::find_3d_threshold(), EMAN::EMData::phase_cog(), and EMAN::Util::TwoDTestFunc(). |
|
Definition at line 5926 of file emdata_sparx.cpp. |
|
Definition at line 6222 of file emdata_sparx.cpp. |
|
Definition at line 6222 of file emdata_sparx.cpp. Referenced by EMAN::Util::CANG(). |
|
Definition at line 7323 of file emdata_sparx.cpp. |
|
Definition at line 7323 of file emdata_sparx.cpp. |
|
Definition at line 7323 of file emdata_sparx.cpp. Referenced by EMAN::EMData::Four_shuf_ds_cen_us(). |
|
Definition at line 7324 of file emdata_sparx.cpp. |
|
Definition at line 7324 of file emdata_sparx.cpp. Referenced by EMAN::EMData::Four_shuf_ds_cen_us(). |
|
Definition at line 2710 of file emdata_sparx.cpp. |
|
|
Definition at line 1005 of file emdata_sparx.cpp. Referenced by EMAN::EMData::average_circ_sub(). |
|
|
Definition at line 6221 of file emdata_sparx.cpp. |
|
Definition at line 6221 of file emdata_sparx.cpp. |
|
Definition at line 5927 of file emdata_sparx.cpp. Referenced by EMAN::Transform::orthogonalize(), EMAN::NewLowpassGaussProcessor::process_inplace(), and EMAN::Util::triquad(). |
|
Definition at line 5790 of file emdata_sparx.cpp. |
|
Definition at line 5790 of file emdata_sparx.cpp. |
|
|
Definition at line 5791 of file emdata_sparx.cpp. Referenced by EMAN::SVDAnalyzer::analyze(), Derivatives(), Derivatives_G(), Steepda(), Steepda_G(), EMAN::Util::svdcmp(), Utilit2(), and Utilit2_G(). |
|
Definition at line 5792 of file emdata_sparx.cpp. Referenced by Derivatives(), Derivatives_G(), Steepda(), Steepda_G(), Utilit2(), Utilit2_G(), and EMAN::Util::WTF(). |
|
Definition at line 5793 of file emdata_sparx.cpp. |
|
Definition at line 6571 of file emdata_sparx.cpp. 06576 { 06577 // 1d case 06578 float sumf=0.0; 06579 int sumn=0; 06580 for( int i=0; i < npixel; ++i ) { 06581 sumf += data[i]; 06582 sumf += data[nx-1-i]; 06583 sumn += 2; 06584 } 06585 return sumf/sumn; 06586 } 06587 06588 if( nz==1 ) { 06589 float sumf=0.0; 06590 int sumn=0; 06591 int id=0; 06592 for( int iy=0; iy < ny; ++iy ) { 06593 for( int ix=0; ix < nx; ++ix ) { 06594 if( iy<npixel || iy>ny-1-npixel || ix<npixel || ix>nx-1-npixel ) { 06595 sumf += data[id]; 06596 sumn += 1; 06597 } 06598 id++; 06599 } 06600 } 06601 06602 Assert( id==nx*ny ); 06603 Assert( sumn == nx*ny - (nx-2*npixel)*(ny-2*npixel) ); 06604 return sumf/sumn; 06605 } 06606 06607 // 3d cases; 06608 06609 float sumf = 0.0; 06610 size_t sumn = 0; 06611 size_t id = 0; 06612 for( int iz=0; iz < nz; ++iz) { 06613 for( int iy=0; iy < ny; ++iy) { 06614 for( int ix=0; ix < nx; ++ix ) { 06615 if( iz<npixel||iz>nz-1-npixel||iy<npixel||iy>ny-1-npixel||ix<npixel||ix>nx-1-npixel) { 06616 sumf += data[id]; 06617 sumn += 1; 06618 } 06619 id++; 06620 } 06621 } 06622 } 06623 06624 06625 Assert( id==(size_t)nx*ny*nz); 06626 Assert( sumn==(size_t)nx*ny*nz-(size_t)(nx-2*npixel)*(ny-2*npixel)*(nz-2*npixel) ); 06627 return sumf/sumn; 06628 } 06629 /* 06630 Purpose: Create a new [normalized] [zero-padded] image.
|
|
Definition at line 474 of file emdata_sparx.cpp. Referenced by EMAN::EMData::cm_euc(), EMAN::Quaternion::normalize(), EMAN::MakeRadiusProcessor::process_dist_pixel(), EMAN::MaskGaussInvProcessor::process_dist_pixel(), EMAN::MaskGaussProcessor::process_dist_pixel(), EMAN::MaskNoiseProcessor::process_dist_pixel(), EMAN::MaskEdgeMeanProcessor::process_dist_pixel(), EMAN::MaskSharpProcessor::process_dist_pixel(), EMAN::RotationalSubstractProcessor::process_inplace(), EMAN::RotationalAverageProcessor::process_inplace(), EMAN::MaskGaussNonuniformProcessor::process_pixel(), EMAN::CircularMaskProcessor::process_pixel(), EMAN::PointArray::set_from_density_map(), trmesh_(), and EMAN::Util::trmsh3_(). 00475 { 00476 float dis2=0.0; 00477 for( int i=0; i < lnlen; ++i) { 00478 float tmp = line_1[i] - line_2[i]; 00479 dis2 += tmp*tmp; 00480 } 00481 //return static_cast<float>(std::sqrt(dis2)); 00482 return dis2; 00483 }
|
|
Definition at line 485 of file emdata_sparx.cpp. References sqrt(). 00486 { 00487 double dis2 = 0.0; 00488 for( int i=0; i < lnlen; ++i ) { 00489 float tmp = line_1[lnlen-1-i] - line_2[i]; 00490 dis2 += tmp*tmp; 00491 } 00492 return static_cast<float>(std::sqrt(dis2)); 00493 }
|
|
Definition at line 4952 of file emdata_sparx.cpp. 04955 {
|
|
Helper function for EMData::fft_shuffle, below.
Definition at line 3984 of file emdata_sparx.cpp. 03988 {
|