 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
24 "Usage: bpart [options] input.star [input.star]",
25 "----------------------------------------------",
26 "Manipulates single particle images.",
29 "-reconstructions Operate on reconstruction parameters rather than micrographs.",
30 "-all Reset selection to all particles before other selections.",
31 "-find 20 Finds the centers of the particle images (iterations).",
32 "-shift Center the actual particle images (new images with \"_cen\" in names).",
33 "-align Output aligned particle images (new images with \"_aln\" in names).",
34 "-rescale -0.1,5.2 Rescale particle images to average and standard deviation.",
35 "-settilt -30,45 Set micrograph tilt, axis and particle defocus.",
36 "-calctilt Calculate micrograph tilt parameters from particle defocus.",
39 "-verbose 7 Verbosity of output.",
40 "-select 14 Selection number of particles to process (default all selected).",
41 "-resolution 10,500 Resolution limits for cross-correlation (angstrom, default 20,1000).",
42 "-partpath dir/subdir Set the particle file paths.",
45 "-mask mask.pif Intput 3D mask file to mask particles.",
48 "-output file.star Output parameter file.",
49 "-reference file.pif Composite image reference file.",
55 int main(
int argc,
char** argv)
63 double nuavg(0), nustd(0);
65 double axis(0), tilt(0);
77 for ( curropt = option; curropt; curropt = curropt->
next ) {
78 if ( curropt->
tag ==
"reconstructions" ) use_rec = 1;
79 if ( curropt->
tag ==
"all" ) reset = 1;
80 if ( curropt->
tag ==
"find" )
82 cerr <<
"-find: A number of iterations must be specified!" << endl;
83 if ( curropt->
tag ==
"shift" ) shift = 1;
84 if ( curropt->
tag ==
"align" ) align = 1;
85 if ( curropt->
tag ==
"rescale" )
86 if ( curropt->
values(nuavg, nustd) < 2 )
87 cerr <<
"-rescale: Both average and standard deviation must be specified!" << endl;
88 if ( curropt->
tag ==
"calctilt" ) calc_tilt = 1;
89 if ( curropt->
tag ==
"settilt" ) {
90 if ( curropt->
values(tilt, axis) < 1 )
91 cerr <<
"-settilt: A tilt angle must be specified!" << endl;
97 if ( curropt->
tag ==
"select" )
99 cerr <<
"-select: A selection number must be specified!" << endl;
100 if ( curropt->
tag ==
"resolution" )
101 if ( curropt->
values(hires, lores) < 1 )
102 cerr <<
"-resolution: A resolution limit must be specified!" << endl;
103 if ( curropt->
tag ==
"partpath" ) {
104 partpath = curropt->
value;
105 if ( partpath.
length() < 1 )
106 cerr <<
"-partpath: The particle file path must be specified!" << endl;
108 if ( partpath[-1] !=
'/' ) partpath +=
"/";
110 if ( curropt->
tag ==
"mask" )
112 if ( curropt->
tag ==
"output" )
114 if ( curropt->
tag ==
"reference" )
121 if ( hires > lores ) swap(hires, lores);
125 while ( optind < argc )
string_add(&file_list, argv[optind++]);
127 cerr <<
"Error: No parameter files specified!" << endl;
135 cerr <<
"Error: No input file read!" << endl;
154 if ( maskfile.
length() ) {
165 if ( fabs(tilt) > 0.01 )
171 if ( pref && reffile.
length() )
A class for a command line input option.
int project_kill(Bproject *project)
Frees a whole project.
Bimage * project_find_particle_centers(Bproject *project, int max_iter, int part_select, double hires, double lores)
Calculates centers of single particle images.
double project_tilt_from_particle_defocus(Bproject *project)
Finds the tilt axis from refined particle defocus values.
Manipulates single particle images.
long project_mask_particles(Bproject *project, Bimage *pmask, Bstring &partpath)
Calculates centers of single particle images.
int string_kill(Bstring *list)
Kills a string linked list.
int bexit(int value)
Exit function for cleanup and debugging.
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.
int main(int argc, char **argv)
long values(T1 &v1, T2 &v2)
Bimage * read_img(char *filename, int readdata, int img_select)
General driver function to read multiple image formats.
Header file for reading and writing micrograph parameters.
long part_reset_selection(Bproject *project, int flag=0)
Resets selection to all particles.
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
General image parameter class.
Utilities for timing functions.
Tcl_Obj * part_select(Bparticle *part, int objc, Tcl_Obj *CONST objv[])
double timer_start()
Starts timer and prints the time.
Bproject * read_project(const char *filename, int flags=0)
Reading micrograph parameters from files.
Header file for general utilities.
int project_center_particles(Bproject *project, int part_select, double nuavg, double nustd)
Centers single particle images based on the parametric center.
int project_align_particles(Bproject *project, int part_select, double nuavg, double nustd)
Aligns single particle images based on orientation parameters.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Header file for 2D and 3D image I/O.
int write_project(const char *filename, Bproject *project)
Writing micrograph parameters to a file.
Header file for micrograph processing.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
long project_set_particle_defocus_from_tilt(Bproject *project, double axis, double tilt)
Finds the tilt axis from refined particle defocus values.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.