 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
27 "Usage: btompart [options] input.star [input.star]",
28 "-------------------------------------------------",
29 "Averages reconstructions or subvolumes of reconstructions based on",
30 "the selection in parameter files.",
33 "-add Adjust micrograph coordinates to particle origins.",
34 "-zflip Invert the particle z coordinate before transfer.",
35 "-transfer mg Calculate micrograph particle coordinates from micrograph (mg) or reconstruction (rec).",
36 "-reconstruct Reconstruct individual particles from micrographs.",
37 "-removemarkers 14 Mask out markers with this radius (pixels) before reconstruction.",
38 "-nloo 34.7,0.3 Determine particle resolution up to the given limit and with the given cutoff.",
41 "-verbose 7 Verbosity of output.",
42 "-sampling 1.5,1.5,1.5 Sampling (A/pixel; default from parameter file; a single value can be given).",
43 "-views Use particle views during transfer.",
44 "-boxsize 55 Set the particle box size (default from parameter file).",
47 "Parameters for particle reconstruction:",
48 "-maxresolution 20 Reconstruction resolution limit (angstrom, default Nyquist).",
49 "-interpolation weighted Interpolation type: nearest (default), weighted, trilinear.",
50 "-pad 3 Image padding factor (default 2).",
51 "-CTF flip Apply CTF correction to images before reconstruction (default not).",
52 "-wiener 0.15 Wiener factor for CTF correction (default 0.2).",
53 "-symmetry C5 Point group symmetry.",
54 "-base subvol Set the particle base file name (no extension).",
55 "-path dir/subdir Set the particle file paths.",
56 "-extension pif Set the particle image file format.",
58 "Parameters for particle resolution estimation:",
59 "-ratio 2.5 Radial sampling to Cartesian sampling ratio (default 1).",
60 "-fast 10 Fast mode, only use micrographs within the given angle from the selected one (default all).",
63 "-output file.star Output parameter file.",
64 "-Postscript file.ps Output plot file.",
69 int main(
int argc,
char **argv)
72 int add_coordinates(1);
77 double marker_radius(0);
79 double sampling_ratio(1);
80 double fast_angle(
M_PI);
85 double hires(0), lores(1e6);
101 for ( curropt = option; curropt; curropt = curropt->
next ) {
102 if ( curropt->
tag ==
"add" ) add_coordinates = 1;
103 if ( curropt->
tag ==
"zflip" ) zflip = 1;
104 if ( curropt->
tag ==
"transfer" ) {
105 if ( curropt->
value[0] ==
'm' ) transfer = 1;
106 if ( curropt->
value[0] ==
'r' ) transfer = 2;
108 if ( curropt->
tag ==
"reconstruct" ) part_recon = 1;
109 if ( curropt->
tag ==
"removemarkers" )
110 if ( ( marker_radius = curropt->
value.
real() ) < 1 )
111 cerr <<
"-removemarkers: A marker radius must be specified!" << endl;
112 if ( curropt->
tag ==
"nloo" )
113 if ( curropt->
values(nloo, cutoff) < 1 )
114 cerr <<
"-nloo: A resolution limit must be specified!" << endl;
117 if ( curropt->
tag ==
"views" ) use_view = 2;
118 if ( curropt->
tag ==
"sampling" )
119 sam = curropt->
scale();
120 if ( curropt->
tag ==
"boxsize" )
122 cerr <<
"-boxsize: A particle box size in pixels must be specified" << endl;
123 if ( curropt->
tag ==
"resolution" )
124 if ( curropt->
values(hires, lores) < 1 )
125 cerr <<
"-resolution: A high resolution limit must be specified" << endl;
126 if ( curropt->
tag ==
"maxresolution" )
127 if ( ( resolution = curropt->
value.
real() ) < 0.001 )
128 cerr <<
"-maxresolution: A resolution limit must be specified!" << endl;
129 if ( curropt->
tag ==
"interpolation" ) {
130 if ( curropt->
value[0] ==
'n' ) interp_type = 0;
131 if ( curropt->
value[0] ==
'w' ) interp_type = 1;
132 if ( curropt->
value[0] ==
't' ) interp_type = 2;
134 if ( curropt->
tag ==
"pad" )
136 cerr <<
"-pad: An integer factor must be specified!" << endl;
137 if ( curropt->
tag ==
"CTF" )
139 if ( curropt->
tag ==
"wiener" ) {
140 if ( ( wiener = curropt->
value.
real() ) < 0.000001 )
141 cerr <<
"-wiener: A Wiener factor must be specified!" << endl;
143 if ( wiener < 0.01 ) wiener = 0.01;
147 if ( curropt->
tag ==
"ratio" )
148 if ( ( sampling_ratio = curropt->
value.
real() ) < 1 )
149 cerr <<
"-ratio: A ratio must be specified!" << endl;
150 if ( curropt->
tag ==
"fast" ) {
151 if ( ( fast_angle = curropt->
value.
real() ) < 1 )
152 cerr <<
"-fast: An angle must be specified!" << endl;
154 fast_angle *=
M_PI/180.0;
156 if ( curropt->
tag ==
"symmetry" )
158 if ( curropt->
tag ==
"base" ) {
159 partbase = curropt->
value;
160 if ( partbase.
length() < 1 )
161 cerr <<
"-base: The particle base file name must be specified!" << endl;
163 if ( curropt->
tag ==
"path" ) {
164 partpath = curropt->
value;
165 if ( partpath.
length() < 1 )
166 cerr <<
"-path: The particle file path must be specified!" << endl;
168 if ( partpath[-1] !=
'/' ) partpath +=
"/";
170 if ( curropt->
tag ==
"extension" ) {
171 partext = curropt->
value;
172 if ( partext.
length() < 1 )
173 cerr <<
"-extension: The particle file extension must be specified!" << endl;
175 if ( curropt->
tag ==
"output" )
177 if ( curropt->
tag ==
"Postscript" )
186 while ( optind < argc )
string_add(&file_list, argv[optind++]);
188 cerr <<
"Error: No parameter files specified!" << endl;
196 cerr <<
"Error: No input file read!" << endl;
200 if ( add_coordinates ) {
220 cerr <<
"Error: No particles transferred!" << endl;
229 interp_type, pad_factor, ctf_action, wiener, sym,
230 partbase, partpath, partext);
A class for a command line input option.
Functions for reconstruction.
int project_kill(Bproject *project)
Frees a whole project.
int ps_plot(Bstring filename, Bplot *plot)
Generates postscript graphs.
Vector3< double > scale()
int string_kill(Bstring *list)
Kills a string linked list.
Header file for general symmetry functions.
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.
Functions to assess the resoltion of a tomographic tilt series.
int project_set_rec_voxel_size(Bproject *project, Vector3< double > pixel_size)
Sets the pixel size for all the reconstructions.
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_series_from_seed(Bproject *project, int flags)
Calculates the locations of particles in a series from a seed.
Utilities for timing functions.
Bstring symmetry_string()
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 main(int argc, char **argv)
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 project_set_particle_box_size(Bproject *project, Vector3< long > box_size)
Sets particle box size to the given value.
Functions to do a tomographic reconstruction.
int write_project(const char *filename, Bproject *project)
Writing micrograph parameters to a file.
Bplot * project_tomo_particle_resolution(Bproject *project, double hi_res, double sampling_ratio, double fast_angle, double cutoff)
Estimates the resolution for each particle image in each micrograph.
int kill_symmetry(Bsymmetry *sym)
Deallocates a symmetry structure.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
long project_tomo_reconstruct_particles(Bproject *project, double resolution, int interp_type, int pad_factor, int ctf_action, double wiener, Bsymmetry *sym, Bstring &partbase, Bstring &partpath, Bstring &partext)
Reconstructs particles from a tilt series.
int project_add_origins_to_coords(Bproject *project)
Adds the particle origins to the micrograph coordinates.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
Header file for single particle image processing in Bsoft.