/Users/bernard/b20/bsoft/src/mg/mg_refine.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/mg/mg_refine.cpp - Reciprocal space refinement of orientation parameters of particle images.

SYNOPSIS

#include 'mg_processing.h'
#include 'mg_refine.h'
#include 'rwmg.h'
#include 'mg_ctf.h'
#include 'rwimg.h'
#include 'Complex.h'
#include 'Matrix3.h'
#include 'linked_list.h'
#include 'random_numbers.h'
#include 'utilities.h'
#include <sys/stat.h>
#include <fcntl.h>

  Functions
long part_refine_orientation (Bparticle *part, Bstring &partfile, double pixel_size, Bimage *pref, Bimage *pmask, Bsymmetry *sym, int max_iter, double alpha_step, double accuracy, double shift_step, double shift_accuracy, double hi_res, double lo_res, int fom_type, vector< double > weight, double edge_radius, CTFparam *em_ctf, double def_std, double shift_std, double view_std, double max_angle, double max_mag, int flags, FSI_Kernel *kernel, fft_plan planf)
Refine the orientation and origin of one particle with respect to a reference map.
double img_refine_monte (Bimage *p, Bimage *pref, double hi_res, double lo_res, int max_iter, int fom_type, vector< double > &weight, CTFparam *em_ctf, double def_std, double shift_std, double view_std, double max_angle, double max_mag, FSI_Kernel *kernel, long &number)
Refine the orientation and origin of one particle with respect to a reference map.
double img_refine_grid (Bimage *p, Bimage *pref, double hi_res, double lo_res, double alpha_step, double accuracy, double shift_step, double shift_accuracy, double max_mag, int fom_type, vector< double > &weight, CTFparam *em_ctf, double def_std, FSI_Kernel *kernel, long &number)
Refine the orientation and origin of one particle with respect to a reference map.
long mg_refine_orientations (Bproject *project, Bstring &reffile, Bstring &maskfile, Bstring &sym_string, int part_select, int max_iter, double alpha_step, double accuracy, double shift_step, double shift_accuracy, int fom_type, vector< double > weight, double hi_res, double lo_res, int kernel_width, int kernel_power, double edge_radius, double def_std, double shift_std, double view_std, double max_angle, double max_mag, int flags)
Refine the orientation and origin with respect to a reference map.
long project_refine_orientations (Bproject *project, Bstring &reffile, Bstring &maskfile, Bstring &sym_string, int part_select, int max_iter, double alpha_step, double accuracy, double shift_step, double shift_accuracy, int fom_type, vector< double > weight, double hi_res, double lo_res, int kernel_width, int kernel_power, double edge_radius, double def_std, double shift_std, double view_std, double max_angle, double max_mag, int flags)
double img_recip_space_fom (Bimage *p, Bimage *pref, double hi_res, double lo_res, int fom_type, vector< double > &weight, int apply_ctf, CTFparam *em_ctf)
double img_fit_in_recip_space_monte (Bimage *p, Bimage *pref, double hi_res, double lo_res, int max_iter, int fom_type, vector< double > &weight, CTFparam *em_ctf, double def_std, double shift_std, FSI_Kernel *kernel, long &number)
double img_fit_in_recip_space_grid (Bimage *p, Bimage *pref, double hi_res, double lo_res, double step, double accuracy, int fom_type, vector< double > &weight, CTFparam *em_ctf, double def_std, FSI_Kernel *kernel, long &number)

  Variables
int verbose

Detailed Description

Reciprocal space refinement of orientation parameters of particle images.

Author:
    Bernard Heymann

Date:
    Created: 20070115

    Modified: 20190207

Definition in file mg_refine.cpp.

Function Documentation

  double img_fit_in_recip_space_grid (Bimage * p, Bimage * pref, double hi_res, double lo_res, double step, double accuracy, int fom_type, vector< double > & weight, CTFparam * em_ctf, double def_std, FSI_Kernel * kernel, long & number)

Definition at line 849 of file mg_refine.cpp.

  double img_fit_in_recip_space_monte (Bimage * p, Bimage * pref, double hi_res, double lo_res, int max_iter, int fom_type, vector< double > & weight, CTFparam * em_ctf, double def_std, double shift_std, FSI_Kernel * kernel, long & number)

Definition at line 769 of file mg_refine.cpp.

  double img_recip_space_fom (Bimage * p, Bimage * pref, double hi_res, double lo_res, int fom_type, vector< double > & weight, int apply_ctf, CTFparam * em_ctf)

Definition at line 654 of file mg_refine.cpp.

  double img_refine_grid (Bimage * p, Bimage * pref, double hi_res, double lo_res, double alpha_step, double accuracy, double shift_step, double shift_accuracy, double max_mag, int fom_type, vector< double > & weight, CTFparam * em_ctf, double def_std, FSI_Kernel * kernel, long & number)

Refine the orientation and origin of one particle with respect to a reference map.

Parameters:
    *p particle image.
    *pref reference map.
    hi_res high resolution limit (angstrom).
    lo_res low resolution limit (angstrom).
    alpha_step grid search angular step size.
    accuracy grid search accuracy.
    shift_step grid shift size.
    shift_accuracy grid shift accuracy.
    max_mag maximum magnification adjustment.
    fom_type type of resolution measure: 0=FRC, 1=DPR
    weight 1D reciprocal space weight curve.
    *em_ctf CTF parameters (if NULL, not used).
    def_std defocus step size.
    *kernel interpolation kernel.
    &number number of comparisons.

