YoGA Ao features » Historique » Version 6
Julien Brule, 18/06/2012 14:27
1 | 1 | Julien Brule | h1. YoGA Ao features |
---|---|---|---|
2 | |||
3 | The YoGA_Ao library contains routines to simulate the whole process of image formation through the atmosphere, a telescope and an adaptive optics (AO) system. Following [[ the YoGA Philosophy ]] YoGA_Ao is designed around a double-sided API: a Yorick API (called hereafter high-level routines) and CUDA-C API accessible to the interpreter through Yorick wrappers (called hereafter advanced routines). |
||
4 | |||
5 | There are two ways to use YoGA_Ao, either through the GUI or through the command line possibly using predefined scripts. The following description is valid for both ways but is probably more relevant to command line users. The main difference between the GUI and the command line interface is the way the simulation parameters are imported. In the latter case, the simulation parameters are centralized into a parameter file (.par). Examples of .par files are given in the data/par directory and can be used as templates. The high-level API contains a dedicated routine to read the parameters from this file and import them in the simulation environment. |
||
6 | |||
7 | 3 | Julien Brule | [[YoGA_Ao_features#List_of_features]] |
8 | 1 | Julien Brule | |
9 | h2. List of features |
||
10 | 4 | Julien Brule | |
11 | Each API comes with a set of structures concentrating the configuration parameters for the simulation as well as various data used for computation and diagnostics. For the Yorick API, the list of structures can be found in the file yoga_ao_ystruct.i. Concerning the CUDA-C API, please refer to the file yoga_ao.cpp. Available features include: |
||
12 | |||
13 | * Kolmogorov-type turbulence generation over an arbitrary number of layers with arbitrary properties. |
||
14 | * Shack-Hartmann wavefront sensing including Laser Guide Stars (LGS) |
||
15 | * Short and long exposure imaging under the turbulence |
||
16 | |||
17 | h3. Simulation geometry |
||
18 | |||
19 | 6 | Julien Brule | The main parameter that drives most of the choices for the simulation geometry is the Fried parameter r0. Typically, for an adequate sampling, the equivalent size of the pixels we use to simulate the turbulent phase screens should be less than half r0. To ensure a good sampling, in YoGA_Ao, r0 is simulated on about 6 pixels. This ratio defines the size of the "quantum" pixels and thus the size of the phase screens to simulate (as compared to the telescope size). From this screen size, the full images size is defined, taking into account the sampling required for imaging. |
20 | 4 | Julien Brule | |
21 | As an example, in the case of an ELT, the linear size of the phase screen support (and thus of the pupil) is of the order of 1.5k to 2k pixels. This means that the linear size of the image will be at least 4k (for a minimum Shannon sampling). This is a very large number which will imply heavy computations. |
||
22 | |||
23 | To cope for these various requirements we can define 3 different pupils: |
||
24 | |||
25 | * the large pupil (called ipupil) defined on the largest support (4kx4k in our previous example) more than half of which being 0 |
||
26 | |||
27 | * the small pupil (spupil) defined only on the pupil size (2kx2k in our previous example) most of it being 1 |
||
28 | |||
29 | * the medium pupil (mpupil) defined on a slightly larger support: typically 4 additional pixels as a guard band on each size. This guard band is useful for manipulations on phase screens like raytracing. This is also the actual size of the ground layer phase screen. |
||
30 | |||
31 | The image below helps to understand the various pupil sizes. White is the pupil, green is the support of spupil, blue the support of mpupil et black the support of ipupil. |
||
32 | |||
33 | 6 | Julien Brule | !https://dev-lesia.obspm.fr/projets/attachments/download/570/pupil.png! |
34 | 1 | Julien Brule | |
35 | 6 | Julien Brule | All these pupils are contained in arrays accessible as internal keywords of the following geom structure available from the Yorick API : |
36 | |||
37 | <pre> |
||
38 | <code class="c"> |
||
39 | struct geom_struct |
||
40 | { |
||
41 | long ssize; // linear size of full image (in pixels) |
||
42 | float zenithangle; // observations zenith angle (in deg) |
||
43 | // internal keywords |
||
44 | long pupdiam; // linear size of total pupil (in pixels) |
||
45 | float cent; // central point of the simulation |
||
46 | pointer _ipupil; // total pupil (include full guard band) |
||
47 | pointer _mpupil; // medium pupil (part of the guard band) |
||
48 | pointer _spupil; // small pupil (without guard band) |
||
49 | ... |
||
50 | }; |
||
51 | |||
52 | </code> |
||
53 | </pre> |
||
54 | |||
55 | some keywords have not been reported. Please check yoga_ao_ystruct.i for more details. |
||
56 | |||
57 | In this structure pupdiam (the diameter in pixels of the pupil is considered as an internal keyword). Two other structures contain the rest of the configuration parameters : |
||
58 | |||
59 | <pre> |
||
60 | <code class="c"> |
||
61 | struct tel_struct |
||
62 | { |
||
63 | float diam; // telescope diameter (in meters) |
||
64 | float cobs; // central obstruction ratio |
||
65 | }; |
||
66 | </code> |
||
67 | </pre> |
||
68 | |||
69 | <pre> |
||
70 | <code class="c"> |
||
71 | struct loop_struct |
||
72 | { |
||
73 | long niter; // number of iterations |
||
74 | float ittime; // iteration time (in sec) |
||
75 | }; |
||
76 | </code> |
||
77 | </pre> |
||
78 | |||
79 | There is one high-level routines to init the geometry with only one parameter: the pupil diameter in pixels. |
||
80 | |||
81 | <pre> |
||
82 | <code class="c"> |
||
83 | func geom_init(pupdiam) |
||
84 | /* DOCUMENT geom_init |
||
85 | geom_init,pupdiam |
||
86 | inits simulation geometry, depending on pupdiam |
||
87 | the linear number of pixels in the pupil |
||
88 | */ |
||
89 | |||
90 | </code> |
||
91 | </pre> |
||
92 | |||
93 | |||
94 | |||
95 | |||
96 | |||
97 | 1 | Julien Brule | h3. Turbulence generation |
98 | 6 | Julien Brule | |
99 | <pre> |
||
100 | <code class="c"> |
||
101 | </code> |
||
102 | </pre> |
||
103 | |||
104 | |||
105 | <pre> |
||
106 | <code class="c"> |
||
107 | </code> |
||
108 | </pre> |
||
109 | |||
110 | |||
111 | <pre> |
||
112 | <code class="c"> |
||
113 | </code> |
||
114 | </pre> |
||
115 | |||
116 | <pre> |
||
117 | <code class="c"> |
||
118 | </code> |
||
119 | </pre> |
||
120 | |||
121 | <pre> |
||
122 | <code class="c"> |
||
123 | </code> |
||
124 | </pre> |
||
125 | |||
126 | |||
127 | <pre> |
||
128 | <code class="c"> |
||
129 | </code> |
||
130 | </pre> |
||
131 | |||
132 | |||
133 | <pre> |
||
134 | <code class="c"> |
||
135 | </code> |
||
136 | </pre> |
||
137 | |||
138 | <pre> |
||
139 | <code class="c"> |
||
140 | </code> |
||
141 | </pre> |
||
142 | |||
143 | <pre> |
||
144 | <code class="c"> |
||
145 | </code> |
||
146 | </pre> |
||
147 | |||
148 | |||
149 | |||
150 | |||
151 | |||
152 | |||
153 | |||
154 | |||
155 | 1 | Julien Brule | h3. Wavefront Sensing |
156 | 6 | Julien Brule | |
157 | |||
158 | <pre> |
||
159 | <code class="c"> |
||
160 | </code> |
||
161 | </pre> |
||
162 | |||
163 | |||
164 | |||
165 | 1 | Julien Brule | h3. Image formation |
166 | |||
167 | 6 | Julien Brule | <pre> |
168 | <code class="c"> |
||
169 | </code> |
||
170 | </pre> |
||
171 | |||
172 | |||
173 | |||
174 | |||
175 | |||
176 | 4 | Julien Brule | h2. List of routines |
177 | 1 | Julien Brule | h3. High-level routines |
178 | h3. Advanced routines |
||
179 | 6 | Julien Brule | |
180 | |||
181 | <pre> |
||
182 | <code class="c"> |
||
183 | </code> |
||
184 | </pre> |