Bsoft  2.1.0
Bernard's software package
mg_particle_select.cpp File Reference

Select particles. More...

#include "mg_processing.h"
#include "mg_tomography.h"
#include "mg_select.h"
#include "mg_particle_select.h"
#include "mg_tags.h"
#include "symmetry.h"
#include "matrix_linear.h"
#include "Matrix.h"
#include "random_numbers.h"
#include "linked_list.h"
#include "utilities.h"

Go to the source code of this file.

Functions

int_float * project_fom_order (Bproject *project, long &npart, int fom_index, int defocus_fit)
 
int_float * part_fom_order (Bparticle *partlist, long &npart, int fom_index)
 
long part_reset_selection (Bproject *project, int flag)
 Resets selection to all particles. More...
 
long part_unset_selection (Bproject *project)
 Unsets selection to no particles. More...
 
long part_invert_selection (Bproject *project)
 Inverts the selection. More...
 
long part_select_micrograph (Bproject *project, Bstring &mgselect)
 Sets selection to the micrographs indicated. More...
 
long part_consolidate_selection (Bproject *project, int number)
 Consolidates selected particles under one selection number. More...
 
long part_set_selection (Bproject *project, int number)
 Selects one selection number and sets all others to zero. More...
 
long part_set_sequential (Bproject *project)
 Selects one selection number and sets all others to zero. More...
 
long part_set_FOM (Bproject *project, int fom_index, double fom)
 Sets the FOM for all particles. More...
 
long part_deselect_from_list (Bproject *project, Bstring list)
 Deselects particles with selection numbers from a list. More...
 
long part_deselect (Bproject *project, int fom_index, double fommin, double fommax)
 Deselects particles below a given FOM cutoff. More...
 
int QsortLargeToSmallParticle (const void *x, const void *y)
 
long part_deselect_redundant (Bparticle *partlist, double excl_dist, int part_select, int fom_index)
 Deselects particles overlapping with better ones. More...
 
long part_deselect_redundant (Bproject *project, double excl_dist, int part_select, int fom_index)
 Deselects particles overlapping with better ones. More...
 
long part_set_multi_maps (Bproject *project, int part_select, int nmaps)
 Sets selection for generating multiple maps. More...
 
long part_set_filament_maps (Bproject *project)
 Generates a selection number from the group number for each filament. More...
 
int part_reselect (Bparticle *part, Bstring &tag, double reselect_min, double reselect_max)
 
long part_reselect (Bproject *project, Bstring &tag, double reselect_min, double reselect_max)
 Reselects particles identified by an input STAR tag and between a minimum and maximum. More...
 
double part_series_comparison (Bproject *project, Bsymmetry *sym, double angle_cutoff)
 A function to select particles based on comparison of the orientations within a series. More...
 
long part_convert_selection (Bproject *project, int *sel)
 
long part_select_FOM_groups (Bproject *project, int ngroups, int fom_index, int defocus_fit)
 Selects groups of particles based on the FOM. More...
 
long part_select_percentage (Bproject *project, double percentage, int fom_index, int defocus_fit)
 Selects a percentage of particles based on the FOM. More...
 
long part_select_best (Bproject *project, long number, int fom_index, int defocus_fit)
 Selects the best particles based on the FOM. More...
 
long part_select_FOM_avg_std (Bproject *project, double factor, int fom_index)
 Selects particles based on FOM average and standard deviation. More...
 
long part_select_random (Bproject *project, long number)
 Selects a specific number of particles randomly. More...
 
long part_select_random_fraction (Bproject *project, double fraction)
 Selects particles randomly based on a fraction of the total. More...
 
long part_select_random_group (Bproject *project, long number)
 Selects groups randomly to give at least a number of particles. More...
 
long part_select_bootstrap (Bproject *project, int number)
 Selects a given number of particles randomly with replacement. More...
 
long part_select_random_within_view (Bproject *project, Bsymmetry *sym, double theta_step, double phi_step, int number)
 Selects a given number of particles within each view. More...
 
long part_select_maxsmooth (Bproject *project, Bsymmetry *sym, double theta_step, double phi_step, double threshfrac, double sigma, int fom_index)
 Selects particles based on a smoothed maximum surface. More...
 
