 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
24 "Usage: bspr [options] input.star [input.star]",
25 "---------------------------------------------",
26 "Analyzing single particle reconstructions.",
27 "The mask should have 4 levels.",
28 "The relative density is calculated as (level1 - level3)/(level2 - level3).",
31 "-all Reset selection to all particles.",
32 "-rescale -0.1,5.2 Rescale data to average and standard deviation.",
33 "-postsymmetrize Symmetrization after reconstruction (default during).",
36 "-verbose 7 Verbosity of output.",
37 "-datatype u Force writing of a new data type.",
38 "-select 3 Selection number from STAR file selection column (default 1).",
39 "-sampling 1.5,1.5,1.5 Sampling of input images (A/pixel; a single value can be given).",
40 "-resolution 20 Resolution limit (angstrom, default Nyquist).",
41 "-scale 1.2 Scale or magnification of reconstruction compared to original images (default 1).",
42 "-size 100,120,90 Size of reconstruction (default from images).",
43 "-interpolation weighted Interpolation type: nearest (default), weighted, trilinear.",
44 "-pad 3 Image padding factor (default 2).",
45 "-symmetry D6 Symmetry: Point group identifier",
46 "-CTF flip Apply CTF correction to images before reconstruction (default not).",
47 "-wiener 0.15 Wiener factor for CTF correction (default 0.2).",
50 "-Mask mask.pif Mask with 4 levels: 0=ignore, 1=analyze, 2=reference density, 3=background.",
53 "-output file.star Output parameter file name.",
54 "-ppx Write temporary particle parameter files to directory \"ppx\".",
60 int main(
int argc,
char** argv)
64 double nuavg, nustd(0);
84 for ( curropt = option; curropt; curropt = curropt->
next ) {
85 if ( curropt->
tag ==
"all" )
87 if ( curropt->
tag ==
"interpolation" ) {
88 if ( curropt->
value[0] ==
'n' ) interp_type = 0;
89 if ( curropt->
value[0] ==
't' ) interp_type = 1;
90 if ( curropt->
value[0] ==
'k' ) interp_type = 2;
94 if ( curropt->
tag ==
"sampling" )
95 sam = curropt->
scale();
96 if ( curropt->
tag ==
"rescale" ) {
97 if ( curropt->
values(nuavg, nustd) < 2 )
98 cerr <<
"-rescale: Both average and standard deviation must be specified!" << endl;
100 cerr <<
"-rescale: A positive standard deviation must be specified!" << endl;
102 if ( curropt->
tag ==
"select" )
104 cerr <<
"-select: A selection number must be specified!" << endl;
105 if ( curropt->
tag ==
"CTF" )
107 if ( curropt->
tag ==
"wiener" ) {
108 if ( ( wiener = curropt->
value.
real() ) < 0.000001 )
109 cerr <<
"-wiener: A Wiener factor must be specified!" << endl;
111 if ( wiener < 0.01 ) wiener = 0.01;
115 if ( curropt->
tag ==
"resolution" )
116 if ( ( resolution = curropt->
value.
real() ) < 0.001 )
117 cerr <<
"-resolution: A resolution limit must be specified!" << endl;
118 if ( curropt->
tag ==
"size" )
119 map_size = curropt->
size();
120 if ( curropt->
tag ==
"scale" )
121 scale = curropt->
scale();
122 if ( curropt->
tag ==
"interpolation" ) {
123 if ( curropt->
value[0] ==
'n' ) interp_type = 0;
124 if ( curropt->
value[0] ==
'w' ) interp_type = 1;
125 if ( curropt->
value[0] ==
't' ) interp_type = 2;
127 if ( curropt->
tag ==
"pad" )
129 cerr <<
"-pad: An integer factor must be specified!" << endl;
130 if ( curropt->
tag ==
"symmetry" )
135 if ( curropt->
tag ==
"Mask" )
137 if ( curropt->
tag ==
"output" )
146 while ( optind < argc )
string_add(&file_list, argv[optind++]);
148 cerr <<
"Error: No parameter files specified!" << endl;
156 cerr <<
"Error: No input file read!" << endl;
163 if ( sam[0] < 0.1 ) sam[0] = 1;
174 resolution, scale, map_size, pad_factor,
175 interp_type, ctf_action, wiener, flags);
A class for a command line input option.
Functions for reconstruction.
int project_kill(Bproject *project)
Frees a whole project.
Vector3< double > scale()
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.
long values(T1 &v1, T2 &v2)
Header file for reading and writing micrograph parameters.
int project_set_mg_pixel_size(Bproject *project, Vector3< double > pixel_size)
Sets the pixel size for all the micrographs.
long part_reset_selection(Bproject *project, int flag=0)
Resets selection to all particles.
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.
Bsymmetry * init_point_group_symmetry(Bstring symmetry_string)
Sets up a symmetry structure from a string identifier.
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.
Header file for micrograph processing.
int kill_symmetry(Bsymmetry *sym)
Deallocates a symmetry structure.
long project_single_particle_reconstruction(Bproject *project, Bstring &maskfile, Bsymmetry *sym, int num_select, double hi_res, Vector3< double > scale, Vector3< long > size, int pad_factor, int interp_type, int ctf_action, double wiener, int flags)
Reciprocal space reconstruction from the images in a multi-image file.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
int main(int argc, char **argv)
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.