| Bsoft 2.0.5 Bernard's software package

Functions | Variables
mg_tomo_resol.cpp File Reference

Functions to assess the resoltion of a tomographic tilt series. More...

`#include "mg_tomo_resol.h"`
`#include "mg_tomo_rec.h"`
`#include "mg_reconstruct.h"`
`#include "rwimg.h"`
`#include "mg_ctf.h"`
`#include "Complex.h"`
`#include "linked_list.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
Bplot * | img_calculate_FRC_curve (vector< Bimage * > parr, double hi_res, double sampling_ratio)
| Calculates the FRC/FSC for a micrograph or particle image in a series. More...
double | plot_calculate_resolution (Bplot *plot, double cutoff)
| Calculates the resolution estimate from a FRC/FSC curve. More...
int | plot_resolution (Bplot *plot, double hi_res, Bstring &psfile, Bstring &title)
| Plots the resolution curve in a plot structure. More...
int | img_pack_2D_into_central_section_old (Bimage *p, Bimage *prec, Bimage *prec2, long ft_size, int zsize, double scale, double hi_res, Matrix3 matr, Matrix3 mat, int inplane)
vector< Bimage * > | mg_tomo_res_reconstruct (Bproject *project, int micrograph_id, double hi_res, double sampling_ratio, double scale, Vector3< long > size, double fast_angle, int action, double wiener)
| Estimating the resolution of one micrograph in an aligned tilt series. More...
Bimage * | mg_tomo_resolution (Bproject *project, int micrograph_id, double hi_res, double sampling_ratio, double scale, Vector3< long > size, double fast_angle, int action, double wiener, double cutoff, Bstring &psfile)
| Estimating the resolution of one micrograph in an aligned tilt series. More...
Bplot * | project_tomo_resolution (Bproject *project, double hi_res, double sampling_ratio, double scale, Vector3< long > size, double fast_angle, int action, double wiener, double cutoff)
| Estimating the resolution of the tomogram from an aligned tilt series. More...
Bplot * | project_tomo_particle_resolution (Bproject *project, double hi_res, double sampling_ratio, double fast_angle, double cutoff)
| Estimates the resolution for each particle image in each micrograph. More...
long | img_pack_2D_into_central_section (Bimage *p, Bimage *prec, Bimage *prec2, long ft_size, double scale, double hi_res, Matrix3 matr, Matrix3 mat, int inplane)
| Packs a 2D Fourier transform into a 3D reciprocal space volume. More...
Bplot * | plot_tilt_resolution (Bproject *project)
| Plots the estimated resolution against the tilt angle. More...

## Variables
int | verbose

## Detailed Description

Functions to assess the resoltion of a tomographic tilt series.

Author
  Bernard Heymann

Date
  Created: 20031205
  Modified: 20190221

Definition in file mg_tomo_resol.cpp.

## Function Documentation

## ◆ img_calculate_FRC_curve()

Bplot * img_calculate_FRC_curve | ( | vector< Bimage * > | parr,
|  | double | hi_res,
|  | double | sampling_ratio
| ) |  |

Calculates the FRC/FSC for a micrograph or particle image in a series.

Parameters

  parr | image array with 2D Fourier transform, 3D central section, 3D LOO central section
  hi_res | high resolution limit.
  sampling_ratio | ratio for averaging window.

Returns
  Bplot* plot structure with FRC/FSC curve.

Definition at line 879 of file mg_tomo_resol.cpp.

## ◆ img_pack_2D_into_central_section()

long img_pack_2D_into_central_section | ( | Bimage * | p,
|  | Bimage * | prec,
|  | Bimage * | prec2,
|  | long | ft_size,
|  | double | scale,
|  | double | hi_res,
|  | Matrix3 | matr,
|  | Matrix3 | mat,
|  | int | inplane
| ) |  |

Packs a 2D Fourier transform into a 3D reciprocal space volume.

Parameters

  *p | 2D Fourier transform.
  *prec | 3D central section.
  *prec2 | 3D central section with in-plane micrograph omitted.
  ft_size | Fourier transform size.
  scale | reconstruction scale.
  hi_res | high resolution limit.
  matr | in plane or reference matrix.
  mat | matrix of image being packed.
  inplane | flag to indicate an in plane image.

Returns
  long number voxels packed.

      The rotation matrix is used to determine the plane in reciprocal space
      to which the 2D transform data is added. The map is assumed to be cubic
      and the 2D transform square. The orientation parameters must be written
      into the image structure. The real space 2D image must be supplied.
      This is then padded to more than twice its original size, fourier
      transformed, and packed into the 3D reciprocal space block.

Definition at line 689 of file mg_tomo_resol.cpp.

## ◆ img_pack_2D_into_central_section_old()

int img_pack_2D_into_central_section_old | ( | Bimage * | p,
|  | Bimage * | prec,
|  | Bimage * | prec2,
|  | long | ft_size,
|  | int | zsize,
|  | double | scale,
|  | double | hi_res,
|  | Matrix3 | matr,
|  | Matrix3 | mat,
|  | int | inplane
| ) |  |

Definition at line 776 of file mg_tomo_resol.cpp.

## ◆ mg_tomo_res_reconstruct()

vector<Bimage*> mg_tomo_res_reconstruct | ( | Bproject * | project,
|  | int | micrograph_id,
|  | double | hi_res,
|  | double | sampling_ratio,
|  | double | scale,
|  | Vector3< long > | size,
|  | double | fast_angle,
|  | int | action,
|  | double | wiener
| ) |  |

Estimating the resolution of one micrograph in an aligned tilt series.

Parameters

  *project | image processing parameter structure.
  micrograph_id | micrograph number to use for resolution test.
  hi_res | high resolution limit.
  sampling_ratio | ratio for averaging window.
  scale | reconstruction scale.
  size | reconstruction size.
  fast_angle | angle to select micrographs for reconstruction.
  action | flag to apply CTF to projections.
  wiener | Wiener factor.

Returns
  vector<Bimage*> array of three images, length of zero on error.

      The orientation parameters, view vector, angle of rotation and origin,
      must all be set. Each image is padded to at least two times its size
      and its Fourier transform packed into 3D reciprocal space.
      The figure-of-merit calculated for each reciprocal space voxel is:
                 sum(w*re)^2 + sum(w*im)^2
          FOM = ---------------------------
                sum(w)*sum(w*(re^2 + im^2))
      where
          re  real part
          im  imaginary part
          w   weight (inverse distance of image pixel to closest grid point)
      For voxels with only one data pixel contributing to it, FOM(0).
      An image is used in the reconstruction if its selection flag has been set.
      If the selection number is less than zero, all particles with selection flags
      greater than zero are used. If the selection number is zero or above, all
      particles with the selection flag set to the same number are used.
      Three images are returned: micrograph, full reconstruction, leave-one-out reconstruction.

Definition at line 62 of file mg_tomo_resol.cpp.

## ◆ mg_tomo_resolution()

Bimage* mg_tomo_resolution | ( | Bproject * | project,
|  | int | micrograph_id,
|  | double | hi_res,
|  | double | sampling_ratio,
|  | double | scale,
|  | Vector3< long > | size,
|  | double | fast_angle,
|  | int | action,
|  | double | wiener,
|  | double | cutoff,
|  | Bstring & | psfile
| ) |  |

Estimating the resolution of one micrograph in an aligned tilt series.

Parameters

  *project | image processing parameter structure.
  micrograph_id | micrograph number to use for resolution test.
  hi_res | high resolution limit.
  sampling_ratio | ratio for averaging window.
  scale | reconstruction scale.
  size | reconstruction size.
  fast_angle | angle to select micrographs for reconstruction.
  action | flag to apply CTF to projections.
  wiener | Wiener factor.
  cutoff | FRC cutoff.
  &psfile | postscript output file name.

Returns
  Bimage* micrograph reconstruction, NULL on error.

      The orientation parameters, view vector, angle of rotation and origin,
      must all be set. Each image is padded to at least two times its size
      and its Fourier transform packed into 3D reciprocal space.
      The figure-of-merit calculated for each reciprocal space voxel is:
                 sum(w*re)^2 + sum(w*im)^2
          FOM = ---------------------------
                sum(w)*sum(w*(re^2 + im^2))
      where
          re  real part
          im  imaginary part
          w   weight (inverse distance of image pixel to closest grid point)
      For voxels with only one data pixel contributing to it, FOM(0).
      An image is used in the reconstruction if its selection flag has been set.
      If the selection number is less than zero, all particles with selection flags
      greater than zero are used. If the selection number is zero or above, all
      particles with the selection flag set to the same number are used.

Definition at line 266 of file mg_tomo_resol.cpp.

## ◆ plot_calculate_resolution()

double plot_calculate_resolution | ( | Bplot * | plot,
|  | double | cutoff
| ) |  |

Calculates the resolution estimate from a FRC/FSC curve.

Parameters

  *plot | plot structure.
  cutoff | FRC/FSC cutoff to use.

Returns
  double estimated resolution.

Definition at line 1027 of file mg_tomo_resol.cpp.

## ◆ plot_resolution()

int plot_resolution | ( | Bplot * | plot,
|  | double | hi_res,
|  | Bstring & | psfile,
|  | Bstring & | title
| ) |  |

Plots the resolution curve in a plot structure.

Parameters

  *plot | plot structure.
  hi_res | high resolution limit.
  &psfile | postscript output file name.
  &title | plot title.

Returns
  int 0.

Definition at line 1058 of file mg_tomo_resol.cpp.

## ◆ plot_tilt_resolution()

Bplot* plot_tilt_resolution | ( | Bproject * | project | ) |

Plots the estimated resolution against the tilt angle.

Parameters

  *project | project structure.

Returns
  *plot new plot.

      The resolution estimates must be encoded in the micrograph FOM's.

Definition at line 1089 of file mg_tomo_resol.cpp.

## ◆ project_tomo_particle_resolution()

Bplot* project_tomo_particle_resolution | ( | Bproject * | project,
|  | double | hi_res,
|  | double | sampling_ratio,
|  | double | fast_angle,
|  | double | cutoff
| ) |  |

Estimates the resolution for each particle image in each micrograph.

Parameters

  *project | micrograph project.
  hi_res | high resolution limit for resolution estimation.
  sampling_ratio | ratio for averaging window.
  fast_angle | angle to select micrographs for reconstruction.
  cutoff | FRC cutoff to use.

Returns
  Bplot* plot with average particle resolutions.

      Requires the particles to be defined in all micrographs.
      The NLOO algorithm is used for each particle.

Definition at line 408 of file mg_tomo_resol.cpp.

## ◆ project_tomo_resolution()

Bplot* project_tomo_resolution | ( | Bproject * | project,
|  | double | hi_res,
|  | double | sampling_ratio,
|  | double | scale,
|  | Vector3< long > | size,
|  | double | fast_angle,
|  | int | action,
|  | double | wiener,
|  | double | cutoff
| ) |  |

Estimating the resolution of the tomogram from an aligned tilt series.

Parameters

  *project | image processing parameter structure.
  hi_res | high resolution limit.
  sampling_ratio | ratio for averaging window.
  scale | reconstruction scale.
  size | reconstruction size.
  fast_angle | angle to select micrographs for reconstruction.
  action | flag to apply CTF to projections.
  wiener | Wiener factor.
  cutoff | FRC cutoff.

Returns
  Bimage* micrograph reconstruction, NULL on error.

      The orientation parameters, view vector, angle of rotation and origin,
      must all be set. Each image is padded to at least two times its size
      and its Fourier transform packed into 3D reciprocal space.
      The figure-of-merit calculated for each reciprocal space voxel is:
                 sum(w*re)^2 + sum(w*im)^2
          FOM = ---------------------------
                sum(w)*sum(w*(re^2 + im^2))
      where
          re  real part
          im  imaginary part
          w   weight (inverse distance of image pixel to closest grid point)
      For voxels with only one data pixel contributing to it, FOM(0).
      An image is used in the reconstruction if its selection flag has been set.
      If the selection number is less than zero, all particles with selection flags
      greater than zero are used. If the selection number is zero or above, all
      particles with the selection flag set to the same number are used.

Definition at line 335 of file mg_tomo_resol.cpp.

## Variable Documentation

## ◆ verbose

int verbose