![]() |
Bsoft 2.1.4
Bernard's software package
|
Library routines for single particle analysis. More...
Macros | |
#define | TEMP_PROJ_FILE "temp_proj.spi" |
Functions | |
Bimage * | project_prepare_2D_references (Bproject *project, long first, long number, int bin=1, int ctf_action=0, double wiener=0.2) |
Prepare reference images from particles. More... | |
Bimage * | img_prepare_projections (Bstring &filename, Bstring &mask_file, int bin, Bsymmetry &sym, double theta_step, double phi_step, double side_ang) |
Generate projections if a 3D file, otherwise clean projections. More... | |
int | project_determine_orientations (Bproject *project, Bimage *proj, Bstring &mask_file, int bin, Bsymmetry &sym, int part_select, vector< double > &band, double res_lo, double res_hi, double res_polar, int ann_min, int ann_max, double shift_limit, double angle_limit, double edge_radius, int flags) |
Find the orientation and origin of every image in a project. More... | |
int | project_determine_orientations2 (Bproject *project, Bimage *proj, Bstring &mask_file, int bin, Bsymmetry &sym, int part_select, vector< double > &band, double res_lo, double res_hi, double res_polar, int ann_min, int ann_max, double shift_limit, double angle_limit, double edge_radius, int flags) |
Find the orientation and origin of every image in a project. More... | |
int | project_determine_origins (Bproject *project, Bimage *proj, int bin, Bsymmetry &sym, int part_select, double res_lo, double res_hi, double shift_limit, int flags) |
Find the origin of every image in a project. More... | |
double | img_cross_validate (Bimage *p, Bimage *pref, Bimage *pmask, fft_plan planf) |
Rotates and shifts a reference image and calculates a cross-validation coefficient. More... | |
Library routines for single particle analysis.
#define TEMP_PROJ_FILE "temp_proj.spi" |
Rotates and shifts a reference image and calculates a cross-validation coefficient.
*p | 2D image. |
*pref | reference 2D image. |
*prs_mask | dual mask. |
planf | FFT forward plan. |
The reference image is first rotated by the difference in the angles between the image and the reference, then shifted to the same origin as the image. Both are then Fourier transformed, the negative values in the mask used to select reciprocal space areas, and the complex product calculated. The sum of the zeroeth pixel then gives the cross-validation coefficient. The input images must be equal-sized square 2D images.
Bimage * img_prepare_projections | ( | Bstring & | filename, |
Bstring & | mask_file, | ||
int | bin, | ||
Bsymmetry & | sym, | ||
double | theta_step, | ||
double | phi_step, | ||
double | side_ang | ||
) |
Generate projections if a 3D file, otherwise clean projections.
&filename | file containing reference map or projections. |
&mask_file | mask to apply to projections. |
bin | data compression by binning. |
*sym | point group symmetry structure. |
theta_step | angular step size from primary symmetry axis (radians). |
phi_step | angular step size around primary symmetry axis (radians). |
side_ang | angular devaition from eqautor (radians). |
If the input file is a 3D map, a set of projections are generated given the point group symmetry. Flags: FULL_ASU projections for full asymmetric unit MULTI_FILE projections in multiple files
int project_determine_orientations | ( | Bproject * | project, |
Bimage * | proj, | ||
Bstring & | mask_file, | ||
int | bin, | ||
Bsymmetry & | sym, | ||
int | part_select, | ||
vector< double > & | band, | ||
double | res_lo, | ||
double | res_hi, | ||
double | res_polar, | ||
int | ann_min, | ||
int | ann_max, | ||
double | shift_limit, | ||
double | angle_limit, | ||
double | edge_radius, | ||
int | flags | ||
) |
Find the orientation and origin of every image in a project.
*project | image processing parameter structure. |
*proj | reference projections. |
&mask_file | mask to apply to particles. |
bin | data compression by binning. |
*sym | point group symmetry structure. |
part_select | particle selection for processing. |
*band | array of reciprocal space bands. |
res_lo | low resolution limit (angstrom). |
res_hi | high resolution limit (angstrom). |
res_polar | resolution limit for in-plane angular alignment (angstrom). |
ann_min | minimum annulus (>=0). |
ann_max | maximum annulus (< image radius). |
shift_limit | maximum shift from nominal origin of box. |
angle_limit | maximum rotation from original in-plane rotation angle. |
edge_radius | edge radius to mask background using previous origin. |
flags | option flags. |
The polar power spectrum (pps) of the reference projection is cross correlated with that of the image in order to find the angle of rotation. The image is transformed using this angle and the shift found by cross correlation (cc). A second iterative comparison is done with real space polar images to find the angle followed by cross correlation to find the shift. How much of this second comparison is done depends on the mode flag: mode=0 pps projection selected only based on pps comparison mode=1 scc several projections selected based on cutoff for pps cc's mode=2 ccc all projections selected The angle and the x and y values are stored in the view_angle, and ox and oy arrays of the micrograph parameter structure. The projections must already be binned. Flags: MODE projection matching mode APPLY_CTF apply CTF to projections PART_LOG write log files in log directory
int project_determine_orientations2 | ( | Bproject * | project, |
Bimage * | proj, | ||
Bstring & | mask_file, | ||
int | bin, | ||
Bsymmetry & | sym, | ||
int | part_select, | ||
vector< double > & | band, | ||
double | res_lo, | ||
double | res_hi, | ||
double | res_polar, | ||
int | ann_min, | ||
int | ann_max, | ||
double | shift_limit, | ||
double | angle_limit, | ||
double | edge_radius, | ||
int | flags | ||
) |
Find the orientation and origin of every image in a project.
*project | image processing parameter structure. |
*proj | reference projections. |
&mask_file | mask to apply to particles. |
bin | data compression by binning. |
*sym | point group symmetry structure. |
part_select | particle selection for processing. |
*band | array of reciprocal space bands. |
res_lo | low resolution limit (angstrom). |
res_hi | high resolution limit (angstrom). |
res_polar | resolution limit for in-plane angular alignment (angstrom). |
ann_min | minimum annulus (>=0). |
ann_max | maximum annulus (< image radius). |
shift_limit | maximum shift from nominal origin of box. |
angle_limit | maximum rotation from original in-plane rotation angle. |
edge_radius | edge radius to mask background using previous origin. |
flags | option flags. |
The polar power spectrum (pps) of the reference projection is cross correlated with that of the image in order to find the angle of rotation. The image is transformed using this angle and the shift found by cross correlation (cc). A second iterative comparison is done with real space polar images to find the angle followed by cross correlation to find the shift. How much of this second comparison is done depends on the mode flag: mode=0 pps projection selected only based on pps comparison mode=1 scc several projections selected based on cutoff for pps cc's mode=2 ccc all projections selected The angle and the x and y values are stored in the view_angle, and ox and oy arrays of the micrograph parameter structure. The projections must already be binned. Flags: MODE projection matching mode APPLY_CTF apply CTF to projections PART_LOG write log files in log directory
int project_determine_origins | ( | Bproject * | project, |
Bimage * | proj, | ||
int | bin, | ||
Bsymmetry & | sym, | ||
int | part_select, | ||
double | res_lo, | ||
double | res_hi, | ||
double | shift_limit, | ||
int | flags | ||
) |
Find the origin of every image in a project.
*project | image processing parameter structure. |
*proj | reference projections. |
bin | data compression by binning. |
sym | point group symmetry structure. |
part_select | particle selection for processing. |
res_lo | low resolution limit (angstrom). |
res_hi | high resolution limit (angstrom). |
shift_limit | maximum shift from nominal origin of box. |
flags | option flags. |
The input view is used to find the corresponding reference projection. This projection is then rotated by the input view angle and cross-correlated with the image to find the shift. Flags: PART_LOG write log files in log directory
Bimage * project_prepare_2D_references | ( | Bproject * | project, |
long | first, | ||
long | number, | ||
int | bin, | ||
int | ctf_action, | ||
double | wiener | ||
) |
Prepare reference images from particles.
project | micrograph project structure. |
first | first particle image to use. |
number | number of particle images to use. |
bin | data compression by binning. |
ctf_action | flag to apply CTF to projections. |
wiener | Wiener factor. |
The particle images are shifted to center their origins.