long part_select_best_within_view (Bproject *project, Bsymmetry *sym, double theta_step, double phi_step, int number, int fom_index)
 Selects the best number of particles within each view. More...
 
long part_select_to_group (Bproject *project)
 Transfer selection numbers to the group identifiers. More...
 
long part_select_group (Bproject *project, int group)
 Selects particles with a given group identifier. More...
 
long part_select_sets (Bproject *project, int size, int flag)
 Selects sets of particles, each set with the same size. More...
 
long part_select_frames (Bproject *project, int frame_start, int frame_end)
 Select particles from frames in a series. More...
 
long part_fil_dir_stats (Bparticle *partlist)
 
long part_fil_dir_stats (Bparticle *partlist, double minpct)
 
long part_filament_direction (Bproject *project, double minpct)
 Checks the direction of particles associated with filaments. More...
 
long part_view_select (Bproject *project, View view, double angle)
 Selects particles based on a distance from a reference view. More...
 
long part_side_view_select (Bproject *project, double angle)
 Selects particles based on a distance from a side view. More...
 
long part_euler_angle_select (Bproject *project, double *euler6)
 Selects particles based on Euler angle limits. More...
 
long part_origin_select (Bproject *project, Vector3< double > origin, double distance)
 Selects particles based on the distance from the nominal origin. More...
 
long part_set_first_view_in_series (Bproject *project)
 Sets all orientation parameters for a particle to the first in the set. More...
 
long part_set_best_view_in_series (Bproject *project, int fom_index)
 Sets all orientation parameters for a particle to the best in the set. More...
 
long part_select_series (Bproject *project, int size, int flag)
 Select series where all are already selected. More...
 
long part_series_from_seed (Bproject *project, int flags)
 Calculates the locations of particles in a series from a seed. More...
 
double part_fom_defocus_fit (Bproject *project, int fom_index, double &intercept, double &slope)
 Fits the particle FOMs as a function of the defocus. More...
 
double part_fom_defocus_fit_deselect (Bproject *project, int fom_index, double cutoff)
 Deselects particles below a given FOM cutoff, adjusted for the defocus. More...
 
long part_select_closest_to_focus (Bproject *project)
 Deselects all particles except those from micrographs closest to focus. More...
 
long part_select_furthest_from_focus (Bproject *project)
 Deselects all particles except those from micrographs furthest from focus. More...
 
long part_delete_deselected (Bproject *project)
 Deletes deselected particles and renumber the remaining. More...
 
long part_delete_deselected (Bparticle **partlist)
 Deletes deselected particles and renumber the remaining. More...
 
long part_fix_defocus (Bproject *project, double max_dev)
 Resets defocus values for particles thata are too far off. More...
 
vector< pair< Bparticle *, double > > project_part_sort (Bproject *project, Bstring tag)
 Sorts the Particles by a selected parameter. More...
 

Variables

int verbose
 

Detailed Description

Select particles.

Author
Bernard Heymann
Date
Created: 20000426
Modified: 20200512

Definition in file mg_particle_select.cpp.

Function Documentation

◆ part_consolidate_selection()

long part_consolidate_selection ( Bproject *  project,
int  number 
)

Consolidates selected particles under one selection number.

Parameters
*projectproject parameter structure with all parameters.
numbernew selection number (1 if < 1).
Returns
long number of particles.

Definition at line 283 of file mg_particle_select.cpp.

◆ part_convert_selection()

long part_convert_selection ( Bproject *  project,
int *  sel 
)

Definition at line 899 of file mg_particle_select.cpp.

◆ part_delete_deselected() [1/2]

long part_delete_deselected ( Bparticle **  partlist)

Deletes deselected particles and renumber the remaining.

Parameters
**partlistparticle parameter structure.
Returns
long number of particles remaining.
The old list is deallocated.

Definition at line 2779 of file mg_particle_select.cpp.

◆ part_delete_deselected() [2/2]

long part_delete_deselected ( Bproject *  project)

Deletes deselected particles and renumber the remaining.

Parameters
*projectparameter structure with all parameters.
Returns
long number of particles remaining.

