Bsoft  2.1.0
Bernard's software package
mg_processing.h
Go to the documentation of this file.
1 
9 #include "ctf.h"
10 #include "symmetry.h"
11 #include "marker.h"
12 #include "View.h"
13 #include "Euler.h"
14 #include "Bstring.h"
15 
16 #define NFOM 10
17 
18 #define MODE_PPS 0
19 #define MODE_SCC 1
20 #define MODE_CCC 2
21 #define MODE 3
22 #define FULL_ASU 8
23 #define MULTI_FILE 16
24 #define APPLY_CTF 32
25 #define PART_LOG 64
26 #define WRITE_PPX 128
27 #define CHECK_PPX 256
28 
29 
30 #ifndef _ProjectParamStructs_
31 /************************************************************************
32 @Object: enum FOMType
33 @Description:
34  Particle figure-of-merit type.
35 @Features:
36  A variety of FOM's that can be associated with a comparison of images.
37 *************************************************************************/
38 enum FOMType {
40  FOM,
62  FOM9
63 } ;
64 
65 struct Bmicrograph;
66 struct Breconstruction;
67 
68 /************************************************************************
69 @Object: struct Bframe
70 @Description:
71  Movie frame parameter structure.
72 @Features:
73  Shift for each frame.
74 *************************************************************************/
75 struct Bframe {
76  Bframe* next; // Next frame in list
77  int id; // Frame number in file (starts at 1)
78  Vector3<double> shift; // Shift relative to reference frame
79  double fom; // Figure-of-merit
80  long sel; // Selection flag
81 } ;
82 
83 /************************************************************************
84 @Object: struct Bparticle
85 @Description:
86  Single particle image parameter structure.
87 @Features:
88  Orientation parameters for each particle.
89 *************************************************************************/
90 struct Bparticle {
91  Bparticle* next; // Next particle in list
92  Bstring fpart; // Particle image file name
93  int id; // Particle number in file (starts at 1)
94  int group; // Group membership (such as filaments or crystals)
95  double mag; // Magnification
96  double def; // Defocus average (angstrom)
97  double dev; // Defocus deviation (angstrom)
98  double ast; // Astigmatism angle
99  Vector3<double> pixel_size; // Particle pixel size - usually same as micrograph
100  Vector3<double> loc; // Coordinates in the micrograph or tomogram
101  Vector3<double> ori; // Origin of particle in voxel units
102  View view; // View: 3-value vector and angle (radians)
103  double fom[NFOM]; // Figure-of-merit, types defined in project structure
104  long sel; // Selection flag
107 } ;
108 
109 /************************************************************************
110 @Object: struct Bfilnode
111 @Description:
112  Filament node parameter structure.
113 @Features:
114  Parameters defining a filament node.
115 *************************************************************************/
116 struct Bfilnode {
117  Bfilnode* next; // Next node in list
118  int id; // Filament node number (starts at 1)
119  Vector3<double> loc; // Coordinates in the micrograph or tomogram
120 } ;
121 
122 /************************************************************************
123 @Object: struct Bfilament
124 @Description:
125  Filament parameter structure.
126 @Features:
127  Parameters defining a filament.
128 *************************************************************************/
129 struct Bfilament {
130  Bfilament* next; // Next filament in list
131  Bstring ffil; // Filament image file name
132  int id; // Filament number (starts at 1)
133  Bfilnode* node; // Linked list of nodes
134 } ;
135 
136 /************************************************************************
137 @Object: struct Bbadarea
138 @Description:
139  Structure to mark a bad area.
140 @Features:
141  3D coordinates for the center of the bad area.
142 *************************************************************************/
143 struct Bbadarea {
144  Bbadarea* next; // Next bad area in list
145  int id; // Bad area number
146  Vector3<double> loc; // Coordinates in the micrograph or tomogram
147 } ;
148 
149 /************************************************************************
150 @Object: struct Bstrucfac
151 @Description:
152  Structure factor structure.
153 @Features:
154  3D Miller indices and structure factor locations.
155 *************************************************************************/
156 struct Bstrucfac {
157  Bstrucfac* next; // Next structure factor in list
158  Vector3<double> loc; // Coordinates in the transform
159  Vector3<int> index; // Miller indices
160  double amp; // Amplitude
161  double sigamp; // Amplitude deviation
162  double phi; // Phase
163  double sigphi; // Phase deviation
164  double fom; // Figure-of-merit
165  long sel; // Selection flag
166 } ;
167 
168 /************************************************************************
169 @Object: struct Blayerline
170 @Description:
171  Layer line structure.
172 @Features:
173  3D Miller indices and structure factor locations.
174 *************************************************************************/
175 struct Blayerline {
176  Blayerline* next; // Next layer line in list
177  int number; // Layer line number
178  int order; // Bessel order
179  double distance; // Distance along helical axis from origin
180  double freq; // Spatial frequency
181  double amp; // Amplitude
182  double fom; // Figure-of-merit
183  long sel; // Selection flag
184 } ;
185 
186 /************************************************************************
187 @Object: struct Bmicrograph
188 @Description:
189  General micrograph parameter structure.
190 @Features:
191  This contains all parameters associated with a micrograph:
192  The micrograph number and file name.
193  The associated STAR data block number.
194  The picked particle file name and parameters.
195  The filament file name and parameters.
196  Defocus parameters for the micrograph.
197  Orientation parameters for each particle.
198  Filament node locations.
199  Marker locations.
200 *************************************************************************/
201 struct Bmicrograph {
202  Bmicrograph* next; // Next micrograph in list
203  Bstring id; // Micrograph identifier
204  long select; // Selection flag
205  int block; // STAR data block number
206  Bstring fmg; // Micrograph image file
207  Bstring fframe; // Micrograph image frames file
208  Bstring fpart; // Image file with picked particles
209  Bstring ffil; // Image file with extracted filaments
210  Bstring fft; // Image file with Fourier transform
211  Bstring fps; // Image file with power spectrum
212  int img_num; // Image number in file
213  double magnification; // Microscope magnification
214  double sampling; // Scanner sampling (angstrom)
215  Vector3<double> pixel_size; // Nominal micrograph pixel size
216  double dose; // Electron dose (electrons/angstrom^2)
217  double intensity; // Micrograph average
218  double wri; // Water ring index
219  double tilt_axis; // Tilt axis angle, origin at x-axis (radians)
220  double tilt_angle; // Tilt angle, right-handed around tilt axis (radians)
221  double level_angle; // Level angle, deviation of tilt axis from xy plane (radians)
222  double rot_angle; // In-plane rotation angle of micrograph or specimen (radians)
223  Vector3<double> origin; // Origin of micrograph (usually the center)
224  Vector3<double> scale; // Scale with respect to field-of-view
225  Matrix3 matrix; // Affine matrix for non-rigid transformations
226  Vector3<double> hvec; // Vector for first Miller index
227  Vector3<double> kvec; // Vector for second Miller index
228  Vector3<double> lvec; // Vector for third Miller index
229  double helix_axis; // Rotation angle defining the helical axis
230  double helix_rise; // Helical rise per subunit
231  double helix_angle; // Helical rotation angle per subunit
232  double helix_radius; // Helical radius
233  Vector3<long> box_size; // Particle box size
234  double filament_width; // Filament width
235  double fil_node_radius; // Filament node radius
236  double bad_radius; // Radius of bad area around coordinates
237  double sf_radius; // Structure factor radius
238  double mark_radius; // Radius of marker
239  double fom; // Figure-of-merit for the micrograph
240  Bframe* frame; // Movie frame parameters
241  CTFparam* ctf; // Contrast transfer function parameters
242  Bparticle* part; // First particle in linked list
243  Bfilament* fil; // First filament in linked list
244  Bbadarea* bad; // First bad area in linked list
245  Bmarker* mark; // First marker in linked list
246  Bstrucfac* sf; // First structure factor in linked list
247  Blayerline* layer; // First layer line in linked list
248 } ;
249 
250 /************************************************************************
251 @Object: struct Bfield
252 @Description:
253  Field-of-view parameter structure.
254 @Features:
255  One to many micrographs can be taken of a field-of-view, including
256  focal and tomographing series.
257  The orientation parameters, origin and matrix, are intended to deal
258  with tomographic dual tilt series.
259 *************************************************************************/
260 struct Bfield {
261  Bfield* next; // Next field-of-view in list
262  Bstring id; // Field identifier
263  Vector3<double> origin; // Origin of reference micrograph in the field (usually the center)
264  Matrix3 matrix; // Affine matrix for non-rigid transformations
265  long select; // Selection flag
266  double fom; // Figure-of-merit for the field
267  Bmicrograph* mg; // First micrograph in list
268 } ;
269 
270 /************************************************************************
271 @Object: struct Breconstruction
272 @Description:
273  Reconstruction parameter structure.
274 @Features:
275  This contains all parameters associated with a reconstruction:
276  The reconstruction number and file name.
277  The associated STAR data block number.
278  The picked particle file name and parameters.
279  Orientation parameters for each particle.
280  Filament node locations.
281  Marker locations.
282 *************************************************************************/
284  Breconstruction* next; // Next reconstruction in list
285  Bstring id; // Reconstruction identifier
286  long select; // Selection flag
287  int block; // STAR data block number
288  int type; // Reconstruction type: 1-99 = spa; 100-199 = fil/hel; 200-299 = xtal; 300+ = tomo
289  Bstring symmetry; // Symmetry string
290  Bstring frec; // Reconstruction image file name
291  Bstring fpart; // Particle file name
292  Bstring ffil; // Filament file name
293  Bstring fft; // Fourier transform file name
294  Bstring fps; // Power spectrum file name
295  Vector3<double> voxel_size; // Nominal reconstruction voxel size
296  Vector3<double> origin; // Image origin (voxels)
298  View view; // View: 3-value vector and angle (radians)
299  Vector3<long> box_size; // Particle box size
300  double filament_width; // Filament width
301  double fil_node_radius; // Filament node radius
302  double bad_radius; // Radius of bad area around coordinates
303  double sf_radius; // Structure factor radius
304  double mark_radius; // Radius of marker
305  double fom; // Figure-of-merit for the reconstruction
306  CTFparam* ctf; // Contrast transfer function parameters
307  Bparticle* part; // First particle in linked list
308  Bfilament* fil; // First filament in linked list
309  Bbadarea* bad; // First bad area in linked list
310  Bmarker* mark; // First marker in linked list
311  Bstrucfac* sf; // First structure factor in linked list
312  Bstring* model; // First atomic model name in linked list
313 } ;
314 
315 /************************************************************************
316 @Object: struct Bproject
317 @Description:
318  Project parameter structure.
319 @Features:
320  A project is defined as a set of micrographs taken of a single
321  specimen and the associated reconstructions.
322  A specimen is understood to be the result of a particular
323  preparation method.
324  This structure is the top level in a hierarchy describing
325  micrographs and relationships between them.
326  Orientation parameters can be given as view vector and rotation angle
327  around the view vector (default).
328  Alternatively, orientation can be described by Euler angles.
329  Only one orientation representation is allowed to avoid ambiguity,
330  and the choice is indicated by the "Euler" flag.
331  Older software relying on the negative of the third Euler angle, -psi
332  or omega, can make use of the omega flag.
333  Multiple FOM's are allowed and the tags provide program-specific
334  descriptions of the FOM's in the particle structure
335 *************************************************************************/
336 struct Bproject {
337  Bproject* next; // Pointer to the next structure in the list
338  Bstring filename; // Parameter file name
339  Bstring comment; // Variable length comment field
340  int split; // Split code, 0=no split, 1-4=number of digits in file name, 9=use mg id's
341  Bstring* reference; // Linked list of reference map file names
342  int select; // Selects micrographs (0) or reconstructions (1)
343  int euler_flag; // Set if Euler angles are used
344  int omega_flag; // Set if omega is used in stead of psi
345  FOMType fom_tag[NFOM]; // STAR tags for up to NFOM FOM values
346  Bfield* field; // First field-of-view in list
347  Breconstruction* rec; // First reconstruction in list
348  Bparticle* class_avg; // 2D or 3D particle classes
349 } ;
350 
351 #define _ProjectParamStructs_
352 #endif
353 
354 // Function prototypes
356 Bproject* project_create(int nmg, int nrec);
358 //Bfield* field_add(Bfield** field, char* field_id);
359 Bfield* field_add(Bfield** field, Bstring& field_id);
361 Bframe* frame_add(Bframe** frame, int pid);
362 Bparticle* particle_add(Bparticle** part, int pid);
363 int mg_part_links(Bmicrograph* mg);
366 Bfilament* filament_add(Bfilament** fil, int pid);
367 Bfilnode* filament_node_add(Bfilnode** fnode, int pid);
368 double filament_length(Bfilament* fil);
371 int field_kill(Bfield* field);
373 int particle_kill(Bparticle* part);
374 int filament_kill(Bfilament* fil);
376 Bparticle* particle_copy(Bparticle** partlist, Bparticle* part);
377 Bparticle* particle_copy(Bparticle* partlist);
379 int project_update(Bproject* project, Bproject* proj_new, int fom_index);
380 int micrograph_update(Bmicrograph* mg, Bmicrograph* nu_mg, int fom_index, int flags);
381 int reconstruction_update(Breconstruction* rec, Breconstruction* nu_rec, int fom_index, int flags);
382 int particle_update(Bparticle* part, Bparticle* nu_part);
383 int particle_update(Bparticle** pnt_part, Bparticle* new_part, int fom_index);
388 long project_divide(Bproject* project, long n);
392 Bparticle** particle_array(Bparticle* partlist, int part_select, long &npart);
393 int project_revert_filenames(Bproject* project, Bproject* project_old, int flag);
394 int project_set_field_id(Bproject* project, int nseries, Bstring& field_id);
397 long project_dump(Bproject* project, Bstring& filename);
403 int project_set_magnification(Bproject* project, double mag);
404 int project_set_scan_sampling(Bproject* project, double sampling);
408 int project_set_tilt(Bproject* project, double tilt_axis, double tilt_angle);
410 int project_set_dose(Bproject* project, double dose);
413 int project_flip_origins(Bproject* project, int flip);
416 int project_set_particle_box_size(Bproject* project, long box_size);
421 int project_apply_map_magnifications(Bproject* project, int mag_num, float* mag);
422 long project_reset(Bproject* project, Bstring& reset);
423 View* views_from_project(Bproject* project, int selection);
424 Bstring get_fom_tag(FOMType fom_type);
425 int get_fom_tag(FOMType fom_type, char* tag);
426 
427 
428 
particle_array
Bparticle ** particle_array(Bparticle *partlist, int part_select, long &npart)
Sets up an array of selected particle pointers.
Definition: mg_processing.cpp:1360
Bmicrograph::helix_rise
double helix_rise
Definition: mg_processing.h:230
Bmicrograph::scale
Vector3< double > scale
Definition: mg_processing.h:224
project_kill
int project_kill(Bproject *project)
Frees a whole project.
Definition: mg_processing.cpp:429
micrograph_set_part_links
long micrograph_set_part_links(Bmicrograph *mg)
Sets the links from particles back to the micrograph.
Definition: mg_processing.cpp:1170
Bstrucfac::fom
double fom
Definition: mg_processing.h:164
FOM_PFT_CMP
@ FOM_PFT_CMP
Definition: mg_processing.h:50
Bbadarea::loc
Vector3< double > loc
Definition: mg_processing.h:146
Bmicrograph::sf
Bstrucfac * sf
Definition: mg_processing.h:246
Bmicrograph::id
Bstring id
Definition: mg_processing.h:203
Bmicrograph
Definition: mg_processing.h:201
FOM7
@ FOM7
Definition: mg_processing.h:60
Breconstruction::part
Bparticle * part
Definition: mg_processing.h:307
Breconstruction::id
Bstring id
Definition: mg_processing.h:285
Breconstruction::mark
Bmarker * mark
Definition: mg_processing.h:310
rec_part_links
int rec_part_links(Breconstruction *rec)
Sets the links from particles to reconstructions.
Definition: mg_processing.cpp:265
field_kill
int field_kill(Bfield *field)
Frees a whole field-of-view structure.
Definition: mg_processing.cpp:466
Bmicrograph::filament_width
double filament_width
Definition: mg_processing.h:234
project_sort_by_tilt
int project_sort_by_tilt(Bproject *project)
Sorts the micrographs in each field by tilt angle.
Definition: mg_select.cpp:1613
Breconstruction::fpart
Bstring fpart
Definition: mg_processing.h:291
FOM_HAND_A
@ FOM_HAND_A
Definition: mg_processing.h:46
Bframe::shift
Vector3< double > shift
Definition: mg_processing.h:78
FOM9
@ FOM9
Definition: mg_processing.h:62
Bstrucfac
Definition: mg_processing.h:156
Breconstruction::fil
Bfilament * fil
Definition: mg_processing.h:308
FOM8
@ FOM8
Definition: mg_processing.h:61
project_set_powerspectrum_path
int project_set_powerspectrum_path(Bproject *project, Bstring &path)
Sets the path to powerspectrum files for all the micrographs.
Definition: mg_processing.cpp:1824
Bbadarea::id
int id
Definition: mg_processing.h:145
project_update
int project_update(Bproject *project, Bproject *proj_new, int fom_index)
Updates an existing project with new information.
Definition: mg_processing.cpp:809
Bproject::rec
Breconstruction * rec
Definition: mg_processing.h:347
Blayerline::sel
long sel
Definition: mg_processing.h:183
project_show_hierarchy
long project_show_hierarchy(Bproject *project)
Shows the project hierarchy.
Definition: mg_processing.cpp:1506
Bproject::next
Bproject * next
Definition: mg_processing.h:337
Bproject::select
int select
Definition: mg_processing.h:342
Bparticle::view
View view
Definition: mg_processing.h:102
NFOM
#define NFOM
Definition: mg_processing.h:16
Bfilament
Definition: mg_processing.h:129
Bstring
Definition: Bstring.h:29
project_set_dose
int project_set_dose(Bproject *project, double dose)
Sets the electron dose of all the micrographs.
Definition: mg_processing.cpp:2099
field_add
Bfield * field_add(Bfield **field, Bstring &field_id)
Adds a field-of-view parameter structure to a linked list.
Definition: mg_processing.cpp:121
Breconstruction::voxel_size
Vector3< double > voxel_size
Definition: mg_processing.h:295
Bproject::split
int split
Definition: mg_processing.h:340
NoFOM
@ NoFOM
Definition: mg_processing.h:39
Bparticle
Definition: mg_processing.h:90
Bproject::field
Bfield * field
Definition: mg_processing.h:346
micrograph_kill
int micrograph_kill(Bmicrograph *mg)
Frees a whole micrograph parameter structure.
Definition: mg_processing.cpp:493
project_divide
long project_divide(Bproject *project, long n)
Divides a project into a number of micrograph subsets.
Definition: mg_processing.cpp:1204
Bstrucfac::sel
long sel
Definition: mg_processing.h:165
Breconstruction::ctf
CTFparam * ctf
Definition: mg_processing.h:306
symmetry.h
Header file for general symmetry functions.
FOMType
FOMType
Definition: mg_processing.h:38
Breconstruction::filament_width
double filament_width
Definition: mg_processing.h:300
Bmicrograph::bad_radius
double bad_radius
Definition: mg_processing.h:236
Breconstruction::fom
double fom
Definition: mg_processing.h:305
Bmicrograph::tilt_angle
double tilt_angle
Definition: mg_processing.h:220
project_set_part_pixel_size
int project_set_part_pixel_size(Bproject *project, Vector3< double > pixel_size)
Sets the pixel size for all the particles.
Definition: mg_processing.cpp:2042
Vector3< double >
reconstruction_set_part_links
long reconstruction_set_part_links(Breconstruction *rec)
Sets the links from particles back to the reconstruction.
Definition: mg_processing.cpp:1185
Bparticle::ast
double ast
Definition: mg_processing.h:98
filament_add
Bfilament * filament_add(Bfilament **fil, int pid)
Adds a filament parameter structure to a linked list.
Definition: mg_processing.cpp:319
Bstrucfac::loc
Vector3< double > loc
Definition: mg_processing.h:158
Bmicrograph::helix_axis
double helix_axis
Definition: mg_processing.h:229
Bfilament::next
Bfilament * next
Definition: mg_processing.h:130
FOM_HAND_B
@ FOM_HAND_B
Definition: mg_processing.h:47
Breconstruction::sf_radius
double sf_radius
Definition: mg_processing.h:303
Bmicrograph::img_num
int img_num
Definition: mg_processing.h:212
Bmicrograph::helix_radius
double helix_radius
Definition: mg_processing.h:232
Bfield::origin
Vector3< double > origin
Definition: mg_processing.h:263
Bproject::filename
Bstring filename
Definition: mg_processing.h:338
project_init
Bproject * project_init()
Initializes a micrograph processing project parameter structure.
Definition: mg_processing.cpp:30
Bparticle::fom
double fom[NFOM]
Definition: mg_processing.h:103
Bframe::fom
double fom
Definition: mg_processing.h:79
project_set_frame_path
int project_set_frame_path(Bproject *project, Bstring &path)
Sets the path to micrograph frames files for all the micrographs.
Definition: mg_processing.cpp:1795
FOM1
@ FOM1
Definition: mg_processing.h:54
Bparticle::mg
Bmicrograph * mg
Definition: mg_processing.h:105
Bmicrograph::sampling
double sampling
Definition: mg_processing.h:214
Breconstruction::box_size
Vector3< long > box_size
Definition: mg_processing.h:299
Bmicrograph::part
Bparticle * part
Definition: mg_processing.h:242
project_set_field_id
int project_set_field_id(Bproject *project, int nseries, Bstring &field_id)
Sets the field id's according to a regular series.
Definition: mg_processing.cpp:1456
Bfield::id
Bstring id
Definition: mg_processing.h:262
project_show_class_averages
long project_show_class_averages(Bproject *project)
Shows the class averages in a project.
Definition: mg_processing.cpp:1617
View
Definition: View.h:26
FOM_PFT_PRJ
@ FOM_PFT_PRJ
Definition: mg_processing.h:49
project_micrograph_array
Bmicrograph ** project_micrograph_array(Bproject *project, long &nmg)
Sets up an array of selected micrograph pointers.
Definition: mg_processing.cpp:1254
Bmicrograph::fpart
Bstring fpart
Definition: mg_processing.h:208
project_set_micrograph_origins
int project_set_micrograph_origins(Bproject *project, Vector3< double > origin)
Sets micrograph origins to the given origin.
Definition: mg_processing.cpp:2122
Breconstruction::mark_radius
double mark_radius
Definition: mg_processing.h:304
Bfield
Definition: mg_processing.h:260
Bmicrograph::lvec
Vector3< double > lvec
Definition: mg_processing.h:228
Blayerline::amp
double amp
Definition: mg_processing.h:181
Bsymmetry
Definition: symmetry.h:38
Bproject::omega_flag
int omega_flag
Definition: mg_processing.h:344
Blayerline::order
int order
Definition: mg_processing.h:178
project_rec_particle_array
Bparticle ** project_rec_particle_array(Bproject *project, int part_select, long &npart)
Sets up an array of selected particle pointers.
Definition: mg_processing.cpp:1324
Breconstruction::type
int type
Definition: mg_processing.h:288
Breconstruction::model
Bstring * model
Definition: mg_processing.h:312
Bmicrograph::fframe
Bstring fframe
Definition: mg_processing.h:207
Bbadarea
Definition: mg_processing.h:143
Bmicrograph::frame
Bframe * frame
Definition: mg_processing.h:240
FOM2
@ FOM2
Definition: mg_processing.h:55
project_create
Bproject * project_create(int nmg, int nrec)
Creates a micrograph processing project parameter structure.
Definition: mg_processing.cpp:48
marker.h
Header file for image parameter functions.
Bframe
Definition: mg_processing.h:75
Bmicrograph::dose
double dose
Definition: mg_processing.h:216
mg_part_links
int mg_part_links(Bmicrograph *mg)
Sets the links from particles to micrographs.
Definition: mg_processing.cpp:249
Bframe::id
int id
Definition: mg_processing.h:77
Bmarker
Definition: marker.h:21
FOM_SNR
@ FOM_SNR
Definition: mg_processing.h:43
Bfield::fom
double fom
Definition: mg_processing.h:266
Bmicrograph::fil
Bfilament * fil
Definition: mg_processing.h:243
Breconstruction::origin
Vector3< double > origin
Definition: mg_processing.h:296
Bstrucfac::sigamp
double sigamp
Definition: mg_processing.h:161
project_set_rec_voxel_size
int project_set_rec_voxel_size(Bproject *project, Vector3< double > pixel_size)
Sets the pixel size for all the reconstructions.
Definition: mg_processing.cpp:2021
project
Bproject * project
Definition: bshow.cpp:33
Matrix3
Definition: Matrix3.h:18
Bframe::sel
long sel
Definition: mg_processing.h:80
project_set_mg_pixel_size
int project_set_mg_pixel_size(Bproject *project, Vector3< double > pixel_size)
Sets the pixel size for all the micrographs.
Definition: mg_processing.cpp:1997
Bfilament::id
int id
Definition: mg_processing.h:132
project_merge_part_parameters
int project_merge_part_parameters(Bproject *project, Bproject *partproject)
Puts particle parameters from one project into another.
Definition: mg_processing.cpp:1118
project_set_particle_path
int project_set_particle_path(Bproject *project, Bstring &path)
Sets the path to particle files for all the micrographs.
Definition: mg_processing.cpp:1853
Bmicrograph::ffil
Bstring ffil
Definition: mg_processing.h:209
Bparticle::fpart
Bstring fpart
Definition: mg_processing.h:92
FOM6
@ FOM6
Definition: mg_processing.h:59
Bstrucfac::phi
double phi
Definition: mg_processing.h:162
project_dump
long project_dump(Bproject *project, Bstring &filename)
Dumps particle info in the project hierarchy.
Definition: mg_processing.cpp:1646
Bmicrograph::level_angle
double level_angle
Definition: mg_processing.h:221
FOM_CC_AVG
@ FOM_CC_AVG
Definition: mg_processing.h:44
FOM4
@ FOM4
Definition: mg_processing.h:57
FOM_RFACTORAB
@ FOM_RFACTORAB
Definition: mg_processing.h:51
Bmicrograph::origin
Vector3< double > origin
Definition: mg_processing.h:223
FOM5
@ FOM5
Definition: mg_processing.h:58
project_set_particle_asu_views
int project_set_particle_asu_views(Bproject *project, Bstring &symmetry_asu)
Sets particle views within the asymmetric unit.
Definition: mg_processing.cpp:2383
Bfilnode::id
int id
Definition: mg_processing.h:118
get_fom_tag
Bstring get_fom_tag(FOMType fom_type)
Returns the tag associated with a particular FOM.
Definition: mg_processing.cpp:2612
Bmicrograph::hvec
Vector3< double > hvec
Definition: mg_processing.h:226
Bmicrograph::magnification
double magnification
Definition: mg_processing.h:213
ctf.h
Header file for CTF (contrast transfer function) functions.
Bmicrograph::tilt_axis
double tilt_axis
Definition: mg_processing.h:219
project_set_tilt
int project_set_tilt(Bproject *project, double tilt_axis, double tilt_angle)
Sets the tilt parameters for all the micrographs.
Definition: mg_processing.cpp:2076
Bstrucfac::amp
double amp
Definition: mg_processing.h:160
project_rotate_particle_views
int project_rotate_particle_views(Bproject *project, View view)
Rotates particle views with respect to a reference view.
Definition: mg_processing.cpp:2429
part_find_first
Bparticle * part_find_first(Bproject *project)
Finds the first particle in a project.
Definition: mg_processing.cpp:283
reconstruction_update
int reconstruction_update(Breconstruction *rec, Breconstruction *nu_rec, int fom_index, int flags)
Updates an existing reconstruction with new information.
Definition: mg_processing.cpp:982
Bfilament::node
Bfilnode * node
Definition: mg_processing.h:133
Bproject
Definition: mg_processing.h:336
Bstrucfac::next
Bstrucfac * next
Definition: mg_processing.h:157
Bmicrograph::kvec
Vector3< double > kvec
Definition: mg_processing.h:227
COVERAGE
@ COVERAGE
Definition: mg_processing.h:52
Bbadarea::next
Bbadarea * next
Definition: mg_processing.h:144
part_select
Tcl_Obj * part_select(Bparticle *part, int objc, Tcl_Obj *CONST objv[])
Definition: tcltk_bmg.cpp:563
Bparticle::sel
long sel
Definition: mg_processing.h:104
Bparticle::pixel_size
Vector3< double > pixel_size
Definition: mg_processing.h:99
FOM_PFT_CC
@ FOM_PFT_CC
Definition: mg_processing.h:48
FOM_CC_STD
@ FOM_CC_STD
Definition: mg_processing.h:45
Bstring.h
Header file for the string class.
project_equal_mg_part_files
int project_equal_mg_part_files(Bproject *project)
Sets micrograph and particle files to be the same.
Definition: mg_processing.cpp:88
project_set_filament_path
int project_set_filament_path(Bproject *project, Bstring &path)
Sets the path to filament files for all the micrographs.
Definition: mg_processing.cpp:1903
project_set_part_links
long project_set_part_links(Bproject *project)
Sets the links from particles back to the micrographs and reconstructions.
Definition: mg_processing.cpp:1148
Bmicrograph::mark_radius
double mark_radius
Definition: mg_processing.h:238
Bfilament::ffil
Bstring ffil
Definition: mg_processing.h:131
Bparticle::loc
Vector3< double > loc
Definition: mg_processing.h:100
Blayerline::next
Blayerline * next
Definition: mg_processing.h:176
Breconstruction::fft
Bstring fft
Definition: mg_processing.h:293
FOM_CC
@ FOM_CC
Definition: mg_processing.h:41
Bfilnode::next
Bfilnode * next
Definition: mg_processing.h:117
Breconstruction::symmetry
Bstring symmetry
Definition: mg_processing.h:289
Breconstruction::fil_node_radius
double fil_node_radius
Definition: mg_processing.h:301
Bstrucfac::index
Vector3< int > index
Definition: mg_processing.h:159
Breconstruction::sf
Bstrucfac * sf
Definition: mg_processing.h:311
Bmicrograph::box_size
Vector3< long > box_size
Definition: mg_processing.h:233
Bfield::matrix
Matrix3 matrix
Definition: mg_processing.h:264
Breconstruction
Definition: mg_processing.h:283
Breconstruction::select
long select
Definition: mg_processing.h:286
Bparticle::def
double def
Definition: mg_processing.h:96
Bmicrograph::matrix
Matrix3 matrix
Definition: mg_processing.h:225
Bmicrograph::fmg
Bstring fmg
Definition: mg_processing.h:206
reconstruction_kill
int reconstruction_kill(Breconstruction *rec)
Frees a whole reconstruction parameter structure.
Definition: mg_processing.cpp:582
Bproject::class_avg
Bparticle * class_avg
Definition: mg_processing.h:348
Bfield::select
long select
Definition: mg_processing.h:265
project_renumber_particles
long project_renumber_particles(Bproject *project)
Renumbers particles.
Definition: mg_processing.cpp:2247
project_set_particle_box_size
int project_set_particle_box_size(Bproject *project, Vector3< long > box_size)
Sets particle box size to the given value.
Definition: mg_processing.cpp:2284
CTFparam
Definition: ctf.h:28
Bmicrograph::fom
double fom
Definition: mg_processing.h:239
particle_add
Bparticle * particle_add(Bparticle **part, int pid)
Adds a particle parameter structure to a linked list.
Definition: mg_processing.cpp:221
project_revert_filenames
int project_revert_filenames(Bproject *project, Bproject *project_old, int flag)
Reverts file names to what it was in an old project.
Definition: mg_processing.cpp:1388
Bmicrograph::ctf
CTFparam * ctf
Definition: mg_processing.h:241
Bproject::euler_flag
int euler_flag
Definition: mg_processing.h:343
Bparticle::dev
double dev
Definition: mg_processing.h:97
Bfield::next
Bfield * next
Definition: mg_processing.h:261
project_set_particle_origins
int project_set_particle_origins(Bproject *project, Vector3< double > origin)
Sets particle origins to given values.
Definition: mg_processing.cpp:2348
Bmicrograph::mark
Bmarker * mark
Definition: mg_processing.h:245
project_flip_origins
int project_flip_origins(Bproject *project, int flip)
Flip origin coordinates.
Definition: mg_processing.cpp:2196
Bparticle::ori
Vector3< double > ori
Definition: mg_processing.h:101
Bparticle::group
int group
Definition: mg_processing.h:94
Bstrucfac::sigphi
double sigphi
Definition: mg_processing.h:163
Bmicrograph::intensity
double intensity
Definition: mg_processing.h:217
View.h
View object.
project_mg_particle_array
Bparticle ** project_mg_particle_array(Bproject *project, int part_select, long &npart)
Sets up an array of selected particle pointers.
Definition: mg_processing.cpp:1282
Bmicrograph::block
int block
Definition: mg_processing.h:205
micrograph_add
Bmicrograph * micrograph_add(Bmicrograph **mg, Bstring &mg_id)
Adds a micrograph parameter structure to a linked list.
Definition: mg_processing.cpp:154
Breconstruction::bad_radius
double bad_radius
Definition: mg_processing.h:302
Bparticle::next
Bparticle * next
Definition: mg_processing.h:91
Bmicrograph::rot_angle
double rot_angle
Definition: mg_processing.h:222
project_set_scan_sampling
int project_set_scan_sampling(Bproject *project, double sampling)
Sets the scan sampling for all the micrographs.
Definition: mg_processing.cpp:1977
Bmicrograph::select
long select
Definition: mg_processing.h:204
Breconstruction::block
int block
Definition: mg_processing.h:287
Breconstruction::scale
Vector3< double > scale
Definition: mg_processing.h:297
Bmicrograph::helix_angle
double helix_angle
Definition: mg_processing.h:231
Bmicrograph::fps
Bstring fps
Definition: mg_processing.h:211
Breconstruction::ffil
Bstring ffil
Definition: mg_processing.h:292
Bfilnode::loc
Vector3< double > loc
Definition: mg_processing.h:119
particle_copy
Bparticle * particle_copy(Bparticle **partlist, Bparticle *part)
Adds one particle onto a list of particle parameters.
Definition: mg_processing.cpp:614
Breconstruction::bad
Bbadarea * bad
Definition: mg_processing.h:309
Breconstruction::frec
Bstring frec
Definition: mg_processing.h:290
Blayerline::distance
double distance
Definition: mg_processing.h:179
Blayerline::freq
double freq
Definition: mg_processing.h:180
frame_add
Bframe * frame_add(Bframe **frame, int pid)
Adds a movie frame parameter structure to a linked list.
Definition: mg_processing.cpp:189
views_from_project
View * views_from_project(Bproject *project, int selection)
Retrieves the particle views from a project.
Definition: mg_processing.cpp:2566
filament_kill
int filament_kill(Bfilament *fil)
Frees a list of filaments.
Definition: mg_processing.cpp:552
Bproject::reference
Bstring * reference
Definition: mg_processing.h:341
Bmicrograph::wri
double wri
Definition: mg_processing.h:218
Bmicrograph::pixel_size
Vector3< double > pixel_size
Definition: mg_processing.h:215
project_set_magnification
int project_set_magnification(Bproject *project, double mag)
Sets the magnification for all the micrographs.
Definition: mg_processing.cpp:1954
Bmicrograph::fil_node_radius
double fil_node_radius
Definition: mg_processing.h:235
Bproject::comment
Bstring comment
Definition: mg_processing.h:339
project_reset
long project_reset(Bproject *project, Bstring &reset)
Reset a particle parameter from its micrograph.
Definition: mg_processing.cpp:2516
Blayerline::fom
double fom
Definition: mg_processing.h:182
Bmicrograph::layer
Blayerline * layer
Definition: mg_processing.h:247
Bfilnode
Definition: mg_processing.h:116
particle_kill
int particle_kill(Bparticle *part)
Frees a list of particles.
Definition: mg_processing.cpp:528
Euler.h
Euler object.
Bmicrograph::bad
Bbadarea * bad
Definition: mg_processing.h:244
FOM_CV
@ FOM_CV
Definition: mg_processing.h:42
reconstruction_add
Breconstruction * reconstruction_add(Breconstruction **rec, Bstring &rec_id)
Adds a reconstruction parameter structure to a linked list.
Definition: mg_processing.cpp:398
Breconstruction::fps
Bstring fps
Definition: mg_processing.h:294
Bparticle::mag
double mag
Definition: mg_processing.h:95
filament_node_add
Bfilnode * filament_node_add(Bfilnode **fnode, int pid)
Adds a filament node parameter structure to a linked list.
Definition: mg_processing.cpp:349
micrograph_update
int micrograph_update(Bmicrograph *mg, Bmicrograph *nu_mg, int fom_index, int flags)
Updates an existing micrograph with new information.
Definition: mg_processing.cpp:878
particle_update
int particle_update(Bparticle *part, Bparticle *nu_part)
Updates one existing particle with new information.
Definition: mg_processing.cpp:1026
Bframe::next
Bframe * next
Definition: mg_processing.h:76
Bmicrograph::next
Bmicrograph * next
Definition: mg_processing.h:202
Bparticle::rec
Breconstruction * rec
Definition: mg_processing.h:106
Blayerline
Definition: mg_processing.h:175
project_add_origins_to_coords
int project_add_origins_to_coords(Bproject *project)
Adds the particle origins to the micrograph coordinates.
Definition: mg_processing.cpp:2154
Bfield::mg
Bmicrograph * mg
Definition: mg_processing.h:267
Bmicrograph::sf_radius
double sf_radius
Definition: mg_processing.h:237
Bparticle::id
int id
Definition: mg_processing.h:93
Blayerline::number
int number
Definition: mg_processing.h:177
project_apply_map_magnifications
int project_apply_map_magnifications(Bproject *project, int mag_num, float *mag)
Change particle pixel sizes for particles based on map magnifications.
Definition: mg_processing.cpp:2471
filament_length
double filament_length(Bfilament *fil)
Calculates the length of a filament.
Definition: mg_processing.cpp:375
FOM3
@ FOM3
Definition: mg_processing.h:56
micrograph_copy
Bmicrograph * micrograph_copy(Bmicrograph *mg)
Copies a micrograph.
Definition: mg_processing.cpp:735
project_set_micrograph_path
int project_set_micrograph_path(Bproject *project, Bstring &path)
Sets the path to micrograph files for all the micrographs.
Definition: mg_processing.cpp:1766
FOM
@ FOM
Definition: mg_processing.h:40
Bmicrograph::fft
Bstring fft
Definition: mg_processing.h:210
DENSITY
@ DENSITY
Definition: mg_processing.h:53
Breconstruction::view
View view
Definition: mg_processing.h:298
Breconstruction::next
Breconstruction * next
Definition: mg_processing.h:284
Bproject::fom_tag
FOMType fom_tag[NFOM]
Definition: mg_processing.h:345