comparison m-toolbox/test/high_level_queries/make_test_data.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 clear all;
2
3 %% Make some test objects
4 fs = 1;
5 nsecs = 3600;
6 chan = 'channelZ';
7
8 a1 = ao(plist('tsfcn', 'sin(2*pi*0.003*t)', 'fs', fs, 'nsecs', nsecs, 'name', chan));
9 a1.setT0(time('2009-01-01 00:00:00'));
10
11 % split into parts of 10 minutes length
12 as = a1.split(plist('split_type', 'chunks', 'N', 6));
13
14 % set name of all back to channelZ
15 as.setName(plist('name', chan));
16
17
18 %% Submit these
19 import utils.const.*;
20 hostname = 'btlab.science.unitn.it';
21 database_name = 'ltpda_test';
22
23 conn = utils.mysql.connect(hostname, database_name);
24
25 sinfo.conn = conn;
26 sinfo.username = conn.username;
27 sinfo.experiment_title = 'A series of AOs';
28 sinfo.experiment_description = ['A set of AOs which are contiguous in time.'...
29 'These can be used for testing high-level queries.'];
30 sinfo.analysis_description = 'No analysis yet';
31 sinfo.quantity = 'Simulated sine-wave at 0.003Hz';
32 sinfo.keywords = 'series';
33 sinfo.reference_ids = '';
34 sinfo.additional_comments = 'none';
35 sinfo.additional_authors = 'no one';
36
37 % Submit AOs
38 [ids, cid] = submit(as, sinfo);
39
40 % Close connection
41 close(conn);
42