-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
125 lines (81 loc) · 3.55 KB
/
README
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
To run:
#Start the simulation, which then waits for darc to connect.
python gtcsim.py params.py
(or if you want a faster simulation, use python gtcsim1sci.py - which
has only 1 science PSF, rather than 4).
#Now start darc
darccontrol configGTCAOSim.py -o
The simulation and darc run at about 30Hz on my laptop (darc alone
reaches over 1000Hz - the simulation slows things down a lot).
#Start a darcplot, and look at things...
darcplot
(right click, click the Subscribe button, and set the relevant
decimation to 1, otherwise it will update too slowly in simulation mode).
#We will do the brightest pixel background subtraction, and not use a
# flat field.
darcmagic set useBrightest -value=-20
#Note, you could of course explore the different subtraction
algorithms, levels, etc...
#There are some scripts that can be used:
#To turn off the atmosphere:
python setCalibrationMode.py 1
#(this may print an error in the
#simulation window - ignore it - its just that the script has finished
#before the simulation had time to return anything)
#And to turn it back on again:
python setCalibrationMode.py 0
#To set the WFS flux (to 100 photons/subap):
python setFlux.py 100
#To set the WFS flux (to a billion photons/subap):
python setFlux.py 1e9
#To take reference centroids (do this in calibration mode, with high flux):
python takeRefSlopes.py
#To take a control matrix (again, calibration mode, high flux):
python doBasicPoke.py
#For a real sytem, you'd probably want a more advanced way of poking.
#Set out of calibration mode... and turn down the flux.
python setCalibrationMode.py 0
python setFlux.py 100
#After doing this, you can close the loop (an optional gain parameter
#can be supplied, default is 0.5):
python closeLoop.py
(or, e.g. python closeLoop.py 0.1)
#To open the loop:
python openLoop.py
To view science PSFs, you can use the simulation tools:
simctrl.py
There is a button "connect" - enter "9000" in the box next to this,
and then click it.
Then click "Get plots".
Scroll down to the bottom and click the "Zero science"
button. This resets the long exposure integration.
Scroll up slightly until you see "science_b". Expand this item, and select
"Instantaneous Image". Then you will see the AO corrected
instantaneous PSF, at 1650nm. The "long PSF" item will show the
integrated PSF. "Science params" item shows various parameters of the
integrated PSF (Strehl etc).
"science_buncorr" is the uncorrected PSF.
science_a and science_auncorr are PSFs at 700nm.
My quick tests give H-band Strehls of about 5-10%, though I've not done
any gain optimisation, or any investigations... it should be possible
to do a lot better. It takes a long time for the averaging of long
exposure PSF to give steady results... (i.e. it has to do enough iterations).
To change conditioning of the control matrix, can use eg:
python makeRecon.py 0.1 (or any value <1).
Then remember to "Zero science"
Of course, for an on-sky system, you would probably want a better
method for control matrix generation - a minimum variance
reconstructor or something.
To stop:
darcmagic stop -c
Simulation will then wait for a new darc to reconnect - or you can
Ctrl-C it (the simulation - not darc - since this would only stop the
control part of darc, not the real-time part - by design!).
Useful commands:
darcmagic status
darcmagic time 10
simsetup.py gtcsim.xml to modify the simulation. e.g....
python gtcsim1sci.py params.xml (which runs faster)
Simpler config file: paramsUser.py. To use this, it must be used with
paramsMain.py, e.g.:
python gtcsim.py paramsUser.py paramsMain.py