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