Definition at line 2729 of file mg_particle_select.cpp.

◆ part_deselect()

long part_deselect ( Bproject *  project,
int  fom_index,
double  fommin,
double  fommax 
)

Deselects particles below a given FOM cutoff.

Parameters
*projectparameter structure with all parameters.
fom_indexindex of FOM value to test for.
fomminminimum threshold for deselection.
fommaxmaximum threshold for deselection.
Returns
long number of particles selected.

Definition at line 468 of file mg_particle_select.cpp.

◆ part_deselect_from_list()

long part_deselect_from_list ( Bproject *  project,
Bstring  list 
)

Deselects particles with selection numbers from a list.

Parameters
*projectparameter structure with all parameters.
listcomma-separated list of selection numbers.
Returns
long number of particles selected.

Definition at line 412 of file mg_particle_select.cpp.

◆ part_deselect_redundant() [1/2]

long part_deselect_redundant ( Bparticle *  partlist,
double  excl_dist,
int  part_select,
int  fom_index 
)

Deselects particles overlapping with better ones.

Parameters
*partlistparticle linked list.
excl_distminimum distance between particles.
part_selectinitial selection number (-1 means all >0).
fom_indexindex of FOM value to test for.
Returns
long number of particles selected.

Definition at line 520 of file mg_particle_select.cpp.

◆ part_deselect_redundant() [2/2]

long part_deselect_redundant ( Bproject *  project,
double  excl_dist,
int  part_select,
int  fom_index 
)

Deselects particles overlapping with better ones.

Parameters
*projectparameter structure with all parameters.
excl_distminimum distance between particles.
part_selectinitial selection number (-1 means all >0).
fom_indexindex of FOM value to test for.
Returns
long number of particles selected.

Definition at line 552 of file mg_particle_select.cpp.

◆ part_euler_angle_select()

long part_euler_angle_select ( Bproject *  project,
double *  euler6 
)

Selects particles based on Euler angle limits.

Parameters
*projectproject structure with all parameters.
*euler66-value vector of Euler angle limits.
Returns
long number of particles selected.
Only particles already selected are subject to the test.

Definition at line 2229 of file mg_particle_select.cpp.

◆ part_fil_dir_stats() [1/2]

long part_fil_dir_stats ( Bparticle *  partlist)

Definition at line 1950 of file mg_particle_select.cpp.

◆ part_fil_dir_stats() [2/2]

long part_fil_dir_stats ( Bparticle *  partlist,
double  minpct 
)

Definition at line 2006 of file mg_particle_select.cpp.

◆ part_filament_direction()

long part_filament_direction ( Bproject *  project,
double  minpct 
)

Checks the direction of particles associated with filaments.

Parameters
*projectproject structure with all parameters.
minpctminimum percentage.
Returns
long number of particles with clear direction.
The selected particles associated with a filament is checked for their
in-plane direction. If the percentage of particles exceed the
minimum desired, the particles with the corresponding direction
are selected, and the rest deselected.

Definition at line 2081 of file mg_particle_select.cpp.

◆ part_fix_defocus()

long part_fix_defocus ( Bproject *  project,
double  max_dev 
)

Resets defocus values for particles thata are too far off.

Parameters
*projectparameter structure with all parameters.
max_devmaximum defocus difference allowed.
Returns
long number of defocus values reset.

Definition at line 2804 of file mg_particle_select.cpp.

◆ part_fom_defocus_fit()

double part_fom_defocus_fit ( Bproject *  project,
int  fom_index,
double &  intercept,
double &  slope 
)

Fits the particle FOMs as a function of the defocus.

Parameters
*projectparameter structure with all parameters.
fom_indexindex of FOM value to test for.
&interceptfit intercept.
&slopefit slope.
Returns
double correlation index of fit.
The FOM is fit as a linear function of the defocus average.

Definition at line 2584 of file mg_particle_select.cpp.

◆ part_fom_defocus_fit_deselect()

double part_fom_defocus_fit_deselect ( Bproject *  project,
int  fom_index,
double  cutoff 
)

Deselects particles below a given FOM cutoff, adjusted for the defocus.

