0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 <html lang="en">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 <head>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 <meta name="generator" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 <meta http-equiv="Content-Type" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 "text/html; charset=us-ascii">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 <title>Making AOs (LTPDA Toolbox)</title>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 <meta name="description" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 </head>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 <body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 <a name="top_of_page" id="top_of_page"></a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 <p style="font-size:1px;"> </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 <td valign="baseline" align="right"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 "ltpda_training_topic_1_1.html"><img src="b_prev.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 "bottom" alt="Introducing Analysis Objects"></a> <a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 "ltpda_training_topic_1_3.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 "bottom" alt="Making a time-series AO"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Making AOs</h1>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 <h2>Exercise 1 - Your first Analysis Object</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 AOs can be constructed in many different ways. Each of the different ways is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 called a constructor. For example, there is a constructor to make an AO from
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 a set of numeric values, there is also a constructor to make an AO from a data file.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 Each time you construct an AO, you make an instance of the class, <tt>ao</tt>. The variable
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 you have in MATLAB is then just a reference to the object you constructed.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 This may all sound confusing to start with, but will become clearer as we go
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 through the examples below.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 Let's make an AO. On the MATLAB terminal, type the following: <tt>a = ao</tt> and hit return.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 You should see an output like the following:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 >> a = ao()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 M: running ao/ao
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 M: running ao/display
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 ----------- ao 01: a -----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 name: ''
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 data: None
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 hist: ao / ao / SId: ao.m,v 1.346 2011/05/07 06:56:17 mauro Exp S
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 UUID: bd0eb230-9fdf-40a1-85d7-c965532d7c7d
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 --------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 Note that the number of lines beginning with the "M:" syntax may vary depending on the level of "verbosity"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 that can be set via the <a href="setup.html#prefs">LTPDA Preferences</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 You have just made your first AO. It's not a very exciting AO since it
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 contains no data, but it is an AO nontheless. So now let's make an AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 with some data in it. Type the following in to the MATLAB terminal:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 <tt>a = ao(1)</tt> and hit return. You should see
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 >> a = ao(1)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 ----------- ao 01: a -----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 name: ''
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 data: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 -------- cdata 01 ------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 y: [1x1], double
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 dy: [0x0], double
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 yunits: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 ------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 hist: ao / ao / SId: fromVals.m,v 1.36 2011/05/07 05:15:26 mauro Exp S-->SId: ao.m,v 1.346 2011/05/07 06:56:17 mauro Exp S
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 UUID: ff0c5bcc-3b79-473f-b608-c9585684fdee
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 --------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 Now you can see that your AO has some data. The data is of type <tt>cdata</tt>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 (more on that later), it has no Y units, and it contains a single value, 1.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 Note also that the information shown in the "hist" field may vary depending on the version of the LTPDA Toolbox you installed.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 In addition to the standard MATLAB scripting interface, LTPDA offers a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 graphical programming environment where the user can put together signal
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 processing pipelines by dragging and dropping blocks on to a canvas, then
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 joining up the blocks.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 This graphical programming environment is called an LTPDA Workbench. To start
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 the workbench, issue the following command on the MATLAB terminal, or click on the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 "LTPDA Workbench" button on the launch bay.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 LTPDAworkbench
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 You should see a window like the one below:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 <img src="images/ltpda_training_1/topic1/workbench_start.png" alt="Empty workbench" width="800px" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 The use of the LTPDA workbench is quite intuitive, so hopefully playing around is sufficient.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 Further details of using the workbench environment can be found in the <a href="lwb_intro.html">appropriate section</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 of the user manual.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 To construct the simple AO as we did above on the terminal, first create an empty pipeline in the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 workbench by going to "Pipeline->New Pipeline" or hit <tt>ctrl-n</tt> (<tt>cmd-n</tt> on OS X).
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 Then you can drag an AO constructor block from the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 Library on the left. You can also double click on the block in the library to add it to the canvas.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 <img src="images/ltpda_training_1/topic1/lwb_ao_1.png" alt="AO1" border="2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 <tr width="90%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 Blocks can be added to the canvas using the "Quick Block" dialog. Hit <tt>ctrl-b</tt> (<tt>cmd-b</tt> on OS X)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 on the canvas to open the quick block dialog. Begin typing to find the block you want (e.g. 'a' 'o') the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 hit <tt>enter</tt> to add that block to the canvas. Hit <tt>enter</tt> to add multiple blocks the same. Hit
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 <tt>escape</tt> to dismiss the dialog.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 To set the value as we did on the terminal (<tt>ao(1)</tt>) we set some parameters on the block.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 Follow these steps:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 <ol>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 <li>Click on the AO block to select it</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 <li>It is not already selected, choose the "Properties" tab at the left of the workbench</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 <li>Select the pre-defined parameter set "From Values" from the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 drop-down menu located at the center of the tab<br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 <img src="images/ltpda_training_1/topic1/sets_combo.png" alt="Sets Combo Box" width="200px" border="2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 <li>You should see the parameter list like<br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 <img src="images/ltpda_training_1/topic1/fromValues_pset.png" alt="From Values Parameters" width="200px" border="2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 <li>To set this parameter list to the block, click the <tt>Set</tt> button below the parameter table</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 <li>You can now edit this parameter list, for example, add or remove parameters or edit parameter key names and values.</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 <li>Edit the value for the key "VALS" by double clicking on the table cell</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 <li>A more sophisticated way to edit the parameter is available by clicking on the "Edit" symbol</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 <li>Enter a new value (any MATLAB expression) in the dialog box and click the OK button</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 <li>To set the name of the block, double-click it and enter a new name in the dialog box</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 </ol>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 You can now execute the pipeline by clicking on the play button <img src="images/ltpda_training_1/topic1/play_btn.png" width="30px" alt="Play">.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 To display the result of your pipeline, select the blocks you are interested in the outputs of, then
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 you can click on the various 'output' buttons, available in the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 "Control" tab:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 <img src="images/ltpda_training_1/topic1/output_btns.png" alt="Output buttons" border="2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 <tr width="90%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 These output buttons only work if the pipeline has been successfully executed so that the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 variables corresponding to the various blocks are in the MATLAB workspace. If the block
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 property "Keep Result" is set to "false", then the output buttons won't work for that block
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 because the result of executing that block is cleared from the MATLAB workspace as soon as
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 the result is no longer needed by other blocks.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 <!-- Setting properties -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 <h2>Exercise 2 - Setting properties of AOs</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 We can now go on and manipulate this AO. For example, suppose we want to
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 set its name. Type the following in to the MATLAB terminal: <tt>a.setName('Bob')</tt>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 and hit enter. You should see:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 >> a.setName('Bob')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 ----------- ao 01: Bob -----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 name: Bob
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 data: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 -------- cdata 01 ------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 y: [1x1], double
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 dy: [0x0], double
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 yunits: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 ------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 hist: ltpda_uoh / setName / SId: setName.m,v 1.18 2011/04/08 08:56:30 hewitson Exp S
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 UUID: f87a3bc7-af10-4631-b9ad-6970bf38bf90
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 ----------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 The ao has a new name. The function (or more strictly, method) <tt>setName</tt> has acted on the AO, <tt>a</tt>.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 An equivalent statement would be: <tt>setName(a, 'Bob')</tt>.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 By doing this, you have modified <tt>a</tt>. If instead you do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 b = setName(a, <span class="string">'Bob'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 or
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 b = a.setName(<span class="string">'Bob'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 then you get a new variable, <tt>b</tt>, which is a distinct (deep) copy of <tt>a</tt>.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 The original AO, <tt>a</tt>, has not been modified. Try this out.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 You can do the same on the workbench by using a <tt>setName</tt> block. To use the 'modifier' behaviour,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 you set the block to be a modifier in the 'block properties' table:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 <img src="images/ltpda_training_1/topic1/modifier_property.png" alt="Modifier Property" border="2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 <tr width="90%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 <p>On the workbench, the <tt>setName</tt> method is automatically called on the output of
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 constructor blocks so that the 'name' you give to a constructor block is set to the object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 that's constructed. More about this later.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 <!-- Viewing history -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 <h2>Exercise 3 - Viewing the history</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 We can now look at the history of this object (in case our memory is really short).
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 The history can be viewed in different ways. For short history trees, the easiest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 is to use the MATLAB-based history plotter built in to LTPDA. In the MATLAB terminal,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 type plot(a.hist) and hit return. You should get a MATLAB figure looking something
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 like the picture below. You can see the only things we have done are to construct the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 object and set its name.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 <img src="images/ltpda_training_1/topic1/basic_history.png" alt="Basic History Plot" width="200px" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 For very complicated history plots, LTPDA also supports viewing the history
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 using <a href="additional_progs.html">Graphviz</a>. If your machine has
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 graphviz already installed, and you've set this up in the <a href="ltpda_training_topic_1.html">LTPDA Preferences</a>,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 then you can immediately do:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 dotview(a.hist, plist(<span class="string">'filename'</span>, <span class="string">'tmp.pdf'</span>))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 <span class="comment">% or</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 a.viewHistory();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 and you should get a figure something like that below in your system pdf
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 viewer.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 <img src="images/ltpda_training_1/topic1/dot_history.png" alt="Dot History Plot" width="300px" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 <table cellspacing="0" class="note" summary="Note" cellpadding="5" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 <tr width="90%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 <img src="images/ltpda_training_1/topic1/display_history_btn.png" alt="History Btn" border="1"><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 When you click on the 'display history' button on the workbench, a filename created from combining
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 the pipeline name and the block name is used in the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 call to <tt>dotview</tt>. You will find the PDF file in the current MATLAB working directory.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 Don't worry about all this <tt>plist</tt> business, we'll get to that soon
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 enough. For now it's enough to know that the conversion to pdf is done by
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 the graphviz engine, and this needs to write the pdf to a file.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 That's the 'filename' specified in that last command.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 Installation of graphviz is covered in the LTPDA user manual under the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 section <a href="sysreqts.html">System Requirements</a>.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 There is a third option for viewing the history: using the LTPDA Explorer.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 On the MATLAB terminal, type <tt>ltpda_explorer</tt> and hit return, or click the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 "Object Explorer" button on the LTPDA launch bay (see figure below). If the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 launch bay is not open, you can open it with the command: <tt>ltpdalauncher</tt>.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 <img src="images/ltpda_training_1/topic1/launchbay_explorer.png" alt="Launchbay with explorer highlighted" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 Once you have launched the explorer, you can navigate through the various
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 LTPDA objects that are in your MATLAB workspace. Currently, if you add objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 to the MATLAB workspace, they will not appear in the LTPDA Explorer until you restart it.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 <img src="images/ltpda_training_1/topic1/explorer.png" alt="Explorer" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 We said earlier that the AO we created has no Y units set. If you look at
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 the output on the MATLAB terminal you will see that the Y units is actually
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 a property of the data, not of the AO. This is because the data inside the AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 is actually an object in its own right. There exist 4* data types in LTPDA:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 <table cellspacing="0" class="body" cellpadding="2" border="0" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 <th class="categorylist">Data class</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 <th class="categorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 <!-- cdata -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 <p><tt>cdata</tt></p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 <p>Intended for storing an arbitrary matrix of values. This class has
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 two main fields: the data itself is stored in the field <tt>y</tt>, and the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 units of the data in <tt>yunits</tt>.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 <!-- tsdata -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 <p><tt>tsdata</tt></p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 <p>Intended for storing time-series data. More details on this one later.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 <!-- fsdata -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 <p><tt>fsdata</tt></p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 <p>For storing frequency-series data.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 <!-- xydata -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 <p><tt>xydata</tt></p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 <td bgcolor="#f3f4f5">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 <p>For storing an arbitrary set of x-y data pairs.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 <i>* there is actually a 5th data type in development for storing X-Y-Z data, for example for time-frequency maps.</i>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 Getting back to our Y units. To set the value of the Y units, the AO class
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 has a method called (not surprisingly) <tt>setYunits</tt>. To set the Y units
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 of this AO, type the following in to the MATLAB terminal: <tt>a.setYunits('km')</tt>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 and hit return. You should see the following output:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 >> a.setYunits('km')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 ----------- ao 01: Bob -----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 name: Bob
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 data: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 -------- cdata 01 ------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 y: [1x1], double
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 dy: [0x0], double
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 yunits: [km]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 ------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 hist: ao / setYunits / SId: setYunits.m,v 1.26 2011/04/08 08:56:11 hewitson Exp S
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 description:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410 UUID: 6d2a14d6-a958-4a11-819f-164541b14783
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 ----------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 Now you see that the AO has Y units of 'km'. (To get a list of supported
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 units in ltpda, type the following command in to the MATLAB terminal:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 <tt>unit.supportedUnits</tt>. To get a list of supported prefixes,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 type <tt>unit.supportedPrefixes</tt>.)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 <td align="left" width="20"><a href="ltpda_training_topic_1_1.html"><img src=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 "b_prev.gif" border="0" align="bottom" alt=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 "Introducing Analysis Objects"></a> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 <td align="left">Introducing Analysis Objects</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 <td> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437 <td align="right">Making a time-series AO</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 <td align="right" width="20"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440 "ltpda_training_topic_1_3.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 "bottom" alt="Making a time-series AO"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 </table><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 <p class="copy">©LTP Team</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 </body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447 </html>
|