Returns:
    double best figure-of-merit.

    The orientation and origin are refined using a grid search
    with selection based on the FSC or DPR.
    The best result is returned in the orientation parameters of the image structure.
    The FOM in the image structure is the first FOM determined, while the best
    FOM is returned.

Definition at line 1060 of file mg_refine.cpp.

  double img_refine_monte (Bimage * p, Bimage * pref, double hi_res, double lo_res, int max_iter, int fom_type, vector< double > & weight, CTFparam * em_ctf, double def_std, double shift_std, double view_std, double max_angle, double max_mag, FSI_Kernel * kernel, long & number)

Refine the orientation and origin of one particle with respect to a reference map.

Parameters:
    *p particle image.
    *pref reference map.
    hi_res high resolution limit (angstrom).
    lo_res low resolution limit (angstrom).
    max_iter maximum number of refining iterations.
    fom_type type of resolution measure: 0=FRC, 1=DPR
    weight 1D reciprocal space weight curve.
    *em_ctf CTF parameters (if NULL, not used).
    def_std random defocus standard deviation
    shift_std random origin shift standard deviation.
    view_std random view shift standard deviation.
    max_angle maximum random rotation angle adjustment.
    max_mag maximum magnification adjustment.
    *kernel interpolation kernel.
    &number number of comparisons.

Returns:
    double best figure-of-merit.

    The orientation and origin are iteratively modified in small random steps,
    with selection based on the Fourier shell correlation.
    The best result is returned in the orientation parameters of the image structure.
    The FOM in the image structure is the first FOM determined, while the best
    FOM is returned.

Definition at line 963 of file mg_refine.cpp.

  long mg_refine_orientations (Bproject * project, Bstring & reffile, Bstring & maskfile, Bstring & sym_string, int part_select, int max_iter, double alpha_step, double accuracy, double shift_step, double shift_accuracy, int fom_type, vector< double > weight, double hi_res, double lo_res, int kernel_width, int kernel_power, double edge_radius, double def_std, double shift_std, double view_std, double max_angle, double max_mag, int flags)

Refine the orientation and origin with respect to a reference map.

Parameters:
    *project image processing parameter structure.
    &reffile file containing reference map.
    &maskfile file containing a real space mask (can be empty).
    &sym_string point group symmetry designator.
    part_select particle selection for processing.
    max_iter Monte Carlo maximum number of refining iterations.
    alpha_step grid search angular step size.
    accuracy grid search accuracy.
    shift_step grid shift size.
    shift_accuracy grid shift accuracy.
    fom_type type of resolution measure: 0=FRC, 1=DPR
    weight 1D reciprocal space weight curve.
    hi_res high resolution limit (angstrom).
    lo_res low resolution limit (angstrom).
    kernel_width interpolation kernel width.
    kernel_power interpolation kernel power.
    edge_radius edge radius to mask background using previous origin.
    def_std random defocus standard deviation
    shift_std random origin shift standard deviation.
    view_std random view shift standard deviation.
    max_angle maximum random rotation angle adjustment.
    max_mag maximum magnification adjustment.
    flags option flags.

Returns:
    long number of comparisons, <0 on error.

    The orientation, origin, magnitude and defocus are refined for each particle.
    The default method uses a grid search around the existing view and origin.
    Specifying the maximum number of iterations switches the algorithm to a
    Monte Carlo search for the best parameters.
    The FOM is either based on the FSC or the DPR.

Definition at line 77 of file mg_refine.cpp.

  long part_refine_orientation (Bparticle * part, Bstring & partfile, double pixel_size, Bimage * pref, Bimage * pmask, Bsymmetry * sym, int max_iter, double alpha_step, double accuracy, double shift_step, double shift_accuracy, double hi_res, double lo_res, int fom_type, vector< double > weight, double edge_radius, CTFparam * em_ctf, double def_std, double shift_std, double view_std, double max_angle, double max_mag, int flags, FSI_Kernel * kernel, fft_plan planf)

Refine the orientation and origin of one particle with respect to a reference map.

Parameters:
    *part particle.
    &partfile particle filename.
    pixel_size pixel size.
    *pref reference map.
    *pmask mask.
    *sym symmetry structure.
    max_iter maximum number of refining iterations.
    alpha_step grid search angular step size.
    accuracy grid search accuracy.
    shift_step grid shift size.
    shift_accuracy grid shift accuracy.
    hi_res high resolution limit (angstrom).
    lo_res low resolution limit (angstrom).
    fom_type type of resolution measure: 0=FRC, 1=DPR
    weight 1D reciprocal space weight curve.
    edge_radius edge radius to mask background using previous origin.
    *em_ctf CTF parameters (if NULL, not used).
    def_std random defocus standard deviation
    shift_std random origin shift standard deviation.
    view_std random view shift standard deviation.
    max_angle maximum random rotation angle adjustment.
    max_mag maximum magnification adjustment.
    flags option flags.
    *kernel interpolation kernel.
    planf FFT forward plan for 2D images.

Returns:
    long number of comparisons.

    The orientation and origin are iteratively modified in small random steps,
    with selection based on the Fourier shell correlation.

Definition at line 492 of file mg_refine.cpp.

  long project_refine_orientations (Bproject * project, Bstring & reffile, Bstring & maskfile, Bstring & sym_string, int part_select, int max_iter, double alpha_step, double accuracy, double shift_step, double shift_accuracy, int fom_type, vector< double > weight, double hi_res, double lo_res, int kernel_width, int kernel_power, double edge_radius, double def_std, double shift_std, double view_std, double max_angle, double max_mag, int flags)

Definition at line 251 of file mg_refine.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.