Parameters
*projectparameter structure with all parameters.
fom_indexindex of FOM value to test for.
cutoffthreshold for deselection.
Returns
double correlation index of fit.
The FOM is fit as a linear function of the defocus average.
Particles are deselected based on the adjusted FOM cutoff:
    adj_cut = slope * defocus + cut

Definition at line 2644 of file mg_particle_select.cpp.

◆ part_fom_order()

int_float* part_fom_order ( Bparticle *  partlist,
long &  npart,
int  fom_index 
)

Definition at line 90 of file mg_particle_select.cpp.

◆ part_invert_selection()

long part_invert_selection ( Bproject *  project)

Inverts the selection.

Parameters
*projectproject parameter structure with all parameters.
Returns
long number of particles.

Definition at line 204 of file mg_particle_select.cpp.

◆ part_origin_select()

long part_origin_select ( Bproject *  project,
Vector3< double >  origin,
double  distance 
)

Selects particles based on the distance from the nominal origin.

Parameters
*projectproject structure with all parameters.
originnominal origin.
distancemaximum distance to accept.
Returns
long number of particles selected.
Only particles already selected are subject to the test.

Definition at line 2291 of file mg_particle_select.cpp.

◆ part_reselect() [1/2]

int part_reselect ( Bparticle *  part,
Bstring &  tag,
double  reselect_min,
double  reselect_max 
)

Definition at line 690 of file mg_particle_select.cpp.

◆ part_reselect() [2/2]

long part_reselect ( Bproject *  project,
Bstring &  tag,
double  reselect_min,
double  reselect_max 
)

Reselects particles identified by an input STAR tag and between a minimum and maximum.

Parameters
*projectparameter structure with all parameters.
&tagtag indicating which data to select on.
reselect_minminimum value.
reselect_maxmaximum value.
Returns
long number of particles selected.
Only particles already selected are subject to reselection.

Definition at line 749 of file mg_particle_select.cpp.

◆ part_reset_selection()

long part_reset_selection ( Bproject *  project,
int  flag 
)

Resets selection to all particles.

Parameters
*projectproject parameter structure with all parameters.
flagflag to limit resetting: 1=all, 2=part.
Returns
long number of particles.

Definition at line 133 of file mg_particle_select.cpp.

◆ part_select_best()

long part_select_best ( Bproject *  project,
long  number,
int  fom_index,
int  defocus_fit 
)

Selects the best particles based on the FOM.

Parameters
*projectparameter structure with all parameters.
numbernumber of particles.
fom_indexwhich FOM value to select on.
defocus_fitflag to compensate for defocus.
Returns
long number of particles selected.
Particles are ranked according to the figure-of-merit and the
desired percentage selected.

Definition at line 1052 of file mg_particle_select.cpp.

◆ part_select_best_within_view()

long part_select_best_within_view ( Bproject *  project,
Bsymmetry *  sym,
double  theta_step,
double  phi_step,
int  number,
int  fom_index 
)

Selects the best number of particles within each view.

Parameters
*projectparameter structure with all parameters.
*symsymmetry structure.
theta_stepangular step size from primary symmetry axis (radians).
phi_stepangular step size around primary symmetry axis (radians).
numbernumber within view to select.
fom_indexwhich FOM value to select on.
Returns
long number of particles selected.
The best particles within each view is selected.

Definition at line 1659 of file mg_particle_select.cpp.

◆ part_select_bootstrap()

long part_select_bootstrap ( Bproject *  project,
int  number 
)

Selects a given number of particles randomly with replacement.

Parameters
*projectparameter structure with all parameters.
numbernumber to select.
Returns
long number of particles selected.
A random number between 1 and the number of selected particles is 
generated the given number of times. The selection value for the
selected particle is incremented each time. A particle may therefore
be selected more than once.

Definition at line 1383 of file mg_particle_select.cpp.

◆ part_select_closest_to_focus()

long part_select_closest_to_focus ( Bproject *  project)

Deselects all particles except those from micrographs closest to focus.

Parameters
*projectparameter structure with all parameters.
Returns
long number of particles selected.

Definition at line 2669 of file mg_particle_select.cpp.

◆ part_select_FOM_avg_std()

