comparison m-toolbox/html_help/help/ug/ltpda_training_topic_2_9.html @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
3
4 <html lang="en">
5 <head>
6 <meta name="generator" content=
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
8 <meta http-equiv="Content-Type" content=
9 "text/html; charset=us-ascii">
10
11 <title>IFO/Temperature Example - Pre-processing (LTPDA Toolbox)</title>
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
14 <meta name="description" content=
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
16 </head>
17
18 <body>
19 <a name="top_of_page" id="top_of_page"></a>
20
21 <p style="font-size:1px;">&nbsp;</p>
22
23 <table class="nav" summary="Navigation aid" border="0" width=
24 "100%" cellpadding="0" cellspacing="0">
25 <tr>
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
27
28 <td valign="baseline" align="right"><a href=
29 "ltpda_training_topic_2_8.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Split and join AOs"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "ltpda_training_topic_3.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Topic 3 - Spectral Analysis"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>IFO/Temperature Example - Pre-processing</h1>
37 <hr>
38
39 <p>
40 <p>
41 Now we return to the IFO/Temperature example that was started in Topic 1.
42 </p>
43 <h2>Loading and checking the calibrated data sets from topic2</h2>
44 <p>
45 In the last topic you should have saved your calibrated data files as<br>
46 <tt>ifo_temp_example/ifo_disp.xml</tt> and <br>
47 <tt>ifo_temp_example/temp_kelvin.xml</tt>
48 </p>
49 <p>
50 Now load each file into an AO, and simplify the name of the objects by assigning them the name of the Matlab workspace variable containing them:<br>
51 </p>
52 <div class="fragment"><pre>
53 ifo = ao(<span class="string">'ifo_temp_example/ifo_disp.xml'</span>);
54 temp = ao(<span class="string">'ifo_temp_example/temp_kelvin.xml'</span>);
55 ifo.setName;
56 temp.setName;
57 </pre></div>
58 <p>
59 Let's see what kind of pre-processing we have to apply to our data prior to further analysis.
60 </p>
61 <p>
62 You can have a look at the data by for example displaying the AOs on the terminal and by
63 plotting them, of course. Since the two data series have different Y units, we should plot
64 them on subplots. To do that with <tt>iplot</tt>, pass the key 'arrangement' in a plist. For
65 example:
66 </p>
67 <div class="fragment"><pre>
68 pl = plist(<span class="string">'arrangement'</span>, <span class="string">'subplots'</span>);
69 </pre></div>
70 <p>
71 If you plot the two time-series you should see something like the following:<br>
72 <img src="images/ltpda_training_1/topic2/ifotempraw.png" alt="ifotempdata" border="1">
73 <br>
74 </p>
75 <p>
76 Some points to note:
77 <ol>
78 <li>The two data streams:
79 <ul>
80 <li> do not have the same sampling frequency.</li>
81 <li> are not of the same length (nsecs).</li>
82 </ul></li>
83 <li>The interferometer data has a small transient at the start</li>
84 </ol>
85 </p>
86 <p>
87 To have a closer look at the samples we plot markers at each sample and only plot a zoomed-in section. You can
88 do this by creating a parameter list with the following key/value pairs (remember the 'key' properties for <tt>plist</tt> entries is not case sensitive):
89 </p>
90 <p>
91 <table cellspacing="0" class="body" cellpadding="2" border="0" width="50%">
92 <colgroup>
93 <col width="35%"/>
94 <col width="65%"/>
95 </colgroup>
96 <thead>
97 <tr valign="top">
98 <th class="categorylist">Key</th>
99 <th class="categorylist">Value</th>
100 </tr>
101 </thead>
102 <tbody>
103 <!-- Key 'arrangement' -->
104 <tr valign="top">
105 <td bgcolor="#f3f4f5">
106 <p><tt>ARRANGEMENT</tt></p>
107 </td>
108 <td bgcolor="#f3f4f5">
109 <span class="string">'subplots'</span>
110 </td>
111 </tr>
112 <!-- Key 'arrangement' -->
113 <tr valign="top">
114 <td bgcolor="#f3f4f5">
115 <p><tt>LINESTYLES</tt></p>
116 </td>
117 <td bgcolor="#f3f4f5">
118 {<span class="string">'none'</span>,<span class="string">'none'</span>}
119 </td>
120 </tr>
121 <!-- Key 'markers' -->
122 <tr valign="top">
123 <td bgcolor="#f3f4f5">
124 <p><tt>MARKERS</tt></p>
125 </td>
126 <td bgcolor="#f3f4f5">
127 {<span class="string">'+'</span>,<span class="string">'+'</span>}
128 </td>
129 </tr>
130 <!-- Key 'xranges' -->
131 <tr valign="top">
132 <td bgcolor="#f3f4f5">
133 <p><tt>XRANGES</tt></p>
134 </td>
135 <td bgcolor="#f3f4f5">
136 {<span class="string">'all'</span>, [200 210]}
137 </td>
138 </tr>
139 <!-- Key 'yranges' -->
140 <tr valign="top">
141 <td bgcolor="#f3f4f5">
142 <p><tt>YRANGES</tt></p>
143 </td>
144 <td bgcolor="#f3f4f5">
145 {[2e-7 3e-7], [200 350]}
146 </td>
147 </tr>
148 </tbody>
149 </table>
150 </p>
151 <p>
152 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
153 <tr width="90%">
154 <td>
155 Notice the use of the keyword 'all' in the value for the 'XRANGES' parameter. Many
156 of the <tt>iplot</tt> options support this keyword, which tells <tt>iplot</tt> to use
157 the same value for all plots and subplots. For the 'YRANGES' we specify different values
158 for each subplot.
159 </td>
160 </tr>
161 </table>
162 </p>
163 <p>
164 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
165 <tr width="90%">
166 <td>
167 Please store your parameter lists in 2 different variables. We can reuse them for
168 plotting our results later. If you are working on a pipeline insteaad of a script, you
169 can use two <tt>plist</tt> constructor blocks and pass these as an input to an
170 <tt>iplot</tt> block.
171 </td>
172 </tr>
173 </table>
174 </p>
175 <p>
176 Passing such a parameter list to <tt>iplot</tt> together with the two AO time-series should yield
177 a plot something like:
178 </p>
179 <br>
180 <img src="images/ltpda_training_1/topic2/samples.png" alt="samples" border="1">
181 <br>
182 <p>
183 From this plot you may be able to see that the temperature data is <bb>unevenly sampled</bb>.
184 </p>
185 <p>
186 To confirm this, enter the following (standard) MATLAB commands on the terminal:
187 </p>
188 <div class="fragment"><pre>
189 dt = diff(temp.x);
190 min(dt)
191 max(dt)
192 </pre></div>
193 <p>
194 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
195 <tr width="90%">
196 <td>
197 Don't forget the semicolon at the end of the <tt>diff</tt> calculation; this is a long data series
198 and will be printed to the terminal if you do forget.
199 </td>
200 </tr>
201 </table>
202 You see that the minimum and maximum difference in the time-stamps of the data is different, showing
203 that the data are not evenly sampled.
204 </p>
205 <p>
206 Before we proceed with the later analysis of this data, we need to
207 <ul>
208 <li>Fix the uneven sampling of the temperature data</li>
209 <li>Resample both data streams to the same rate</li>
210 <li>Resample both data streams on to the same timing grid</li>
211 <li>Select the segment of interferometer data that matches the temperature data</li>
212 </ul>
213 </p>
214 <p>
215 Each of these steps can, in principle, be done by hand. However, LTPDA provides
216 a 'data fixer' method called <tt>ao/consolidate</tt> which attempts to automate this
217 process. The call to <tt>consolidate</tt> is shown below:
218 </p>
219 <div class="fragment"><pre>
220 [temp_fixed ifo_fixed] = consolidate(temp, ifo, plist(<span class="string">'fs'</span>,1));
221 </pre></div>
222 <p>
223 We tell <tt>consolidate</tt> that we want to have our data resampled to 1 Hz by specifying the
224 parameter key 'fs'.
225 </p>
226 <p>
227 Now we can inspect the time-series of these data. The result should look something like
228 the figure below:
229 </p>
230 <br>
231 <img src="images/ltpda_training_1/topic2/ifo_temp_consolidated.png" alt="consolidated" border="1">
232 <br>
233 <p>
234 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
235 <tr width="90%">
236 <td>
237 Note that the time origin above the plots has now changed from zero to 13.105 which
238 was the time of the first sample in the temperature measurement.
239 </td>
240 </tr>
241 </table>
242 </p>
243 <p>
244 If we also plot the zoomed-in view again, we should see something like:
245 </p>
246 <img src="images/ltpda_training_1/topic2/samples_conso.png" alt="consolidated samples" border="1">
247 <p>
248 As you can see <tt>consolidate</tt> solved all our issues with these two data streams.
249 They now start at the same time and are evenly sampled at the same sampling frequency.
250 </p>
251 <p>
252 In the next topic, we will look at the
253 spectral content and coherence of the data before and after the pre-processing. For now,
254 finish by saving the consolidated data ready for the next topic.
255 </p>
256 <div class="fragment"><pre>
257 save(temp_fixed,<span class="string">'ifo_temp_example/temp_fixed.xml'</span>);
258 save(ifo_fixed,<span class="string">'ifo_temp_example/ifo_fixed.xml'</span>);
259 </pre></div>
260
261
262
263 </p>
264
265 <br>
266 <br>
267 <table class="nav" summary="Navigation aid" border="0" width=
268 "100%" cellpadding="0" cellspacing="0">
269 <tr valign="top">
270 <td align="left" width="20"><a href="ltpda_training_topic_2_8.html"><img src=
271 "b_prev.gif" border="0" align="bottom" alt=
272 "Split and join AOs"></a>&nbsp;</td>
273
274 <td align="left">Split and join AOs</td>
275
276 <td>&nbsp;</td>
277
278 <td align="right">Topic 3 - Spectral Analysis</td>
279
280 <td align="right" width="20"><a href=
281 "ltpda_training_topic_3.html"><img src="b_next.gif" border="0" align=
282 "bottom" alt="Topic 3 - Spectral Analysis"></a></td>
283 </tr>
284 </table><br>
285
286 <p class="copy">&copy;LTP Team</p>
287 </body>
288 </html>