-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReconstructionParameters.h
More file actions
executable file
·113 lines (92 loc) · 2.94 KB
/
Copy pathReconstructionParameters.h
File metadata and controls
executable file
·113 lines (92 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//
// Created by Arkadiy on 09/09/2016.
//
#ifndef MEERKAT2_EXPERIMENTALPARAMETERS_H
#define MEERKAT2_EXPERIMENTALPARAMETERS_H
#include "misc.h"
struct ExperimentalParameters {
string format;
size_t starting_frame;
float starting_angle, oscillation_angle;
vec3 oscillation_axis;
float wavelength;
vec3 wavevector;
size_t space_group_nr;
vec6 cell;
matrix_3x3 cell_vectors;
size_t number_of_detector_segments;
size_t NX,NY;
float pixel_size_x,pixel_size_y,x_center, y_center, distance_to_detector;
vec3 detector_x, detector_y, detector_normal;
float detector_segment_crossection[5];
float detector_segment_geometry[9];
vec3 polarization_plane_normal;
float polarization_factor;
string detector;
float detector_thickness;
ExperimentalParameters() :
polarization_plane_normal(0, 1, 0),
polarization_factor(0.5)
{}
};
struct ReconstructionParameters {
string mask_filename;
string data_filename_template;
string hdf5_dataset_name;
string xparm_filename;
size_t first_image;
size_t last_image;
size_t number_of_pixels[3];
reciprocal_fractional_t lower_limits[3];
reciprocal_fractional_t step_sizes[3];
reciprocal_fractional_t inv_step_sizes[3];
bool reconstruct_in_orthonormal_basis;
//measured_pixels in some format - missing in the baseline
size_t microsteps[3];
size_t frame_increment;
//unit_cell_transform_matrix=np.eye(3) //missing in baseline
string output_filename;
size_t size_of_cache;
ReconstructionParameters() :
data_filename_template(""),
xparm_filename(""),
hdf5_dataset_name(""),
output_filename(""),
mask_filename(""),
first_image(1),
last_image(numeric_limits<size_t>::max()),
number_of_pixels{701,701,701},
lower_limits{NAN,NAN,NAN},
step_sizes{NAN,NAN,NAN},
reconstruct_in_orthonormal_basis{false},
size_of_cache{100},
microsteps{1,1,1},
frame_increment{1}
{}
ExperimentalParameters exp;
// microsteps = microsteps[2]
// if microsteps < 1:
// image_increment = 1 / microsteps
// assert (np.mod(image_increment, 1) == 0)
// microsteps = 1
// else:
// image_increment = 1
// output_filename='reconstruction.h5',
// size_of_cache=100,
// all_in_memory=False,
// override=False,
// scale=None):
};
struct ContextAroundPosition {
string lines_before;
string current_line;
string lines_after;
int pos_within_current_line;
int line_number;
string context;
};
bool operator== (const ContextAroundPosition& a, const ContextAroundPosition& b);
ContextAroundPosition get_context(istream& in);
void load_xparm(string filename, ExperimentalParameters & r);
ReconstructionParameters load_refinement_parameters(string filename);
#endif //MEERKAT2_EXPERIMENTALPARAMETERS_H