Mercurial > hg > ltpda
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/test/high_level_queries/make_test_data.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,42 @@ +clear all; + +%% Make some test objects +fs = 1; +nsecs = 3600; +chan = 'channelZ'; + +a1 = ao(plist('tsfcn', 'sin(2*pi*0.003*t)', 'fs', fs, 'nsecs', nsecs, 'name', chan)); +a1.setT0(time('2009-01-01 00:00:00')); + +% split into parts of 10 minutes length +as = a1.split(plist('split_type', 'chunks', 'N', 6)); + +% set name of all back to channelZ +as.setName(plist('name', chan)); + + +%% Submit these +import utils.const.*; +hostname = 'btlab.science.unitn.it'; +database_name = 'ltpda_test'; + +conn = utils.mysql.connect(hostname, database_name); + +sinfo.conn = conn; +sinfo.username = conn.username; +sinfo.experiment_title = 'A series of AOs'; +sinfo.experiment_description = ['A set of AOs which are contiguous in time.'... + 'These can be used for testing high-level queries.']; +sinfo.analysis_description = 'No analysis yet'; +sinfo.quantity = 'Simulated sine-wave at 0.003Hz'; +sinfo.keywords = 'series'; +sinfo.reference_ids = ''; +sinfo.additional_comments = 'none'; +sinfo.additional_authors = 'no one'; + +% Submit AOs +[ids, cid] = submit(as, sinfo); + +% Close connection +close(conn); +