Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/ltpda_training_topic_2_8.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>Split and join AOs (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;"> </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_7.html"><img src="b_prev.gif" border="0" align= | |
30 "bottom" alt="Select and find data from an AO"></a> <a href= | |
31 "ltpda_training_topic_2_9.html"><img src="b_next.gif" border="0" align= | |
32 "bottom" alt="IFO/Temperature Example - Pre-processing"></a></td> | |
33 </tr> | |
34 </table> | |
35 | |
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Split and join AOs</h1> | |
37 <hr> | |
38 | |
39 <p> | |
40 <p> | |
41 You can split the data inside an AO to produce one or more output AOs. The <tt>ao/split</tt> method | |
42 splits an AO by samples, times (if the AO contains time series data), frequencies (if the AO contains | |
43 frequency data), intervals, or a number of pieces. We can control this as usual by defining our parameters. | |
44 </p> | |
45 <h2>Split by times</h2> | |
46 <p> | |
47 Let us create a new time series AO for these examples. | |
48 </p> | |
49 <div class="fragment"><pre> | |
50 pl = plist(<span class="string">'name'</span>, <span class="string">'None'</span>, <span class="string">'nsecs'</span>, 10, <span class="string">'fs'</span>, 1000, <span class="string">'tsfcn'</span>, <span class="string">'sin(2*pi*7.433*t) + randn(size(t))'</span>,<span class="string">'yunits'</span>,<span class="string">'V'</span>); | |
51 a = ao(pl); | |
52 </pre></div> | |
53 <p> | |
54 For splitting in time we need to define a time vector for the parameter list and pass it to <tt>ao/split</tt> | |
55 </p> | |
56 <div class="fragment"><pre> | |
57 pl_time = plist(<span class="string">'times'</span>, [2 3]); | |
58 a_time = split(a, pl_time); | |
59 iplot(a, a_time) | |
60 </pre></div> | |
61 <img src="images/ltpda_training_1/topic2/split_times.png" alt="split" border="1"> | |
62 | |
63 <h2>Split by frequencies</h2> | |
64 <p> | |
65 For this we need a frequency data AO. One easy way to get this is by computing the power spectrum using <tt>ao/psd</tt>. | |
66 </p> | |
67 <div class="fragment"><pre> | |
68 axx = a.psd; | |
69 </pre></div> | |
70 <p> | |
71 Again we need a vector for the parameter list and pass it to <tt>ao/split</tt> | |
72 </p> | |
73 | |
74 <div class="fragment"><pre> | |
75 pl_freq = plist(<span class="string">'frequencies'</span>, [10 100]); | |
76 axx_freq = split(axx, pl_freq); | |
77 iplot(axx, axx_freq) | |
78 </pre></div> | |
79 <img src="images/ltpda_training_1/topic2/split_freq.png" alt="split" border="1"> | |
80 | |
81 <h2>Split by intervals</h2> | |
82 <p> | |
83 We can also split the AO by passing a time interval to the <tt>ao/split</tt> method. | |
84 </p> | |
85 | |
86 <div class="fragment"><pre> | |
87 pl_interv = plist(<span class="string">'start_time'</span>, 4, <span class="string">'end_time'</span>, 6); | |
88 a_interv= split(a, pl_interv); | |
89 iplot(a, a_interv) | |
90 </pre></div> | |
91 <img src="images/ltpda_training_1/topic2/split_interv.png" alt="split_interv" border="1"> | |
92 | |
93 <h2>Split by samples</h2> | |
94 <p> | |
95 This type of splitting method we can use on any type of data. Let us use the frequency type, <tt>axx</tt>. | |
96 </p> | |
97 <p> | |
98 Again we need a vector for the parameter list and pass it to <tt>ao/split</tt>, | |
99 only that this time we will split our AO in to two parts. | |
100 </p> | |
101 | |
102 <div class="fragment"><pre> | |
103 pl_samp = plist(<span class="string">'samples'</span>, [50 100 101 300]); | |
104 [axx_samp1 axx_samp2]= split(axx, pl_samp) | |
105 iplot(axx, axx_samp1, axx_samp2) | |
106 </pre></div> | |
107 <img src="images/ltpda_training_1/topic2/split_samp.png" alt="split_samp" border="1"> | |
108 <p> | |
109 Although in this example the two resulting AOs are contiguous, they need not to be. | |
110 </p> | |
111 <h2>Join AOs</h2> | |
112 <p> | |
113 We can join our two AOs back together using <tt>ao/join</tt> | |
114 </p> | |
115 <div class="fragment"><pre> | |
116 axx_join = join(axx_samp1, axx_samp2); | |
117 iplot(axx, axx_join) | |
118 </pre></div> | |
119 <img src="images/ltpda_training_1/topic2/split_join.png" alt="split_join" border="1"> | |
120 <p> | |
121 If we look at the history for <tt>axx_join</tt> (for instance, by entering <tt>dotview(axx_join.hist)</tt>), we will see the following: | |
122 </p> | |
123 <img src="images/ltpda_training_1/topic2/split_join_hist.png" alt="Split/join history" width="800px" border="1"> | |
124 <p> | |
125 Since the two AOs that are output from the 'split by samples' stage are independent, the history | |
126 tree reflects this, showing two independent branches leading to the <tt>join</tt> step. | |
127 </p> | |
128 | |
129 | |
130 </p> | |
131 | |
132 <br> | |
133 <br> | |
134 <table class="nav" summary="Navigation aid" border="0" width= | |
135 "100%" cellpadding="0" cellspacing="0"> | |
136 <tr valign="top"> | |
137 <td align="left" width="20"><a href="ltpda_training_topic_2_7.html"><img src= | |
138 "b_prev.gif" border="0" align="bottom" alt= | |
139 "Select and find data from an AO"></a> </td> | |
140 | |
141 <td align="left">Select and find data from an AO</td> | |
142 | |
143 <td> </td> | |
144 | |
145 <td align="right">IFO/Temperature Example - Pre-processing</td> | |
146 | |
147 <td align="right" width="20"><a href= | |
148 "ltpda_training_topic_2_9.html"><img src="b_next.gif" border="0" align= | |
149 "bottom" alt="IFO/Temperature Example - Pre-processing"></a></td> | |
150 </tr> | |
151 </table><br> | |
152 | |
153 <p class="copy">©LTP Team</p> | |
154 </body> | |
155 </html> |