-
Notifications
You must be signed in to change notification settings - Fork 10
/
pages.dox
187 lines (106 loc) · 7.88 KB
/
pages.dox
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/*! @mainpage cacao Documentation
@note This file: ./pages.dox
[TOC]
---
# 1. What is cacao ? {#mainsection_whatiscacao}
The compute and control for adaptive optics (cacao) package is a collection of tools for adaptive optics real-time control.
---
# 2. Installing cacao and running command line interface {#mainsection_gettingstarted}
- @ref page_installation : Downloading and Installing cacao
- @ref page_userinput : Using cacao's command line interface (CLI)
- @ref page_CLI_Overview
- @ref page_readlinekeys
- @ref page_command_line_interface
---
# 3. Fundamentals {#mainsection_fundamentals}
## 3.1. Processes and Streams {#mainsection_fundamentals_processesstreams}
cacao relies on a collection of **processes** to run an AO loop, rather than a single large function. This provides a modular and flexible solution, able to run simple AO control loop as well as very complex setups.
Synchronization and communication between processes is achieved by the data **stream** structure used throughout cacao. Mechanisms to synchronize processes and track interactions between data and processes (such as: which process is writing a specific stream) are embedded within the data structure. For more details, see module ImageStreamIO.c.
## 3.2. Building an AO control loop {#mainsection_fundamentals_buildingloop}
Under cacao's framework, the AO control loop is assembled from **streams** and **processes**. Each process typically reads (= listens) to a stream. Once the stream is updated, the process will start computations and will usually update other stream(s). Long chains of processes can thus be built, with multiple branches (several processes can listen to the same stream).
More of cacao's processes are running a loop.
## 3.3. Key tools {#mainsection_fundamentals_keytools}
To manage processes and streams, cacao offers a few useful tools, allowing users to quickly inspect complex AO loops. They are included in the directory `src/CommandLineInterface/scripts`, which is included in the path, per installation instructions. cacao users will make frequent use of these tools.
- **milk-procCTRL**, the process controller. See @ref page_ProcessInfoStructure for details.
- **milk-streamCTRL**, the stream controller. See streamCTRL.c for details.
- **milk-fpsCTRL**, the function parameter structure controller. See @ref page_FunctionParameterStructure for details.
- **milk-shmimmon**, the shared memory image monitor, is used to inspect individual streams
---
# 4. Configuring and running cacao {#mainsection_cacaoconfrun}
## 4.1. Step-by-step instructions {#mainsection_cacao_example}
- @ref page_cacao_stepbystep_example
Users guide:
- @ref page_cacao_Initial_Setup
- @ref page_cacao_Software_Overview
- @ref page_cacao_Hardware_Simulation
- @ref page_cacao_Control_Setup_Overview
- @ref page_cacao_setting_up_hardware_interfaces
- @ref page_cacao_calibration
- @ref page_cacao_building_control_matrix
- @ref page_cacao_running_loop_mode
- @ref page_cacao_aux_processes
- @ref page_cacao_offsetting
- @ref page_cacao_predictive_control
Appendices:
- @ref page_cacao_sharedmem_streams
- @ref page_cacao_conf_directory
- @ref page_cacao_managing_processes
---
---
# 5. Programming with cacao {#mainsection_cacaoprog}
## 5.1. Source Code {#mainsection_sourcecode}
[cacao is hosted on github](https://github.com/cacao-org/cacao), and consists of multiple modules.
cacao is coded in C, compiles with gcc under cmake. cacao is built on top of the milk package. The cacao package includes milk (@ref page_milk_Modules), and adds AO-specific modules (@ref page_cacao_Modules).
Important changes to the package are listed in the @ref page_CommandLineInterface_ChangeLog.
## 5.2. Programming guide {#mainsection_programmingguide}
- @ref page_WorkingWithGit
- @ref page_coding_standards
- @ref page_ModuleFiles
- @ref page_DocumentingCode
- @ref page_TemplateSourceCode
- @ref page_ProcessInfoStructure
- @ref page_FunctionParameterStructure
- @ref page_exampleBASHscript
- @ref page_LoadingModules
---
# Appendix A. Modules {#mainsection_modules}
cacao uses milk modules for its command line, memory management, image I/O and standard image computations.
## A.1. milk modules {#mainsection_modules_milk}
cacao builds on the milk package and framework. Command line interface, memory management and general purpose image processing functions are provided by the milk modules.
Module | Description | Souce Code Reference |
------------------------|--------------------------------------|------------------------------|
CommandLineInterface | Command interpreter | @ref CLIcore.h |
ImageStreamIO | Image format and low-level routines | @ref ImageStreamIO.h |
00CORE | Core functions | @ref 00CORE.h |
COREMOD_memory | Memory management, image creation | @ref COREMOD_memory.h |
COREMOD_iofits | Read and write FITS files | @ref COREMOD_iofits.h |
COREMOD_tools | Misc frequently used functions | @ref COREMOD_tools.h |
COREMOD_arith | Arithmetic operations on images | @ref COREMOD_arith.h |
info | Image information | @ref info.h |
image_basic | Frequently used image functions | @ref image_basic.h |
image_filter | Image filtering, convolution | @ref image_filter.h |
image_format | Read/write images in several formats | @ref image_format.h |
image_gen | Generate useful images | @ref image_gen.h |
img_reduce | Combine raw images into single image | @ref img_reduce.h |
fft | Wrapper to FFTW and other functions | @ref fft.h |
statistic | Statistical tools and analysis | @ref statistic.h |
kdtree | k-d tree | @ref kdtree.h |
linARfilterPred | Linear predictive filtering | @ref linARfilterPred.h |
linopt_imtools.h | Linear optimization tools | @ref linopt_imtools.h |
psf | Point Spread Function analysis | @ref psf.h |
ZernikePolyn | Zernike Polynomials | @ref ZernikePolyn.h |
cudacomp | Cuda wrapper | @ref cudacomp.h |
## A.2. cacao-specific modules {#mainsection_modules_cacao}
Module | Description | Souce Code Reference |
-------------------------------------|--------------------------------------|------------------------------------------|
AOloopControl | Top-level module for AO control | @ref AOloopControl.h |
AOloopControl_IOtools | Input-Output tools | @ref AOloopControl_IOtools.h |
AOloopControl_acquireCalib | Acquire AO calibration | @ref AOloopControl_acquireCalib.h |
@ref page_AOloopControl_computeCalib | Compute AO calibration | @ref AOloopControl_computeCalib.h |
AOloopControl_perfTest | AO performance analysis | @ref AOloopControl_perfTest.h |
AOloopControl_compTools | AO computation tools | @ref AOloopControl_compTools.h |
AOloopControl_PredictiveControl | Predictive Control | @ref AOloopControl_PredictiveControl.h |
AOloopControl_DM | Deformable mirror control | @ref AOloopControl_DM.h |
FPAOloopControl | Focal plane AO control | @ref FPAOloopControl.h |
---
*/