 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
23 "Usage: emgrand [options] input.star [input.star]",
24 "------------------------------------------------",
25 "Randomizes particle parameters.",
28 "-randomviews Replace views with random orientations.",
29 "-helical Replace views with random orientations for a helix.",
30 "-symmetry C5 Replace views with random symmetry-related orientations.",
31 "-origins 1.4 Introduce random errors into origins with this standard deviation (pixels).",
32 "-views 3.1 Introduce random errors into views with this standard deviation (degrees).",
33 "-defocus 0.3 Introduce random errors into defocus with this standard deviation (um).",
34 "-magnification 0.1 Introduce random errors into magnifications with this standard deviation (fraction).",
35 "-setasu C5 Set the views to the asymmetric unit (must agree with -symmetry if used).",
38 "-verbose 7 Verbosity of output.",
41 "-output file.star Output parameter file name.",
47 int main(
int argc,
char **argv)
50 double randomorigins(0);
51 double randomviews(0);
52 double randomdefocus(0);
64 for ( curropt = option; curropt; curropt = curropt->
next ) {
65 if ( curropt->
tag ==
"randomviews" )
67 if ( curropt->
tag ==
"helical" )
69 if ( curropt->
tag ==
"symmetry" ) {
73 if ( curropt->
tag ==
"origins" ) {
74 if ( ( randomorigins = curropt->
value.
real() ) < 0.00001 )
75 cerr <<
"-origins: A standard deviation must be specified!" << endl;
76 else if ( randomorigins < 0 ) randomorigins = 0;
78 if ( curropt->
tag ==
"views" ) {
79 if ( ( randomviews = curropt->
value.
real() ) < 0.00001 )
80 cerr <<
"-views: A standard deviation must be specified!" << endl;
82 randomviews *=
M_PI/180.0;
83 if ( randomviews < 0 ) randomviews = 0;
86 if ( curropt->
tag ==
"defocus" ) {
87 if ( ( randomdefocus = curropt->
value.
real() ) < 0.00001 )
88 cerr <<
"-defocus: A standard deviation must be specified!" << endl;
90 if ( randomdefocus < 100 ) randomdefocus *= 1e4;
91 if ( randomdefocus < 0 ) randomdefocus = 0;
94 if ( curropt->
tag ==
"magnification" ) {
95 if ( ( randommag = curropt->
value.
real() ) < 0.00001 )
96 cerr <<
"-magnification: A standard deviation must be specified!" << endl;
98 if ( randommag < 0 ) randommag = 0;
100 if ( curropt->
tag ==
"setasu" ) {
104 if ( curropt->
tag ==
"output" )
113 while ( optind < argc )
string_add(&file_list, argv[optind++]);
115 cerr <<
"Error: No parameter files specified!" << endl;
121 cerr <<
"Error: No input file read!" << endl;
131 if ( sym && randsym )
A class for a command line input option.
int project_random_magnification(Bproject *project, double std)
Introduces random errors into particle magnifications.
int project_kill(Bproject *project)
Frees a whole project.
int project_random_views(Bproject *project)
Replace the original particle orientations by random views.
Header file for general symmetry functions.
int bexit(int value)
Exit function for cleanup and debugging.
int project_random_helical_views(Bproject *project)
Replace the original particle orientations by random side views for a helix.
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Header file for option handlers.
Header file for reading and writing micrograph parameters.
int project_set_particle_asu_views(Bproject *project, Bstring &symmetry_asu)
Sets particle views within the asymmetric unit.
int main(int argc, char **argv)
Utilities for timing functions.
double timer_start()
Starts timer and prints the time.
int project_random_defocus(Bproject *project, double std)
Introduces random errors into micrograph defocus averages.
Bproject * read_project(const char *filename, int flags=0)
Reading micrograph parameters from files.
Header file for applying some randomization to parameters.
Header file for general utilities.
int project_random_origins(Bproject *project, double std)
Introduces random errors into particle origins.
int project_random_symmetry_related_views(Bproject *project, Bsymmetry *sym)
Replaces the original orientations by symmetry-related views.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
int write_project(const char *filename, Bproject *project)
Writing micrograph parameters to a file.
int kill_symmetry(Bsymmetry *sym)
Deallocates a symmetry structure.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.