| Bsoft 2.0.5 Bernard's software package

Functions | Variables
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"`

Go to the source code of this file.

## 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

Definition in file mg_random.cpp.

## Function Documentation

## ◆ particle_random_view()

double particle_random_view | ( | Bparticle * | part,
|  | double | std
| ) |  |

Definition at line 227 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.
  std | standard deviation of random error (angstroms).

Returns
  int 0.

Definition at line 28 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.

Returns
  int 0.

Definition at line 179 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.
  std | standard deviation of random error (fraction).

Returns
  int 0.

Definition at line 313 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.
  std | standard deviation of random error (pixels).

Returns
  int 0.

Definition at line 73 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.
  *sym | symmetry structure.

Returns
  int 0.

Definition at line 362 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.

Returns
  int 0.

Definition at line 130 of file mg_random.cpp.

## ◆ 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

  *project | project parameter structure.
  std | standard deviation of random error (radians).

Returns
  int 0.

Definition at line 255 of file mg_random.cpp.

## Variable Documentation

## ◆ verbose

int verbose