long part_select_FOM_avg_std ( Bproject *  project,
double  factor,
int  fom_index 
)

Selects particles based on FOM average and standard deviation.

Parameters
*projectparameter structure with all parameters.
factorfactor to multiply standard deviation with.
fom_indexwhich FOM value to select on.
Returns
long number of particles selected.
Particles are selected using the average and standard deviation,
with the level set as a function of difference from the average:
    selected > average + factor*std_dev
Note the multiplying factor can be negative.
Only particles already selected are subject to the test.

Definition at line 1108 of file mg_particle_select.cpp.

◆ part_select_FOM_groups()

long part_select_FOM_groups ( Bproject *  project,
int  ngroups,
int  fom_index,
int  defocus_fit 
)

Selects groups of particles based on the FOM.

Parameters
*projectparameter structure with all parameters.
ngroupsnumber of groups of particles.
fom_indexindex of FOM value to select on.
defocus_fitflag to compensate for defocus.
Returns
long number of particles selected in the first group.
Particles are ranked according to the figure-of-merit and equal 
numbers are distributed to the requested number of particle groups.
The particle group selections are then written into a selection 
array in the STAR data base, with the group with the best FOM's first.
Only particles already selected are subject to the test.

Definition at line 945 of file mg_particle_select.cpp.

◆ part_select_frames()

long part_select_frames ( Bproject *  project,
int  frame_start,
int  frame_end 
)

Select particles from frames in a series.

Parameters
*projectparameter structure with all parameters.
frame_startfirst frame (starts at 1).
frame_endlast frame.
Returns
long number of particles selected.
Particles in frames from a series in the same field-of-view are 
selected. Only particles that are already selected are considered.

Definition at line 1924 of file mg_particle_select.cpp.

◆ part_select_furthest_from_focus()

long part_select_furthest_from_focus ( Bproject *  project)

Deselects all particles except those from micrographs furthest from focus.

Parameters
*projectparameter structure with all parameters.
Returns
long number of particles selected.

Definition at line 2699 of file mg_particle_select.cpp.

◆ part_select_group()

long part_select_group ( Bproject *  project,
int  group 
)

Selects particles with a given group identifier.

Parameters
*projectparameter structure with all parameters.
groupgroup identifier.
Returns
long number of particles selected.

Definition at line 1792 of file mg_particle_select.cpp.

◆ part_select_maxsmooth()

long part_select_maxsmooth ( Bproject *  project,
Bsymmetry *  sym,
double  theta_step,
double  phi_step,
double  threshfrac,
double  sigma,
int  fom_index 
)

Selects particles based on a smoothed maximum surface.

Parameters
*projectparameter structure with all parameters.
*symsymmetry structure.
theta_stepangular step size from primary symmetry axis (radians).
phi_stepangular step size around primary symmetry axis (radians).
threshfracfraction of maximum threshold.
sigmasmoothing parameter: gaussian sigma.
fom_indexwhich FOM value to select on.
Returns
long number of particles selected.
The best particles within each view is selected.

Definition at line 1546 of file mg_particle_select.cpp.

◆ part_select_micrograph()

long part_select_micrograph ( Bproject *  project,
Bstring &  mgselect 
)

Sets selection to the micrographs indicated.

Parameters
*projectproject parameter structure with all parameters.
&mgselectstring with selection.
Returns
long number of particles.
Only the micrograph selection fields are modified.

Definition at line 247 of file mg_particle_select.cpp.

◆ part_select_percentage()

long part_select_percentage ( Bproject *  project,
double  percentage,
int  fom_index,
int  defocus_fit 
)

Selects a percentage of particles based on the FOM.

Author
David Belnap & Bernard Heymann
Parameters
*projectparameter structure with all parameters.
percentagepercentage of particles (0 - 100).
fom_indexwhich FOM value to select on.
defocus_fitflag to compensate for defocus.
Returns
long number of particles selected.
Particles are ranked according to the figure-of-merit and the
desired percentage selected.

Definition at line 995 of file mg_particle_select.cpp.

◆ part_select_random()

long part_select_random ( Bproject *  project,
long  number 
)

Selects a specific number of particles randomly.

