comparison testing/utp_1.1/utps/ao/reference_files/create_ref_whitenoise.m @ 44:409a22968d5e default

Add unit tests
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 18:42:11 +0100
parents
children
comparison
equal deleted inserted replaced
43:bc767aaa99a8 44:409a22968d5e
1 % CREATE_REF_WHITENOISE creates a set of known white noise time series to
2 % be used in UTP testing
3 %
4 % M Nofrarias 20-01-09
5 %
6 % $Id: create_ref_whitenoise.m,v 1.5 2010/05/06 07:29:42 ingo Exp $
7 %
8
9 % <MethodDescription>
10 %
11 % The method uses the 'whitenoise' AO model to create white noise using
12 % always the same seed for the noise generator.
13 %
14 % </MethodDescription>
15
16 function create_ref_whitenoise()
17
18 % <AlgoCode>
19
20 % creates 10 s at 1000 Hz, sigma = 1
21 pl = plist(...
22 'sigma',1,...
23 'nsecs',10,...
24 'fs',1000);
25
26 a = ao(plist('built-in', 'whitenoise'),pl);
27 % save xml file
28 save(a,'ref_whitenoise_10s_1000Hz.xml');
29
30
31 % creates 3600 s at 1 Hz, sigma = 3e-8
32 pl = plist(...
33 'sigma',3e-8,...
34 'nsecs',3600,...
35 'fs',1);
36
37 a = ao(plist('built-in', 'whitenoise'),pl);
38 % save xml file
39 save(a,'ref_whitenoise_3600s_1Hz.xml');
40
41
42 % creates 100000 s at 0.1 Hz, sigma = 4e-12
43 pl = plist(...
44 'sigma',4e-12,...
45 'nsecs',100000,...
46 'fs',0.1);
47
48 a = ao(plist('built-in', 'whitenoise'),pl);
49 % save xml file
50 save(a,'ref_whitenoise_100000s_100mHz.xml');
51
52 % creates 2e4 s at 10 Hz, sigma = 5e-6
53 pl = plist(...
54 'sigma', 5e-6,...
55 'nsecs', 2e3,...
56 'fs', 10);
57
58 a = ao(plist('built-in', 'whitenoise'),pl);
59 % save xml file
60 save(a,'ref_whitenoise_20000s_10Hz.xml');
61
62 % creates 2e5 s at 10 Hz, sigma = 5e-6
63 pl = plist(...
64 'sigma', 5e-6,...
65 'nsecs', 2e3,...
66 'fs', 10);
67
68 a = ao(plist('built-in', 'whitenoise'),pl);
69 % save xml file
70 save(a,'ref_whitenoise_200000s_10Hz.xml');
71
72 % </AlgoCode>
73
74 end