 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
24 "Usage: btomaln [options] input.star [input.star]",
25 "------------------------------------------------",
26 "Aligns a tilt series of micrographs by progressive reconstruction.",
29 "-align 5,1.5,8 Align micrographs: number of iterations, stopping change,",
30 " and number of adjacent images for limited reconstructions",
31 " (defaults 1 and ± 5 images).",
32 "-lambda 2650 Calculate thickness from proportionality coefficient (in angstrom).",
35 "-verbose 7 Verbosity of output.",
36 "-datatype u Force writing of a new data type.",
37 "-thickness 235 Reconstruction thickness (default 20% of x size).",
38 "-sampling 1.5,1.5,1.5 Sampling (A/pixel; a single value can be given).",
39 "-resolution 900,300 High and low resolution limits for cross-correlation (default 0.1,1000 angstrom).",
40 "-shiftlimit 155.5 Limit on micrograph shift search in pixels (default 25% of micrograph width).",
41 "-origin 110,50,44 Origin for tilt axis (default 0,0,0).",
42 "-edge 23,12 Smooth the edge to a given width, with gaussian decay of a given width.",
43 "-fill 127 Fill value for particles extending beyond image (default background).",
46 "-output file.star Output parameter file.",
47 "-image file.pif Output multi-image file with aligned images.",
48 "-Postscript inten.ps Postscript file with fit of tilt series intensities.",
54 int main(
int argc,
char** argv)
64 double hi_res(0), lo_res(1e10);
65 double shift_limit(-1);
67 double edge_width(0), gauss_width(0);
77 for ( curropt = option; curropt; curropt = curropt->
next ) {
78 if ( curropt->
tag ==
"align" )
79 if ( curropt->
values(iter, dchange, dimg) < 1 )
80 cerr <<
"-align: A number of iterations must be specified." << endl;
81 if ( curropt->
tag ==
"lambda" )
82 if ( ( lambda = curropt->
value.
real() ) < 1 )
83 cerr <<
"-lambda: A mean free path must be specified!" << endl;
84 if ( curropt->
tag ==
"datatype" )
86 if ( curropt->
tag ==
"thickness" ) thickness = curropt->
value.
integer();
87 if ( curropt->
tag ==
"sampling" )
88 sampling = curropt->
scale();
89 if ( curropt->
tag ==
"resolution" ) {
90 if ( curropt->
values(hi_res, lo_res) < 1 )
91 cerr <<
"-resolution: Resolution limits must be specified." << endl;
92 else if ( hi_res > lo_res )
95 if ( curropt->
tag ==
"shiftlimit" )
96 if ( ( shift_limit = curropt->
value.
real() ) < 1 )
97 cerr <<
"-shiftlimit: A shift limit in pixels must be specified." << endl;
98 if ( curropt->
tag ==
"origin" )
99 origin = curropt->
origin();
100 if ( curropt->
tag ==
"edge" )
101 if ( curropt->
values(edge_width, gauss_width) < 1 )
102 cerr <<
"-edge: An edge width must be specified." << endl;
103 if ( curropt->
tag ==
"fill" )
104 fill = curropt->
fill(fill_type);
105 if ( curropt->
tag ==
"output" )
107 if ( curropt->
tag ==
"image" )
109 if ( curropt->
tag ==
"Postscript" )
118 while ( optind < argc )
string_add(&file_list, argv[optind++]);
120 cerr <<
"Error: No parameter or image files specified!" << endl;
128 cerr <<
"Error: Input file not read!" << endl;
132 if ( sampling[0] > 0 )
137 if ( thickness || lambda ) {
140 if ( plot && psfile.
length() )
142 if ( thickness ) lambda = thickness/tlr;
143 if ( lambda ) thickness = lambda*tlr;
144 if ( thickness && lambda ) {
146 cout <<
"Thickness: " << thickness <<
" A" << endl;
147 cout <<
"Proportionality parameter: " << lambda <<
" A" << endl << endl;
A class for a command line input option.
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.
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.
Vector3< double > origin()
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.
double project_fit_intensities(Bproject *project, Bplot *plot=NULL, int flag=0)
Determines the thickness to mean free path ratio from a tilt series.
Utilities for timing functions.
double project_write_aligned_images(Bproject *project, Bimage *pgr, Bstring &imgfile, DataType datatype)
Calculates aligned micrograph images and write them to a file.
Bplot * project_intensity_plot(Bproject *project)
Transfers the micrograph intensities for a field into a plot.
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.
double fill(int &fill_type)
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_tomo_align(Bproject *project, long thickness, long iter, double dchange, long dimg, double resolution, double shift_limit, double edge_width, double gauss_width)
Aligns a series of micrographs by cross-correlation sequentially.
DataType
Base data type specifier.
Header file for functions to align micrographs or coordinates from micrographs and apply the resultan...
int main(int argc, char **argv)
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
Header file for single particle image processing in Bsoft.