Bsoft  2.1.0
Bernard's software package
mg_particle_select.h
Go to the documentation of this file.
1 
9 #include "mg_processing.h"
10 #include "symmetry.h"
11 #include "qsort_functions.h"
12 
13 // Function prototypes
14 int_float* project_fom_order(Bproject* project, long& npart, int fom_index, int defocus_fit);
15 int_float* part_fom_order(Bparticle* partlist, long& npart, int fom_index);
16 long part_reset_selection(Bproject* project, int flag=0);
21 long part_set_selection(Bproject* project, int number);
23 long part_set_FOM(Bproject* project, int fom_index, double fom);
25 long part_deselect(Bproject* project, int fom_index, double fommin, double fommax=1e30);
26 long part_deselect_redundant(Bparticle* partlist, double excl_dist, int part_select, int fom_index);
27 long part_deselect_redundant(Bproject* project, double excl_dist, int part_select, int fom_index);
28 long part_set_multi_maps(Bproject* project, int part_select, int nmaps);
30 long part_reselect(Bproject* project, Bstring& tag, double reselect_min, double reselect_max);
31 double part_series_comparison(Bproject* project, Bsymmetry* sym, double angle_cutoff);
32 long part_select_FOM_groups(Bproject* project, int ngroups, int fom_index, int defocus_fit);
33 long part_select_percentage(Bproject* project, double percentage, int fom_index, int defocus_fit);
34 long part_select_best(Bproject* project, long number, int fom_index, int defocus_fit);
35 long part_select_FOM_avg_std(Bproject* project, double factor, int fom_index);
36 long part_select_random(Bproject* project, long number);
37 long part_select_random_fraction(Bproject* project, double fraction);
38 long part_select_random_group(Bproject* project, long number);
39 long part_select_bootstrap(Bproject* project, int number);
41  double theta_step, double phi_step, int number);
43  double theta_step, double phi_step, double threshfrac, double sigma, int fom_index);
45  double theta_step, double phi_step, int number, int fom_index);
47 long part_select_group(Bproject* project, int group);
48 long part_select_sets(Bproject* project, int size, int flag);
49 long part_select_frames(Bproject* project, int frame_start, int frame_end);
50 long part_filament_direction(Bproject* project, double minpct);
51 long part_view_select(Bproject* project, View view, double angle);
52 long part_side_view_select(Bproject* project, double angle);
53 long part_euler_angle_select(Bproject* project, double* euler6);
56 long part_set_best_view_in_series(Bproject* project, int fom_index);
57 long part_select_series(Bproject* project, int size, int flag);
58 long part_series_from_seed(Bproject* project, int flags);
59 
60 double part_fom_defocus_fit(Bproject* project, int fom_index, double& intercept, double& slope);
61 double part_fom_defocus_fit_deselect(Bproject* project, int fom_index, double cutoff);
65 long part_delete_deselected(Bparticle** partlist);
66 long part_fix_defocus(Bproject* project, double max_dev);
67 vector<pair<Bparticle*,double>> project_part_sort(Bproject* project, Bstring tag);
qsort_functions.h
Header file for utility functions for use in qsort calls.
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.
Definition: mg_particle_select.cpp:828
part_set_selection
long part_set_selection(Bproject *project, int number)
Selects one selection number and sets all others to zero.
Definition: mg_particle_select.cpp:317
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.
Definition: mg_particle_select.cpp:2343
Bstring
Definition: Bstring.h:29
Bparticle
Definition: mg_processing.h:90
symmetry.h
Header file for general symmetry functions.
Vector3< double >
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.
Definition: mg_particle_select.cpp:1659
part_select_group
long part_select_group(Bproject *project, int group)
Selects particles with a given group identifier.
Definition: mg_particle_select.cpp:1792
part_set_sequential
long part_set_sequential(Bproject *project)
Selects one selection number and sets all others to zero.
Definition: mg_particle_select.cpp:352
part_reselect
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.
Definition: mg_particle_select.cpp:749
View
Definition: View.h:26
part_select_to_group
long part_select_to_group(Bproject *project)
Transfer selection numbers to the group identifiers.
Definition: mg_particle_select.cpp:1748
project_fom_order
int_float * project_fom_order(Bproject *project, long &npart, int fom_index, int defocus_fit)
Definition: mg_particle_select.cpp:24
Bsymmetry
Definition: symmetry.h:38
part_deselect_from_list
long part_deselect_from_list(Bproject *project, Bstring list)
Deselects particles with selection numbers from a list.
Definition: mg_particle_select.cpp:412
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.
Definition: mg_particle_select.cpp:2377
part_deselect_redundant
long part_deselect_redundant(Bparticle *partlist, double excl_dist, int part_select, int fom_index)
Deselects particles overlapping with better ones.
Definition: mg_particle_select.cpp:520
part_consolidate_selection
long part_consolidate_selection(Bproject *project, int number)
Consolidates selected particles under one selection number.
Definition: mg_particle_select.cpp:283
part_view_select
long part_view_select(Bproject *project, View view, double angle)
Selects particles based on a distance from a reference view.
Definition: mg_particle_select.cpp:2130
int_float
Definition: qsort_functions.h:12
part_set_multi_maps
long part_set_multi_maps(Bproject *project, int part_select, int nmaps)
Sets selection for generating multiple maps.
Definition: mg_particle_select.cpp:590
part_select_random_fraction
long part_select_random_fraction(Bproject *project, double fraction)
Selects particles randomly based on a fraction of the total.
Definition: mg_particle_select.cpp:1243
project
Bproject * project
Definition: bshow.cpp:33
part_reset_selection
long part_reset_selection(Bproject *project, int flag=0)
Resets selection to all particles.
Definition: mg_particle_select.cpp:133
part_filament_direction
long part_filament_direction(Bproject *project, double minpct)
Checks the direction of particles associated with filaments.
Definition: mg_particle_select.cpp:2081
part_select_furthest_from_focus
long part_select_furthest_from_focus(Bproject *project)
Deselects all particles except those from micrographs furthest from focus.
Definition: mg_particle_select.cpp:2699
part_series_from_seed
long part_series_from_seed(Bproject *project, int flags)
Calculates the locations of particles in a series from a seed.
Definition: mg_particle_select.cpp:2480
part_deselect
long part_deselect(Bproject *project, int fom_index, double fommin, double fommax=1e30)
Deselects particles below a given FOM cutoff.
Definition: mg_particle_select.cpp:468
project_part_sort
vector< pair< Bparticle *, double > > project_part_sort(Bproject *project, Bstring tag)
Sorts the Particles by a selected parameter.
Definition: mg_particle_select.cpp:2842
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.
Definition: mg_particle_select.cpp:1546
part_select_random_group
long part_select_random_group(Bproject *project, long number)
Selects groups randomly to give at least a number of particles.
Definition: mg_particle_select.cpp:1292
part_side_view_select
long part_side_view_select(Bproject *project, double angle)
Selects particles based on a distance from a side view.
Definition: mg_particle_select.cpp:2181
part_set_FOM
long part_set_FOM(Bproject *project, int fom_index, double fom)
Sets the FOM for all particles.
Definition: mg_particle_select.cpp:382
part_fix_defocus
long part_fix_defocus(Bproject *project, double max_dev)
Resets defocus values for particles thata are too far off.
Definition: mg_particle_select.cpp:2804
Bproject
Definition: mg_processing.h:336
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.
Definition: mg_particle_select.cpp:2644
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.
Definition: mg_particle_select.cpp:1108
part_select
Tcl_Obj * part_select(Bparticle *part, int objc, Tcl_Obj *CONST objv[])
Definition: tcltk_bmg.cpp:563
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.
Definition: mg_particle_select.cpp:1052
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.
Definition: mg_particle_select.cpp:995
distance
double distance(vector< T1 > &v1, vector< T2 > &v2)
Definition: Vector3.h:538
part_select_bootstrap
long part_select_bootstrap(Bproject *project, int number)
Selects a given number of particles randomly with replacement.
Definition: mg_particle_select.cpp:1383
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.
Definition: mg_particle_select.cpp:945
part_select_sets
long part_select_sets(Bproject *project, int size, int flag)
Selects sets of particles, each set with the same size.
Definition: mg_particle_select.cpp:1841
part_select_series
long part_select_series(Bproject *project, int size, int flag)
Select series where all are already selected.
Definition: mg_particle_select.cpp:2421
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.
Definition: mg_particle_select.cpp:2584
part_fom_order
int_float * part_fom_order(Bparticle *partlist, long &npart, int fom_index)
Definition: mg_particle_select.cpp:90
part_unset_selection
long part_unset_selection(Bproject *project)
Unsets selection to no particles.
Definition: mg_particle_select.cpp:168
mg_processing.h
Header file for micrograph processing.
part_delete_deselected
long part_delete_deselected(Bproject *project)
Deletes deselected particles and renumber the remaining.
Definition: mg_particle_select.cpp:2729
part_euler_angle_select
long part_euler_angle_select(Bproject *project, double *euler6)
Selects particles based on Euler angle limits.
Definition: mg_particle_select.cpp:2229
part_select_random
long part_select_random(Bproject *project, long number)
Selects a specific number of particles randomly.
Definition: mg_particle_select.cpp:1163
part_select_frames
long part_select_frames(Bproject *project, int frame_start, int frame_end)
Select particles from frames in a series.
Definition: mg_particle_select.cpp:1924
part_select_closest_to_focus
long part_select_closest_to_focus(Bproject *project)
Deselects all particles except those from micrographs closest to focus.
Definition: mg_particle_select.cpp:2669
part_select_micrograph
long part_select_micrograph(Bproject *project, Bstring &mgselect)
Sets selection to the micrographs indicated.
Definition: mg_particle_select.cpp:247
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.
Definition: mg_particle_select.cpp:1442
part_invert_selection
long part_invert_selection(Bproject *project)
Inverts the selection.
Definition: mg_particle_select.cpp:204
part_set_filament_maps
long part_set_filament_maps(Bproject *project)
Generates a selection number from the group number for each filament.
Definition: mg_particle_select.cpp:645
part_origin_select
long part_origin_select(Bproject *project, Vector3< double > origin, double distance)
Selects particles based on the distance from the nominal origin.
Definition: mg_particle_select.cpp:2291