Mercurial > hg > ltpda
comparison m-toolbox/test/test_ao_spikecleaning.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 % A test script for the spikecleaning method | |
2 % | |
3 % J Sanjuan 26-01-08 | |
4 % | |
5 % $Id: test_ao_spikecleaning.m,v 1.4 2009/02/02 15:20:38 hewitson Exp $ | |
6 % | |
7 function test_ao_spikecleaning() | |
8 | |
9 % Make test AOs | |
10 nsecs = 1e4; | |
11 fs = 1; | |
12 | |
13 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*1.433*t) + randn(size(t))'); | |
14 | |
15 a1=ao(pl); | |
16 | |
17 % Make spike cleaning of each | |
18 | |
19 % parameters list | |
20 pl = plist('kspike', 1, 'method', 'mean'); | |
21 | |
22 % use spike cleaning | |
23 a3 = spikecleaning(a1); % default parameters list | |
24 a4 = spikecleaning(a1, pl); | |
25 | |
26 % Plot (a1,a3) | |
27 iplot(a1,a3) | |
28 | |
29 % plot history for a3 | |
30 plot(a3.hist) | |
31 | |
32 % Plot (a1,a4) | |
33 iplot(a1,a4) | |
34 | |
35 % plot history for a4 | |
36 plot(a4.hist) | |
37 | |
38 % Reproduce from history | |
39 a_out = rebuild(a3); | |
40 a_out2 = rebuild(a4); | |
41 | |
42 end |