Bsoft 2.1.4
Bernard's software package
mg_random.cpp File Reference

Functions for applying some randomization to parameters. More...

#include "mg_random.h"
#include "linked_list.h"
#include "random_numbers.h"
#include "utilities.h"

Functions

int project_random_defocus (Bproject *project, double std)
 Introduces random errors into micrograph defocus averages. More...
 
int project_random_origins (Bproject *project, double std)
 Introduces random errors into particle origins. More...
 
int project_random_views (Bproject *project)
 Replace the original particle orientations by random views. More...
 
int project_random_helical_views (Bproject *project)
 Replace the original particle orientations by random side views for a helix. More...
 
double particle_random_view (Bparticle *part, double std)
 
int project_random_views (Bproject *project, double std)
 Introduces random errors into particle views. More...
 
int project_random_magnification (Bproject *project, double std)
 Introduces random errors into particle magnifications. More...
 
int project_random_symmetry_related_views (Bproject *project, Bsymmetry &sym)
 Replaces the original orientations by symmetry-related views. More...
 

Variables

int verbose
 

Detailed Description

Functions for applying some randomization to parameters.

Author
Bernard Heymann
Date
Created: 20010206
Modified: 20140225

Function Documentation

◆ particle_random_view()

double particle_random_view ( Bparticle part,
double  std 
)

◆ project_random_defocus()

int project_random_defocus ( Bproject project,
double  std 
)

Introduces random errors into micrograph defocus averages.

The random deviations are obtained from a Gaussian distribution
generator.
Parameters
*projectproject parameter structure.
stdstandard deviation of random error (angstroms).
Returns
int 0.

◆ project_random_helical_views()

int project_random_helical_views ( Bproject project)

Replace the original particle orientations by random side views for a helix.

The random views are generated in the ranges {[0,1], [0,1], [0,1], [-PI,PI]}.
Parameters
*projectproject parameter structure.
Returns
int 0.

◆ project_random_magnification()

int project_random_magnification ( Bproject project,
double  std 
)

Introduces random errors into particle magnifications.

The random deviations are obtained from a Gaussian distribution
generator.
Parameters
*projectproject parameter structure.
stdstandard deviation of random error (fraction).
Returns
int 0.

◆ project_random_origins()

int project_random_origins ( Bproject project,
double  std 
)

Introduces random errors into particle origins.

The random deviations are obtained from a Gaussian distribution
generator.
Parameters
*projectproject parameter structure.
stdstandard deviation of random error (pixels).
Returns
int 0.

◆ project_random_symmetry_related_views()

int project_random_symmetry_related_views ( Bproject project,
Bsymmetry sym 
)

Replaces the original orientations by symmetry-related views.

Author
Eduardo Sanz-Garcia and David Belnap
For each particle all the symmetry-related views are generated and
one randomly selected.
Parameters
*projectproject parameter structure.
*symsymmetry structure.
Returns
int 0.

◆ project_random_views() [1/2]

int project_random_views ( Bproject project)

Replace the original particle orientations by random views.

The random views are generated in the ranges {[0,1], [0,1], [0,1], [-PI,PI]}.
Parameters
*projectproject parameter structure.
Returns
int 0.

◆ project_random_views() [2/2]

int project_random_views ( Bproject project,
double  std 
)

Introduces random errors into particle views.

The random deviations are obtained from a Gaussian distribution
generator.
Parameters
*projectproject parameter structure.
stdstandard deviation of random error (radians).
Returns
int 0.

Variable Documentation

◆ verbose

int verbose
extern