Mercurial > hg > ltpda
view m-toolbox/test/pipelines/test_ao_fft.lwb @ 31:a26669b59d7e database-connection-manager
Update LTPDAworkbench
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?> <LTPDAworkbench filepath="test_ao_fft.lwb" name="test_ao_fft.lwb" version="0.4"> <document UUID="4aa71a1c-e0fd-46e4-8361-4d39a6f19e48" title="Test AO fft" visible="true" windowHeight="1045" windowState="maximized" windowWidth="1429" windowX="0" windowY="0"> <canvas name="Test AO fft" zoomFactor="1.0"> <CanvasInfo author="hewitson" created="2009-01-31 13:12:33" description="Test the fft method of the AO class." lastModified="2011-04-27 09:04:53"/> <block UUID="0d37a0dd-fa0c-44d5-994f-3fb10ee05532" attachWorkbench="false" bounds="0 134 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="a1"> <port UUID="eab2927b-1af7-4776-a150-958bbd62fcfc" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="5fc64c5a-6d6a-4103-a8d3-13e1303a96f3" bounds="48 161 27 143" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="1fac2922-a3e1-4947-adad-d7bed7232dee" dstblock="New Block_3" dstport="0" srcPortUUID="eab2927b-1af7-4776-a150-958bbd62fcfc" srcblock="a1" thickness="2.0"/> <pipe bezier="false" color="-3657166" dstPortUUID="7b4ce913-f411-441f-8a51-59a073326e22" dstblock="a3" dstport="0" srcPortUUID="eab2927b-1af7-4776-a150-958bbd62fcfc" srcblock="a1" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="0 -1 1 1"/> <plist UUID="9e48103c-ea96-490e-b894-b6ab9506c095" created="-1" description="" name="none"> <param active="true" desc="" key="TSFCN"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="sin(2*pi*7.433*t) + randn(size(t))"/> </ParamValue> </param> <param active="true" desc="" key="FS"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="1000"/> </ParamValue> </param> <param active="true" desc="" key="NSECS"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="10"/> </ParamValue> </param> <param active="true" desc="" key="T0"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="1970-01-01 00:00:00.000"/> </ParamValue> </param> <param active="true" desc="" key="XUNITS"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="s"/> </ParamValue> </param> <param active="true" desc="" key="YUNITS"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value=""/> </ParamValue> </param> </plist> </block> <block UUID="e21edc20-467a-48cd-860f-d60d84bfdd27" attachWorkbench="false" bounds="70 147 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="New Block_3"> <port UUID="1fac2922-a3e1-4947-adad-d7bed7232dee" bounds="0 0 10 10" name="" number="0" terminal="" type="input"> <node UUID="2a1e6eec-a330-4e8e-914b-3d5dc76a7bb7" bounds="48 161 33 19" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="1fac2922-a3e1-4947-adad-d7bed7232dee" dstblock="New Block_3" dstport="0" srcPortUUID="eab2927b-1af7-4776-a150-958bbd62fcfc" srcblock="a1" thickness="2.0"/> </node> </port> <port UUID="6463a9e9-c594-484d-9a28-1e7762b00170" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="7729540a-efa6-4667-90b5-b31297d81815" bounds="118 174 32 11" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="01e82e24-2610-4537-8ac7-d6eb8541f88b" dstblock="New Block" dstport="0" srcPortUUID="6463a9e9-c594-484d-9a28-1e7762b00170" srcblock="New Block_3" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="fft" mpackage="" mversion="" portdims="1 -1 1 -1"/> <plist UUID="b9aca370-36c8-456f-abc5-fada05ec60da" created="0" description="" name="none"> <param active="true" desc="The fft type. Plain (complete non-symmetric), One-sided (from zero to Nyquist) or two-sided (complete symmetric)." key="TYPE"> <ParamValue index="1" selection="1"> <Option javaType="java.lang.String" matlabType="char" value="plain"/> <Option javaType="java.lang.String" matlabType="char" value="one"/> <Option javaType="java.lang.String" matlabType="char" value="two"/> </ParamValue> </param> </plist> </block> <block UUID="ea720ba6-891a-4953-a234-ba6f85d49c9b" attachWorkbench="false" bounds="139 152 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="New Block"> <port UUID="01e82e24-2610-4537-8ac7-d6eb8541f88b" bounds="0 0 10 10" name="" number="0" terminal="" type="input"> <node UUID="7729540a-efa6-4667-90b5-b31297d81815" bounds="118 174 32 11" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="01e82e24-2610-4537-8ac7-d6eb8541f88b" dstblock="New Block" dstport="0" srcPortUUID="6463a9e9-c594-484d-9a28-1e7762b00170" srcblock="New Block_3" thickness="2.0"/> </node> </port> <port UUID="eff9c9d5-e545-4e8c-857f-1132c9a3f3a2" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="d854197f-435c-442a-ae18-53a06313c512" bounds="187 179 31 21" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="845b87ae-8d73-4b59-8603-eda12dc4d2ff" dstblock="a2" dstport="0" srcPortUUID="eff9c9d5-e545-4e8c-857f-1132c9a3f3a2" srcblock="New Block" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Operator" mclass="ao" mname="abs" mpackage="" mversion="" portdims="1 -1 1 -1"/> <plist UUID="97c5ddfe-a582-4e02-b452-e27c8c912191" created="-1" description="" name="none"/> </block> <block UUID="375018c5-6ee5-444d-a068-bab5091a35f1" attachWorkbench="false" bounds="207 175 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="a2"> <port UUID="845b87ae-8d73-4b59-8603-eda12dc4d2ff" bounds="0 0 10 10" name="" number="0" terminal="" type="input"> <node UUID="d854197f-435c-442a-ae18-53a06313c512" bounds="187 179 31 21" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="845b87ae-8d73-4b59-8603-eda12dc4d2ff" dstblock="a2" dstport="0" srcPortUUID="eff9c9d5-e545-4e8c-857f-1132c9a3f3a2" srcblock="New Block" thickness="2.0"/> </node> </port> <port UUID="ab07fec4-b49a-4a98-8dc2-c920a6c6b994" bounds="0 0 10 10" name="" number="1" terminal="" type="input"> <node UUID="fed5365d-7357-4318-b8df-542f91678649" bounds="188 210 30 40" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="ab07fec4-b49a-4a98-8dc2-c920a6c6b994" dstblock="a2" dstport="1" srcPortUUID="74188127-e5c7-403c-ad41-4fbf11d9fa26" srcblock="two" thickness="2.0"/> </node> </port> <port UUID="f8d1333b-4fec-46aa-97c2-5e971a5266aa" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="ea4c5733-08c6-4343-be9d-68f7b7bf8858" bounds="255 202 29 43" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="b1372b68-16eb-4f00-9de5-90863543ca4a" dstblock="rat" dstport="0" srcPortUUID="f8d1333b-4fec-46aa-97c2-5e971a5266aa" srcblock="a2" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="power" mpackage="" mversion="" portdims="1 -1 1 -1"/> <plist UUID="65664d19-f997-4d90-83c2-43f7547bcf5b" created="-1" description="" name="none"/> </block> <block UUID="2df9ef80-3715-4c67-b09d-f18bda4bdafe" attachWorkbench="false" bounds="64 271 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="a3"> <port UUID="7b4ce913-f411-441f-8a51-59a073326e22" bounds="0 0 10 10" name="" number="0" terminal="" type="input"> <node UUID="5fc64c5a-6d6a-4103-a8d3-13e1303a96f3" bounds="48 161 27 143" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="7b4ce913-f411-441f-8a51-59a073326e22" dstblock="a3" dstport="0" srcPortUUID="eab2927b-1af7-4776-a150-958bbd62fcfc" srcblock="a1" thickness="2.0"/> </node> </port> <port UUID="758f6cd2-7a8b-4f61-ab69-aee627b29790" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="8802b216-330a-4e37-98f7-ae1c89b0c8c0" bounds="112 255 172 49" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="83419422-b98f-41b9-a1c7-8581be1842a0" dstblock="rat" dstport="1" srcPortUUID="758f6cd2-7a8b-4f61-ab69-aee627b29790" srcblock="a3" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="psd" mpackage="" mversion="" portdims="1 -1 1 -1"/> <plist UUID="33edb029-64d2-4980-84cb-43ec6318262f" created="-1" description="" name="none"> <param active="true" desc="" key="NFFT"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="10000"/> </ParamValue> </param> <param active="true" desc="" key="WIN"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="specwin('Rectangular', -1)"/> </ParamValue> </param> <param active="true" desc="" key="OLAP"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="-1"/> </ParamValue> </param> <param active="true" desc="" key="SCALE"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="PSD"/> </ParamValue> </param> <param active="true" desc="" key="ORDER"> <ParamValue index="0" selection="0"> <Option javaType="java.lang.String" matlabType="char" value="0"/> </ParamValue> </param> </plist> </block> <block UUID="93f794ef-b65b-498a-9ed4-6eddd7e528f0" attachWorkbench="false" bounds="273 220 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="rat"> <port UUID="b1372b68-16eb-4f00-9de5-90863543ca4a" bounds="0 0 10 10" name="" number="0" terminal="" type="input"> <node UUID="ea4c5733-08c6-4343-be9d-68f7b7bf8858" bounds="255 202 29 43" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="b1372b68-16eb-4f00-9de5-90863543ca4a" dstblock="rat" dstport="0" srcPortUUID="f8d1333b-4fec-46aa-97c2-5e971a5266aa" srcblock="a2" thickness="2.0"/> </node> </port> <port UUID="83419422-b98f-41b9-a1c7-8581be1842a0" bounds="0 0 10 10" name="" number="1" terminal="" type="input"> <node UUID="8802b216-330a-4e37-98f7-ae1c89b0c8c0" bounds="112 255 172 49" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="83419422-b98f-41b9-a1c7-8581be1842a0" dstblock="rat" dstport="1" srcPortUUID="758f6cd2-7a8b-4f61-ab69-aee627b29790" srcblock="a3" thickness="2.0"/> </node> </port> <port UUID="9d7a78c0-e32d-4118-a837-7cdb8e878b95" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="49f2e277-0413-4015-8829-c7b1daca68aa" bounds="241 247 136 106" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="17c1077b-643b-464c-90ae-e37eb1b14efe" dstblock="New Block_1" dstport="0" srcPortUUID="9d7a78c0-e32d-4118-a837-7cdb8e878b95" srcblock="rat" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="rdivide" mpackage="" mversion="" portdims="2 -1 1 -1"/> <plist UUID="80167ac1-26d3-450b-8e54-20f02a55d365" created="-1" description="" name="none"/> </block> <block UUID="1acd7c77-c7d2-42d6-8f4c-1a89ca2232c0" attachWorkbench="false" bounds="286 320 60 60" commentedOut="false" keepResult="true" keepresult="true" modifier="false" name="New Block_1"> <port UUID="17c1077b-643b-464c-90ae-e37eb1b14efe" bounds="0 0 10 10" name="" number="0" terminal="" type="input"> <node UUID="49f2e277-0413-4015-8829-c7b1daca68aa" bounds="241 247 136 106" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="17c1077b-643b-464c-90ae-e37eb1b14efe" dstblock="New Block_1" dstport="0" srcPortUUID="9d7a78c0-e32d-4118-a837-7cdb8e878b95" srcblock="rat" thickness="2.0"/> </node> </port> <LTPDAalgorithm mcategory="Output" mclass="ao" mname="iplot" mpackage="" mversion="" portdims="1 -1 0 -1"/> <plist UUID="ad48913d-e90d-40c3-a27f-0889fb7c7baf" created="-1" description="" name="none"/> </block> <matblock UUID="65ae2281-fbba-4ced-b919-22e13aa5c03b" bounds="140 217 60 60" commentedOut="false" expression="2" keepResult="true" keepresult="true" name="two"> <port UUID="74188127-e5c7-403c-ad41-4fbf11d9fa26" bounds="0 0 10 10" name="" number="0" terminal="" type="output"> <node UUID="fed5365d-7357-4318-b8df-542f91678649" bounds="188 210 30 40" name=""> <pipe bezier="false" color="-3657166" dstPortUUID="ab07fec4-b49a-4a98-8dc2-c920a6c6b994" dstblock="a2" dstport="1" srcPortUUID="74188127-e5c7-403c-ad41-4fbf11d9fa26" srcblock="two" thickness="2.0"/> </node> </port> </matblock> <annotation UUID="bc8683ac-0345-403b-a3fd-9f04eeaca845" backgroundColor="255 255 255" bounds="399 19 445 512" fontName="Times" fontSize="15" fontStyle="0" foregroundColor="51 204 0" name="" text="function test_fft()
% Test fft() operator for AOs.
%
% M Hewitson 19-04-07
% 
% $Id: test_ao_fft.lwb,v 1.4 2011/04/27 07:05:20 hewitson Exp $
% 


%% Make test AOs

nsecs = 10;
fs = 1000;

pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*7.433*t) + randn(size(t))');

a1 = ao(pl);
a1 = a1.setName;


%% Take abs

a2 = abs(fft((a1))).^2;
a3 = psd(a1, plist('Nfft', 10000, 'Win', specwin('Rectangular', 10000)));

%% Plot
rat = a2./a3;

%%
iplot(rat, plist('YScales', 'lin'))
iplot(a2,a3)

%% Two-sided fft
a4 = fft(a1, plist('type', 'two'));
iplot(abs(a4), plist('XScales', {'All', 'lin'}));


% END"/> </canvas> </document> <ExecutionPlan/> </LTPDAworkbench>