From 29cd7eb6c76bdacd8524c88ded63584b59ce20de Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Wed, 3 Jul 2013 12:06:46 -0400 Subject: [PATCH] Improve test_prep target in Makefile --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 29eab37..430d900 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,13 @@ test_copy: @make install >/dev/null src/copy_wildcard.py -U "http://nilmdb.com/bucket/" -D /lees* -test_prep: +/tmp/raw.dat: + octave --eval 'fs = 8000;' \ + --eval 't = (0:fs*10)*2*pi*60/fs;' \ + --eval 'raw = transpose([sin(t); 0.3*sin(3*t)+sin(t)]);' \ + --eval 'save("-ascii","/tmp/raw.dat","raw");' + +test_prep: /tmp/raw.dat @make install >/dev/null -nilmtool destroy -R /test/raw -nilmtool destroy -R /test/sinefit @@ -31,7 +37,7 @@ test_prep: nilmtool create /test/sinefit float32_3 nilmtool create /test/prep float32_8 nilmtool insert -s '@0' -t -r 8000 /test/raw /tmp/raw.dat - src/sinefit.py -c 1 /test/raw /test/sinefit + src/sinefit.py -a 0.5 -c 1 /test/raw /test/sinefit src/prep.py -c 2 /test/raw /test/sinefit /test/prep nilmtool extract -s min -e max /test/prep | head -20