1 | #ifndef __RFL_GEOMETRY__
|
---|
2 | #define __RFL_GEOMETRY__
|
---|
3 |
|
---|
4 | #define ITEM_LIST /* LIST OF ITEMS IN THE CT DEFINITION FILE */ \
|
---|
5 | T(type), /* type of definition file */ \
|
---|
6 | T(focal_distance), /* focal distance */ \
|
---|
7 | T(focal_std), /* std(focal distance) */ \
|
---|
8 | T(point_spread), /* point spread */ \
|
---|
9 | T(point_std), /* std(point spread) */ \
|
---|
10 | T(adjustment_dev), /* std of adjustment deviation */ \
|
---|
11 | T(black_spot), /* radius of the black spot in center of mirrors */ \
|
---|
12 | T(n_mirrors), /* number of mirrors */ \
|
---|
13 | T(r_mirror), /* radius of one mirror */ \
|
---|
14 | T(camera_width), /* camera width */ \
|
---|
15 | T(n_pixels), /* number of pixels in the camera */ \
|
---|
16 | T(pixel_width), /* pixel width */ \
|
---|
17 | T(refl_file), /* path of file containing refl. data */ \
|
---|
18 | T(axisdev_file), /* path of file containing axis dev. data */ \
|
---|
19 | T(define_mirrors) /* this entry is followed by the def. of pixels */
|
---|
20 |
|
---|
21 | #define T(x) x /* define T() as the name as it is */
|
---|
22 | enum { ITEM_LIST };
|
---|
23 | #undef T
|
---|
24 |
|
---|
25 | #define T(x) #x /* define T() as the string of x */
|
---|
26 | const char *ctparms[] = { ITEM_LIST };
|
---|
27 | #undef T
|
---|
28 | #undef ITEM_LIST
|
---|
29 |
|
---|
30 | /* Strings */
|
---|
31 | #define TYPE_ERROR_FTL /* no parms */ \
|
---|
32 | "This version of Reflector handles only MAGIC.\n" \
|
---|
33 | " *** Please change \"ct_type\" in geometry file accordingly.\n"
|
---|
34 | #define MIRR_NSPEC_FTL /* no parms */ \
|
---|
35 | "The number of mirrors is needed for further processing.\n" \
|
---|
36 | " *** Please specify it after the \"n_mirrors\" directive.\n"
|
---|
37 | #define LOG__FLOAT_LOG /* floatname, value */ \
|
---|
38 | "<%s> set at %.2f.\n"
|
---|
39 | #define LOG__INT___LOG /* intname, value */ \
|
---|
40 | "<%s> set at %d.\n"
|
---|
41 | #define MIRR_TABLE_LOG /* no parms */ \
|
---|
42 | "Start reading mirror data.\n"
|
---|
43 | #define MIRR_ALLOC_FTL /* nr of mirrors */ \
|
---|
44 | "Cannot allocate enough memory space for %d mirrors.\n"
|
---|
45 | #define MIRR_ALLOC_LOG /* nr of mirrors */ \
|
---|
46 | "Allocated memory for %d mirrors.\n"
|
---|
47 | #define BINF_OPEN__LOG /* bin. data filename */ \
|
---|
48 | "Located and opened file \"%s\" containing mirror data.\n"
|
---|
49 | #define READ_ASCII_LOG /* no parms */ \
|
---|
50 | "Start reading ASCII data for mirror nr:\n"
|
---|
51 | #define MIRR_FEW___FTL /* mirrors read */ \
|
---|
52 | "Not enough mirror data: only %d mirrors read.\n"
|
---|
53 | #define BINF_ERROR_LOG /* bin. data filename */ \
|
---|
54 | "Cannot write mirror data on binary file:\n %s\n" \
|
---|
55 | " *** Skipping operation and proceeding.\n"
|
---|
56 | #define BINF_WRITE_LOG /* bin. data filename */ \
|
---|
57 | "Binary data written in file \"%s\".\n"
|
---|
58 | #define RFLF_ERROR_FTL /* reflectivity fname */ \
|
---|
59 | "Cannot find file \"%s\" containing data on reflectivity.\n"
|
---|
60 | #define REFL_ALLOC_FTL /* nr of refl items */ \
|
---|
61 | "Cannot allocate enough memory space for %d refl. data.\n"
|
---|
62 | #define AXIS_ERROR_FTL /* axis dev fname */ \
|
---|
63 | "Cannot find file \"%s\" containing data on axis dev.\n"
|
---|
64 | #define AXIS_ALLOC_FTL /* nr of a/d items */ \
|
---|
65 | "Cannot allocate enough memory space for %d axis dev. data.\n"
|
---|
66 | #define AXIS_FEW___FTL /* read, total items */ \
|
---|
67 | "Found only %d out of %d axis dev. data.\n"
|
---|
68 | #define FOCL_FEW___FTL /* nr of focal items */ \
|
---|
69 | "Cannot allocate enough memory space for %d focal data.\n"
|
---|
70 |
|
---|
71 | /* pre-defined filenames / values */
|
---|
72 |
|
---|
73 | #define REFLECTIVITY_FILE "../Data/reflectivity.dat"
|
---|
74 | #define AXISDEVIATION_FILE "../Data/axisdev.dat"
|
---|
75 |
|
---|
76 | static char EVTH[] = "EVTH";
|
---|
77 |
|
---|
78 | /* maximum deviation from the original direction with
|
---|
79 | * "random_pointing" option
|
---|
80 | *
|
---|
81 | * now is 6 degrees = 0.104719755119660 radians
|
---|
82 | */
|
---|
83 |
|
---|
84 | #define RANDOM_POINTING_MAX_SEPARATION 0.104719755119660
|
---|
85 |
|
---|
86 | #endif
|
---|