Xmipp
v3.23.11-Nereus
|
#include <sampling.h>
Classes | |
struct | Vertex |
Public Types | |
typedef std::vector< Vertex > | Vect_angles |
Public Member Functions | |
Sampling () | |
bool | operator== (const Sampling &op) const |
void | computeSamplingPoints (bool only_half_sphere=true, double max_tilt=180, double min_tilt=0) |
void | fillEdge (const Matrix1D< double > &starting_point, const Matrix1D< double > &ending_point, std::vector< Matrix1D< double > > &edge_vector, bool FLAG_END) |
void | fillDistance (const Matrix1D< double > &starting_point, const Matrix1D< double > &ending_point, std::vector< Matrix1D< double > > &edge_vector, int number, bool only_half_spheree, double min_z=-10., double max_z=+10.) |
void | fillLRRepository (void) |
void | setSampling (double sampling) |
void | setNoise (double deviation, int my_seed=-1) |
void | setNeighborhoodRadius (double neighborhood) |
void | removeRedundantPoints (const int symmetry, int sym_order) |
void | removeRedundantPointsExhaustive (const int symmetry, int sym_order, bool only_half_sphere, double max_ang) |
int | sortFunc (const Matrix1D< double > &a, const Matrix1D< double > &b) |
void | createSymFile (const FileName &simFp, int symmetry, int sym_order) |
void | createAsymUnitFile (const FileName &docfilename) |
void | computeNeighbors (bool only_winner=false) |
void | saveSamplingFile (const FileName &fn_base, bool write_vectors=true, bool write_sampling_sphere=false) |
void | readSamplingFile (const FileName &infilename, bool read_vectors=true, bool read_sampling_sphere=false) |
void | removePointsFarAwayFromExperimentalData () |
void | findClosestSamplingPoint (const MetaData &DFi, const FileName &output_file_root) |
void | findClosestSamplingPoint (const FileName &FnexperimentalImages, const FileName &output_file_root) |
void | findClosestExperimentalPoint () |
void | fillExpDataProjectionDirectionByLR (const MetaData &DFi) |
void | fillExpDataProjectionDirectionByLR (const FileName &FnexperimentalImages) |
Routines with sampling the direction Sphere A triangular grid based on an icosahedron was first introduced in a meteorological model by Sadourny et al. (1968) and Williamson (1969). The approach outlined here, especially the code implementation, is based on the work of Baumgardner (1995). http://www.wmo.int/pages/prog/www/DPS/Icosah.pdf
Definition at line 46 of file sampling.h.
typedef std::vector<Vertex> Sampling::Vect_angles |
Typename to contain a list of vertices
Definition at line 58 of file sampling.h.
Sampling::Sampling | ( | ) |
Default constructor. sampling in degrees
Definition at line 32 of file sampling.cpp.
void Sampling::computeNeighbors | ( | bool | only_winner = false | ) |
for each point i in the asymmetric sampling unit cell compute the neighbors inside the asymmetric unit cell, save not only the neighbors but the angle psi
Definition at line 1715 of file sampling.cpp.
void Sampling::computeSamplingPoints | ( | bool | only_half_sphere = true , |
double | max_tilt = 180 , |
||
double | min_tilt = 0 |
||
) |
Compute edge sampling points if you are looking only for directtions set only_half_sphere = true
vector to decimate the triangles
vector to decimate the triangles
Definition at line 155 of file sampling.cpp.
void Sampling::createAsymUnitFile | ( | const FileName & | docfilename | ) |
save asymmetric unit sampling in a doc file
Definition at line 1440 of file sampling.cpp.
void Sampling::createSymFile | ( | const FileName & | simFp, |
int | symmetry, | ||
int | sym_order | ||
) |
create symmetry file from introduced symmetry see SymList class
Definition at line 1319 of file sampling.cpp.
void Sampling::fillDistance | ( | const Matrix1D< double > & | starting_point, |
const Matrix1D< double > & | ending_point, | ||
std::vector< Matrix1D< double > > & | edge_vector, | ||
int | number, | ||
bool | only_half_spheree, | ||
double | min_z = -10. , |
||
double | max_z = +10. |
||
) |
fill distance
Definition at line 631 of file sampling.cpp.
void Sampling::fillEdge | ( | const Matrix1D< double > & | starting_point, |
const Matrix1D< double > & | ending_point, | ||
std::vector< Matrix1D< double > > & | edge_vector, | ||
bool | FLAG_END | ||
) |
void Sampling::fillExpDataProjectionDirectionByLR | ( | const MetaData & | DFi | ) |
Precalculate exp_data by symmetry matrices (speeds up calculations)
Definition at line 2256 of file sampling.cpp.
void Sampling::fillExpDataProjectionDirectionByLR | ( | const FileName & | FnexperimentalImages | ) |
Precalculate exp_data by symmetry matrices (speeds up calculations)
Definition at line 2247 of file sampling.cpp.
void Sampling::fillLRRepository | ( | void | ) |
fill R and L Repository (vector with symmetry matrices)
Definition at line 2216 of file sampling.cpp.
void Sampling::findClosestExperimentalPoint | ( | ) |
for each sampling point find the experimental images closer to that point than to any other
Definition at line 2100 of file sampling.cpp.
Find the closest sampling point for a docfile of experimental projections
Definition at line 1991 of file sampling.cpp.
void Sampling::findClosestSamplingPoint | ( | const FileName & | FnexperimentalImages, |
const FileName & | output_file_root | ||
) |
Find the closest sampling point for a docfile of experimental projections
Definition at line 1982 of file sampling.cpp.
bool Sampling::operator== | ( | const Sampling & | op | ) | const |
'is equal to' (equality).
Definition at line 107 of file sampling.cpp.
void Sampling::readSamplingFile | ( | const FileName & | infilename, |
bool | read_vectors = true , |
||
bool | read_sampling_sphere = false |
||
) |
Read neighbors i
This is the object ID in the metadata, usually starts at 1
This is the index of the object, starts at 0
Definition at line 1592 of file sampling.cpp.
void Sampling::removePointsFarAwayFromExperimentalData | ( | ) |
remove all those points that are further away from experimental data than neighborhood_radius_rad
Definition at line 1928 of file sampling.cpp.
void Sampling::removeRedundantPoints | ( | const int | symmetry, |
int | sym_order | ||
) |
Definition at line 691 of file sampling.cpp.
void Sampling::removeRedundantPointsExhaustive | ( | const int | symmetry, |
int | sym_order, | ||
bool | only_half_sphere, | ||
double | max_ang | ||
) |
Definition at line 1253 of file sampling.cpp.
void Sampling::saveSamplingFile | ( | const FileName & | fn_base, |
bool | write_vectors = true , |
||
bool | write_sampling_sphere = false |
||
) |
Save neighbors as three metadtada blocks 1) header with sampling rate and angular distance 2) one row for ach experimentald data with neighbours 3) sampling points
Definition at line 1495 of file sampling.cpp.
void Sampling::setNeighborhoodRadius | ( | double | neighborhood | ) |
void Sampling::setNoise | ( | double | deviation, |
int | my_seed = -1 |
||
) |
set sampling noise for projection vectors create in the unit sphere
Definition at line 134 of file sampling.cpp.
void Sampling::setSampling | ( | double | sampling | ) |
Definition at line 586 of file sampling.cpp.
double Sampling::cos_neighborhood_radius |
cosine of neighborhood s
Definition at line 84 of file sampling.h.
std::vector<FileName > Sampling::exp_data_fileNames |
vector with product of experimental images and L and R
Definition at line 110 of file sampling.h.
std::vector<Matrix1D<double> > Sampling::exp_data_projection_direction_by_L_R |
vector with product of experimental images and L and R
Definition at line 108 of file sampling.h.
std::vector<Matrix2D<double> > Sampling::L_repository |
Definition at line 106 of file sampling.h.
std::vector<std::vector<double> > Sampling::my_cross_correlation |
vector with angular distance between points (dot_product)
Definition at line 98 of file sampling.h.
std::vector<std::vector<size_t> > Sampling::my_exp_img_per_sampling_point |
vector with experimental images per sampling point
Definition at line 90 of file sampling.h.
std::vector<std::vector<size_t> > Sampling::my_neighbors |
vector with neighbors
Definition at line 87 of file sampling.h.
double Sampling::neighborhood_radius_rad |
neighborhood in radians
Definition at line 81 of file sampling.h.
std::vector<Matrix1D<double> > Sampling::no_redundant_sampling_points_angles |
vector with sampling points described by angles, only store the non redundant part
Definition at line 121 of file sampling.h.
std::vector<size_t> Sampling::no_redundant_sampling_points_index |
vector with the indexes of each sampling point
Definition at line 123 of file sampling.h.
std::vector<Matrix1D<double> > Sampling::no_redundant_sampling_points_vector |
vector with sampling points described by vectors, only store the non redundant part
Definition at line 118 of file sampling.h.
size_t Sampling::number_of_samples |
number of samples
Definition at line 75 of file sampling.h.
size_t Sampling::numberSamplesAsymmetricUnit |
number of samples in the asymmetric unit
Definition at line 78 of file sampling.h.
std::vector<Matrix2D<double> > Sampling::R_repository |
vector with symmetry matrices
Definition at line 105 of file sampling.h.
double Sampling::sampling_noise |
sampling rate for the unit vectors
Definition at line 72 of file sampling.h.
std::vector<Matrix1D<double> > Sampling::sampling_points_angles |
vector with sampling points described by angles
Definition at line 103 of file sampling.h.
std::vector<Matrix1D<double> > Sampling::sampling_points_vector |
vector with sampling points described by vectors
Definition at line 101 of file sampling.h.
double Sampling::sampling_rate_rad |
sampling rate in radians
Definition at line 69 of file sampling.h.
SymList Sampling::SL |
symmetry information
Definition at line 138 of file sampling.h.
FileName Sampling::symmetry_file |
symmetry file
Definition at line 135 of file sampling.h.
int Sampling::verbose |
Verbose
Definition at line 126 of file sampling.h.
Vect_angles Sampling::vertices_angles |
Geographical co-ordinates of the home Vertex of the 10 diamonds as angles
Definition at line 62 of file sampling.h.
std::vector<Matrix1D<double> > Sampling::vertices_vectors |
Geographical co-ordinates of the home Vertex of the 10 diamonds as vectors
Definition at line 66 of file sampling.h.