Hi I wish to write code that allows me to access the specific column of 1, 2 and 4 respectively. That is detector number, crystal number and theta columns in the data configuration file shown below.
The configuration file I wish to access has data written in this format.
CONFIGURATION FILE
1st column: detector number
2nd column: crystal number
3rd column: ring
4th column: theta
5th column: phi
6th column: include flag (0 to throw away)
1 1 1 157.6 0 1
2 2 1 157.6 72 1
3 3 1 157.6 144 1
4 4 1 157.6 216 1
5 5 1 157.6 288 1
6 6 2 133.5 18 1
7 7 2 133.5 54 1
8 8 2 133.5 90 1
9 9 2 133.5 126 1
10 10 2 133.5 162 1
11 11 2 133.5 198 1
12 12 2 133.5 234 1
13 13 2 133.5 270 1
14 14 2 133.5 306 1
15 15 2 133.5 342 1
16 16 1 109.0 19.5 1
16 17 1 109.0 10.5 1
16 18 2 100.0 10.5 1
16 19 2 100.0 19.5 1
17 20 1 109.0 49.5 1
17 21 1 109.0 40.5 1
17 22 2 100.0 40.5 1
17 23 2 100.0 49.5 1
18 24 1 109.0 79.5 1
18 25 1 109.0 70.5 1
18 26 2 100.0 70.5 1
18 27 2 100.0 79.5 1
19 28 1 109.0 109.5 1
19 29 1 109.0 100.5 1
19 30 2 100.0 100.5 1
19 31 2 100.0 109.5 1
20 32 1 109.0 139.5 1
20 33 1 109.0 130.5 1
20 34 2 100.0 130.5 1
20 35 2 100.0 139.5 1
21 36 1 109.0 169.5 1
21 37 1 109.0 160.5 1
21 38 2 100.0 160.5 1
21 39 2 100.0 169.5 1
22 40 1 109.0 199.5 1
22 41 1 109.0 190.5 1
22 42 2 100.0 190.5 1
22 43 2 100.0 199.5 1
23 44 1 109.0 229.5 1
23 45 1 109.0 220.5 1
23 46 2 100.0 220.5 1
23 47 2 100.0 229.5 1
24 48 0 0 0 0
24 49 0 0 0 0
24 50 0 0 0 0
24 51 0 0 0 0
25 52 1 109.0 289.5 1
25 53 1 109.0 280.5 1
25 54 2 100.0 280.5 1
25 55 2 100.0 289.5 1
26 56 1 109.0 319.5 1
26 57 1 109.0 310.5 1
26 58 2 100.0 310.5 1
26 59 2 100.0 319.5 1
27 60 1 109.0 349.5 1
27 61 1 109.0 340.5 1
27 62 2 100.0 340.5 1
27 63 2 100.0 349.5 1
28 64 4 71.0 10.5 1
28 65 4 71.0 19.5 1
28 66 3 80.0 19.5 1
28 67 3 80.0 10.5 1
29 68 4 71.0 40.5 1
29 69 4 71.0 49.5 1
29 70 3 80.0 49.5 1
29 71 3 80.0 40.5 1
30 72 4 71.0 70.5 1
30 73 4 71.0 79.5 1
30 74 3 80.0 79.5 1
30 75 3 80.0 70.5 1
31 76 4 71.0 100.5 1
31 77 4 71.0 109.5 1
31 78 3 80.0 109.5 1
31 79 3 80.0 100.5 1
32 80 4 71.0 130.5 1
32 81 4 71.0 139.5 1
32 82 3 80.0 139.5 1
32 83 3 80.0 130.5 1
33 84 4 71.0 160.5 1
33 85 4 71.0 169.5 1
33 86 3 80.0 169.5 1
33 87 3 80.0 160.5 1
34 88 4 71.0 190.5 1
34 89 4 71.0 199.5 1
34 90 3 80.0 199.5 1
34 91 3 80.0 190.5 1
35 92 4 71.0 220.5 1
35 93 4 71.0 229.5 1
35 94 3 80.0 229.5 1
35 95 3 80.0 220.5 1
36 96 4 71.0 250.5 1
36 97 4 71.0 259.5 1
36 98 3 80.0 259.5 1
36 99 3 80.0 250.5 1
37 100 4 71.0 280.5 1
37 101 4 71.0 289.5 1
37 102 3 80.0 289.5 1
37 103 3 80.0 280.5 1
38 104 4 71.0 310.5 1
38 105 4 71.0 319.5 1
38 106 3 80.0 319.5 1
38 107 3 80.0 310.5 1
39 108 4 71.0 340.5 1
39 109 4 71.0 349.5 1
39 110 3 80.0 349.5 1
39 111 3 80.0 340.5 1
So can anyone help me with how I can write code in my program to access this configuration file and read the data only in columns 1,2 and 4
Any help would be appreciated.