#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 |
Defines | |
#define | rdata(i, j, k) rdata[(i-1)+((j-1)+(k-1)*ny)*nx] |
#define | square(x) ((x)*(x)) |
#define | proj(ix, iy, iz) proj[ix-1+(iy-1+(iz-1)*ny)*nx] |
#define | pnewimg(ix, iy, iz) pnewimg[ix-1+(iy-1+(iz-1)*ny)*nx] |
#define | in(i, j, k) in[i+(j+(k*ny))*nx] |
#define | in(i, j, k) in[i+(j+(k*ny))*nx] |
#define | QUADPI 3.141592653589793238462643383279502884197 |
#define | DGR_TO_RAD QUADPI/180 |
#define | rdata(i, j, k) rdata[(i-1)+((j-1)+(k-1)*ny)*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)*lsd] |
#define | fout(i, j, k) fout[(i-1) + ((j-1) + (k-1)*nyn)*lsdn] |
#define | fint(jx, jy, jz) fint[jx + (jy + jz*ny)*nox] |
#define | fint(jx, jy, jz) fint[jx + (jy + jz*ny)*nx] |
#define | fout(jx, jy, jz) fout[jx + (jy + jz*ny)*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 4639 of file emdata_sparx.cpp. |
|
Definition at line 4642 of file emdata_sparx.cpp. Referenced by EMAN::EMData::find_3d_threshold(), EMAN::EMData::phase_cog(), and EMAN::Util::TwoDTestFunc(). |
|
Definition at line 4640 of file emdata_sparx.cpp. |
|
Definition at line 4936 of file emdata_sparx.cpp. |
|
Definition at line 4936 of file emdata_sparx.cpp. Referenced by EMAN::Util::CANG(). |
|
Definition at line 5898 of file emdata_sparx.cpp. |
|
Definition at line 5898 of file emdata_sparx.cpp. |
|
Definition at line 5898 of file emdata_sparx.cpp. Referenced by EMAN::EMData::filter_by_image(), EMAN::EMData::Four_ds(), EMAN::EMData::Four_shuf_ds_cen_us(), EMAN::EMData::FourInterpol(), EMAN::EMData::FourTruncate(), and EMAN::EMData::replace_amplitudes(). |
|
Definition at line 5899 of file emdata_sparx.cpp. |
|
Definition at line 5899 of file emdata_sparx.cpp. Referenced by EMAN::EMData::Four_ds(), EMAN::EMData::Four_shuf_ds_cen_us(), EMAN::EMData::FourInterpol(), EMAN::EMData::FourTruncate(), and EMAN::EMData::replace_amplitudes(). |
|
Definition at line 2123 of file emdata_sparx.cpp. |
|
|
Definition at line 965 of file emdata_sparx.cpp. Referenced by EMAN::EMData::average_circ_sub(). |
|
|
Definition at line 4935 of file emdata_sparx.cpp. |
|
Definition at line 4935 of file emdata_sparx.cpp. |
|
Definition at line 4641 of file emdata_sparx.cpp. Referenced by EMAN::EMData::find_3d_threshold(), EMAN::Transform::orthogonalize(), and EMAN::Util::triquad(). |
|
Definition at line 4504 of file emdata_sparx.cpp. |
|
Definition at line 4504 of file emdata_sparx.cpp. |
|
|
Definition at line 4505 of file emdata_sparx.cpp. Referenced by EMAN::SVDAnalyzer::analyze(), Derivatives(), Derivatives_G(), EMAN::EMData::phase_cog(), Steepda(), Steepda_G(), EMAN::Util::svdcmp(), Utilit2(), and Utilit2_G(). |
|
Definition at line 4506 of file emdata_sparx.cpp. Referenced by Derivatives(), Derivatives_G(), EMAN::EMData::phase_cog(), Steepda(), Steepda_G(), Utilit2(), Utilit2_G(), and EMAN::Util::WTF(). |
|
Definition at line 4507 of file emdata_sparx.cpp. Referenced by EMAN::EMData::phase_cog(). |
|
Definition at line 5133 of file emdata_sparx.cpp. References Assert, data, EMAN::EMData::get_data(), EMAN::EMData::get_xsize(), EMAN::EMData::get_ysize(), EMAN::EMData::get_zsize(), nx, and ny. Referenced by EMAN::nn4_ctfReconstructor::finish(), EMAN::nn4Reconstructor::finish(), and EMAN::EMData::norm_pad(). 05134 { 05135 int nx = emdata->get_xsize(); 05136 int ny = emdata->get_ysize(); 05137 int nz = emdata->get_zsize(); 05138 05139 float* data = emdata->get_data(); 05140 if( ny==1 && nz==1 ) 05141 { 05142 // 1d case 05143 float sumf=0.0; 05144 int sumn=0; 05145 for( int i=0; i < npixel; ++i ) 05146 { 05147 sumf += data[i]; 05148 sumf += data[nx-1-i]; 05149 sumn += 2; 05150 } 05151 return sumf/sumn; 05152 } 05153 05154 if( nz==1 ) 05155 { 05156 float sumf=0.0; 05157 int sumn=0; 05158 int id=0; 05159 for( int iy=0; iy < ny; ++iy ) 05160 { 05161 for( int ix=0; ix < nx; ++ix ) 05162 { 05163 if( iy<npixel || iy>ny-1-npixel || ix<npixel || ix>nx-1-npixel ) 05164 { 05165 sumf += data[id]; 05166 sumn += 1; 05167 } 05168 id++; 05169 } 05170 } 05171 05172 Assert( id==nx*ny ); 05173 Assert( sumn == nx*ny - (nx-2*npixel)*(ny-2*npixel) ); 05174 return sumf/sumn; 05175 } 05176 05177 // 3d cases; 05178 05179 float sumf = 0.0; 05180 int sumn = 0; 05181 int id = 0; 05182 for( int iz=0; iz < nz; ++iz) 05183 { 05184 for( int iy=0; iy < ny; ++iy) 05185 { 05186 for( int ix=0; ix < nx; ++ix ) 05187 { 05188 if( iz<npixel||iz>nz-1-npixel||iy<npixel||iy>ny-1-npixel||ix<npixel||ix>nx-1-npixel) 05189 { 05190 sumf += data[id]; 05191 sumn += 1; 05192 } 05193 id++; 05194 } 05195 } 05196 } 05197 05198 05199 Assert( id==nx*ny*nz); 05200 Assert( sumn==nx*ny*nz-(nx-2*npixel)*(ny-2*npixel)*(nz-2*npixel) ); 05201 return sumf/sumn; 05202 }
|
|
Definition at line 452 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_(). 00453 { 00454 float dis2=0.0; 00455 for( int i=0; i < lnlen; ++i) { 00456 float tmp = line_1[i] - line_2[i]; 00457 dis2 += tmp*tmp; 00458 } 00459 //return static_cast<float>(std::sqrt(dis2)); 00460 return dis2; 00461 }
|
|
Definition at line 463 of file emdata_sparx.cpp. References sqrt(). 00464 { 00465 double dis2 = 0.0; 00466 for( int i=0; i < lnlen; ++i ) { 00467 float tmp = line_1[lnlen-1-i] - line_2[i]; 00468 dis2 += tmp*tmp; 00469 } 00470 return static_cast<float>(std::sqrt(dis2)); 00471 }
|
|
Definition at line 3666 of file emdata_sparx.cpp. References EMAN::Pixel::value, EMAN::Pixel::x, EMAN::Pixel::y, and EMAN::Pixel::z.
|
|
Helper function for EMData::fft_shuffle, below.
Definition at line 3226 of file emdata_sparx.cpp. References b. Referenced by EMAN::EMData::fft_shuffle(). 03226 { 03227 memcpy(temp, a, nbytes); 03228 memcpy(a, b, nbytes); 03229 memcpy(b, temp, nbytes); 03230 }
|