Mercurial > hg > ltpda
comparison m-toolbox/test/MPipeline/test_2.m @ 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 mc | |
2 | |
3 | |
4 !cp ~/NetBeansProjects/MPipeline/dist/MPipeline.jar . | |
5 !cp -r ~/NetBeansProjects/MPipeline/dist/lib . | |
6 | |
7 | |
8 javaaddpath(fullfile(pwd, 'MPipeline.jar')); | |
9 | |
10 %% | |
11 | |
12 | |
13 wb = LTPDAworkbench; | |
14 | |
15 wb.newPipeline('SSM pipeline'); | |
16 | |
17 % Build simulation | |
18 | |
19 % constructor | |
20 wb.addBlock('DFACS', ssm.getInfo, 0, 0); | |
21 wb.uploadPlist('DFACS', plist('built-in', 'DFACS_5_Science_Mode_1_All_Optical_Readouts', ... | |
22 'dim', 1, ... | |
23 'withParams', true)); | |
24 | |
25 % set name | |
26 wb.addBlock('set DFACS name', ssm.getInfo('setName'), 150, 0); | |
27 wb.connectBlocks('DFACS', 1, 'set DFACS name', 1); | |
28 | |
29 % add simulate block | |
30 wb.addBlock('simulate DFACS', ssm.getInfo('simulate'), 250,100); | |
31 | |
32 pl = plist('aos variable names', {'rx1_H1_Ifo_delayed'}, 'aos', 'PORT_1', ... | |
33 'return outputs', {'fx_mps_c'}); | |
34 | |
35 wb.uploadPlist('simulate DFACS', pl); | |
36 | |
37 % connect output of setname to input of simulate | |
38 wb.connectBlocks('set DFACS name', 1, 'simulate DFACS', 1); | |
39 | |
40 % make noise AO | |
41 wb.addBlock('noise AO', ao.getInfo, 0, 200); | |
42 wb.uploadPlist('noise AO', plist('tsfcn', '1e-3*randn(size(t))', 'fs', 10, 'nsecs', 1000)); | |
43 | |
44 % connect noise AO to port 1 of simulate | |
45 wb.connectBlocks('noise AO', 1, 'simulate DFACS', 2); | |
46 | |
47 % measure TF | |
48 wb.addBlock('tf', ao.getInfo('ltfe'), 400,100); | |
49 | |
50 % connect output of simulate to input of TF | |
51 wb.connectBlocks('simulate DFACS', 1, 'tf', 1) | |
52 % connect output of AO to input of TF | |
53 wb.connectBlocks('noise AO', 1, 'tf', 2) | |
54 | |
55 % add iPlot | |
56 wb.addBlock('view', ao.getInfo('iplot'), 500,100); | |
57 wb.connectBlocks('tf', 1, 'view', 1) | |
58 | |
59 return | |
60 | |
61 wb.runPipeline | |
62 | |
63 save(wb, 'ssmtest.lwb') | |
64 | |
65 %% | |
66 mc | |
67 | |
68 | |
69 wb = LTPDAworkbench('ssmtest.lwb') | |
70 wb.runPipeline | |
71 | |
72 | |
73 | |
74 | |
75 | |
76 |