Parameters
*projectparameter structure with all parameters.
numbernumber to select.
Returns
long number of particles selected.
An array is set up for all selected particles. The given number of random
elements is selected in the array and transfered as particle selections.

Definition at line 1163 of file mg_particle_select.cpp.

◆ part_select_random_fraction()

long part_select_random_fraction ( Bproject *  project,
double  fraction 
)

Selects particles randomly based on a fraction of the total.

Parameters
*projectparameter structure with all parameters.
fractionfraction of total to select.
Returns
long number of particles selected.
A random number between 0 and 1 is generated for each particle and if 
it is smaller than the given fraction, the particle is selected.

Definition at line 1243 of file mg_particle_select.cpp.

◆ part_select_random_group()

long part_select_random_group ( Bproject *  project,
long  number 
)

Selects groups randomly to give at least a number of particles.

Parameters
*projectparameter structure with all parameters.
numbernumber to select.
Returns
long number of particles selected.
A random number between 0 and 1 is generated for each particle and if 
it is smaller than the given fraction, the particle is selected.

Definition at line 1292 of file mg_particle_select.cpp.

◆ part_select_random_within_view()

long part_select_random_within_view ( Bproject *  project,
Bsymmetry *  sym,
double  theta_step,
double  phi_step,
int  number 
)

Selects a given number of particles within each view.

Parameters
*projectparameter structure with all parameters.
*symsymmetry structure.
theta_stepangular step size from primary symmetry axis (radians).
phi_stepangular step size around primary symmetry axis (radians).
numbernumber within view to select.
Returns
long number of particles selected.
A random number between 1 and the number of selected particles is 
generated the given number of times. The selection value for the
selected particle is incremented each time. A particle may therefore
be selected more than once.
This selection is meant to be used with the bootstrap reconstruction.

Definition at line 1442 of file mg_particle_select.cpp.

◆ part_select_series()

long part_select_series ( Bproject *  project,
int  size,
int  flag 
)

Select series where all are already selected.

Parameters
*projectparameter structure with all parameters.
sizenumber of particles in each set.
flagflag to not count across mg or rec boundaries.
Returns
long number of particles selected.
This function selects those series where all the particles
are already selected, and deselects the rest. Sets are selected
with each series part of the same set.

Definition at line 2421 of file mg_particle_select.cpp.

◆ part_select_sets()

long part_select_sets ( Bproject *  project,
int  size,
int  flag 
)

Selects sets of particles, each set with the same size.

Parameters
*projectparameter structure with all parameters.
sizenumber of particles in each set.
flagflag to not count across mg or rec boundaries.
Returns
long number of particles selected.
Sets up sets of particles, each set identified as a number in the
selection array.

Definition at line 1841 of file mg_particle_select.cpp.

◆ part_select_to_group()

long part_select_to_group ( Bproject *  project)

Transfer selection numbers to the group identifiers.

Parameters
*projectparameter structure with all parameters.
Returns
long number of particles selected.

Definition at line 1748 of file mg_particle_select.cpp.

◆ part_series_comparison()

double part_series_comparison ( Bproject *  project,
Bsymmetry *  sym,
double  angle_cutoff 
)

A function to select particles based on comparison of the orientations within a series.

Parameters
*projectparameter structure with all parameters.
*symsymmetry.
angle_cutoffangle cutoff value (radians).
Returns
double average angular deviation.
Only particles already selected are subject to the test.

Definition at line 828 of file mg_particle_select.cpp.

◆ part_series_from_seed()

long part_series_from_seed ( Bproject *  project,
int  flags 
)

Calculates the locations of particles in a series from a seed.

Parameters
*projectmicrograph project.
flagsbit 1=invert z, bit 2=use original particle view.
Returns
long number of particles created.
The seed particle locations is either in the zero-degree tilt 2D micrograph,
or a 3D reconstruction. The latter also gives the z-coordinate, resulting
in a better definition of the particle location.
The project selection flag indicates micrograph or reconstruction.

Definition at line 2480 of file mg_particle_select.cpp.

◆ part_set_best_view_in_series()

long part_set_best_view_in_series ( Bproject *  project,
int  fom_index 
)

Sets all orientation parameters for a particle to the best in the set.

