-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Randy Sargent
committed
Feb 5, 2011
1 parent
62c0380
commit d482bae
Showing
4 changed files
with
112 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,47 @@ | ||
all: hex2binary anne-110126.zeo anne-110127.zeo anne-110128.zeo anne-110129.zeo anne-110130.zeo anne-110131.zeo anne-110201.zeo | ||
DATE ?= 110205 | ||
|
||
%.zeo: hex/%.zeo | ||
./hex2binary <$^ >$@ | ||
ZEOS = $(wildcard *.zeo) | ||
CSVS = $(patsubst %.zeo,%.hypnogram.csv,$(ZEOS)) | ||
|
||
all-csv: $(CSVS) | ||
|
||
#%.zeo: hex/%.zeo | ||
# ./hex2binary <$^ >$@ | ||
|
||
%.hypnogram.csv: %.zeo | ||
./raw2csv.py $^ | ||
|
||
current: anne-$(DATE).hypnogram.csv | ||
|
||
sync: | ||
rsync -av john-2.local:/Users/anne/education/bodytrack/zeologger/raw-data/\*.zeo . | ||
rm *.csv | ||
-./raw2csv.py | ||
|
||
connect: | ||
connect.sh anne-$(DATE).zeo | ||
|
||
csv: | ||
-./raw2csv.py -f anne-$(DATE).zeo | ||
|
||
plot-follow: | ||
echo "set datafile separator ','" > gnuplot.script | ||
echo "set xdata time" >> gnuplot.script | ||
echo "set timefmt '%m/%d/%Y %H:%M:%S'" >> gnuplot.script | ||
echo "set format x '%H:%M:%S'" >> gnuplot.script | ||
echo "plot 'anne-$(DATE).hypnogram.csv' every ::2 using 1:6" >> gnuplot.script | ||
echo "! sleep 5" >> gnuplot.script | ||
echo "reread" >> gnuplot.script | ||
gnuplot gnuplot.script | ||
|
||
plot: | ||
./plot_hypnogram.pl hypnogram.csv | ||
echo "set datafile separator ','" > gnuplot.script | ||
echo "set xdata time" >> gnuplot.script | ||
echo "set timefmt '%m/%d/%Y %H:%M:%S'" >> gnuplot.script | ||
echo "set format x '%H:%M:%S'" >> gnuplot.script | ||
echo "plot 'anne-$(DATE).hypnogram.csv' every ::2 using 1:6" >> gnuplot.script | ||
gnuplot -p gnuplot.script | ||
|
||
|
||
hex2binary: hex2binary.c | ||
gcc -Wall hex2binary.c -o hex2binary | ||
|
||
# plot 'anne-110202.spectrogram.csv' every ::2 using 1:6 with lines title '2-4 Hz', 'anne-110202.spectrogram.csv' every ::2 using 1:7 with lines title '4-8 Hz' smooth bezier, 'anne-110202.spectrogram.csv' every ::2 using 1:8 with lines title '8-13 Hz' smooth bezier, 'anne-110202.spectrogram.csv' every ::2 using 1:9 with lines title '11-14 Hz' smooth bezier, 'anne-110202.spectrogram.csv' every ::2 using 1:10 with lines title '13-18 Hz' smooth bezier, 'anne-110202.spectrogram.csv' every ::2 using 1:11 with lines title '18-21 Hz' smooth bezier, 'anne-110202.spectrogram.csv' every ::2 using 1:($12*10) with lines title "30-50 Hz (x10)" smooth bezier, 'anne-110202.hypnogram.csv' every ::2 using 1:($6*.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
Fix plot to include times | ||
|
||
----------------------------- | ||
DONE | ||
Commandline arg to block until new data, optionally | ||
Git setup | ||
Figure out how to remotely cat | ||
Commandline arg to select file | ||
Commandline arg to block until new data, optionally | ||
Figure out how to remotely cat | ||
Truncate CSV output files | ||
Different CSV output filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
echo Connecting to $1 | ||
ssh john-2.local tail -f -c +0 /Users/anne/education/bodytrack/zeologger/raw-data/$1 > $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters