Mercurial > hg > ltpda
view m-toolbox/test/high_level_queries/make_test_data.m @ 13:e05504b18072 database-connection-manager
Move more functions to utils.repository
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
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);