Parameters
*projectparameter structure with all parameters.
fom_indexindex of FOM value to select on.
Returns
int 0.
This function uses the FOM to select the best orientation parameters
for a particle in a set (typically a focal series) and sets all
orientation parameters to the same values.

Definition at line 2377 of file mg_particle_select.cpp.

◆ part_set_filament_maps()

long part_set_filament_maps ( Bproject *  project)

Generates a selection number from the group number for each filament.

Parameters
*projectparameter structure with all parameters.
Returns
long number of maps selected.

Definition at line 645 of file mg_particle_select.cpp.

◆ part_set_first_view_in_series()

long part_set_first_view_in_series ( Bproject *  project)

Sets all orientation parameters for a particle to the first in the set.

Parameters
*projectparameter structure with all parameters.
Returns
int 0.
This function sets the views of all the particles in the field-of-view to 
the views for the first micrograph.

Definition at line 2343 of file mg_particle_select.cpp.

◆ part_set_FOM()

long part_set_FOM ( Bproject *  project,
int  fom_index,
double  fom 
)

Sets the FOM for all particles.

Parameters
*projectproject parameter structure with all parameters.
fom_indexindex of FOM value to set.
fomnew FOM.
Returns
long number of particles.

Definition at line 382 of file mg_particle_select.cpp.

◆ part_set_multi_maps()

long part_set_multi_maps ( Bproject *  project,
int  part_select,
int  nmaps 
)

Sets selection for generating multiple maps.

Parameters
*projectparameter structure with all parameters.
part_selectinitial selection number (-1 means all >0).
nmapsdesired number of maps.
Returns
long number of particles selected.
Selected particles are sequentially assigned increasing integers
up to desired number of maps (nmaps).

Definition at line 590 of file mg_particle_select.cpp.

◆ part_set_selection()

long part_set_selection ( Bproject *  project,
int  number 
)

Selects one selection number and sets all others to zero.

Parameters
*projectproject parameter structure with all parameters.
numberselection number to keep.
Returns
long number of particles selected.

Definition at line 317 of file mg_particle_select.cpp.

◆ part_set_sequential()

long part_set_sequential ( Bproject *  project)

Selects one selection number and sets all others to zero.

Parameters
*projectproject parameter structure with all parameters.
Returns
long number of particles selected.

Definition at line 352 of file mg_particle_select.cpp.

◆ part_side_view_select()

long part_side_view_select ( Bproject *  project,
double  angle 
)

Selects particles based on a distance from a side view.

Parameters
*projectproject structure with all parameters.
angleangular distance from the side view.
Returns
long number of particles selected.
Only particles already selected are subject to the test.

Definition at line 2181 of file mg_particle_select.cpp.

◆ part_unset_selection()

long part_unset_selection ( Bproject *  project)

Unsets selection to no particles.

Parameters
*projectproject parameter structure with all parameters.
Returns
long number of particles.

Definition at line 168 of file mg_particle_select.cpp.

◆ part_view_select()

long part_view_select ( Bproject *  project,
View  view,
double  angle 
)

Selects particles based on a distance from a reference view.

Parameters
*projectproject structure with all parameters.
viewcentral view to search for.
angleangular distance from the view.
Returns
long number of particles selected.
Only particles already selected are subject to the test.

Definition at line 2130 of file mg_particle_select.cpp.

◆ project_fom_order()

int_float* project_fom_order ( Bproject *  project,
long &  npart,
int  fom_index,
int  defocus_fit 
)

Definition at line 24 of file mg_particle_select.cpp.

◆ project_part_sort()

vector<pair<Bparticle*,double> > project_part_sort ( Bproject *  project,
Bstring  tag 
)

Sorts the Particles by a selected parameter.

Parameters
*projectproject parameter structure.
tagparameter tag.
Returns
vector<pair<Bparticle*,double>> array of particle links and values.

Definition at line 2842 of file mg_particle_select.cpp.

◆ QsortLargeToSmallParticle()

int QsortLargeToSmallParticle ( const void *  x,
const void *  y 
)

Definition at line 504 of file mg_particle_select.cpp.

Variable Documentation

◆ verbose

int verbose
extern