Air pressure and cluster headache

Going through some old stuff I found this little project from back in the days during my time at ETH Zurich.

My office colleague at the time was suffering from Cluster headache. Since he had no idea on what the causes could be, we did, was we did best at the time 🙂 Collect and process data 🙂

The charts shows the air pressure in Zurich from March till May 2009. The values were collected via a cron-script, extracted and logged into a file. The script then plotted the data using gnuplot. Every time he had another attack, he noted the time and we completed the graph with the dots (red = strong attacks, green = not so strong attacks).

Unfortunately, we didn’t see any correlation between the air pressure and his headaches. Nevertheless, a good logbook for his doctor and a nice exercise for me 🙂

 

 Here’s the gnuplot-code:


set term png enhanced
set output "/scratch/duffduff/output.png"
set ylabel "Luftdruck in mB"
set xlabel "Zeit"
set term png size 3300,700
set timefmt "%d.%m.%Y %H:%M:%S"
set xdata time
set format x "%d.%m.%Y"
set xtics ("06.03.2009","08.03.2009","10.03.2009","12.03.2009","14.03.2009","16.03.2009","18.03.2009","20.03.2009","22.03.2009","24.03.2009","26.03.2009","28.03.2009","30.03.2009","01.04.2009","03.04.2009","05.04.2009","07.04.2009","09.04.2009","11.04.2009","13.04.2009","15.04.2009","17.04.2009","19.04.2009","21.04.2009","23.04.2009","25.04.2009","27.04.2009","29.04.2009","01.05.2009","03.05.2009","05.05.2009","07.05.2009","09.05.2009","11.05.2009")
set yrange [995:1035]
set y2tics mirror
set xrange ["06.03.2009":"13.05.2009"]
plot '/scratch/duffduff/cleaned' u 1:3 w l lt 8 lw 3, '/scratch/duffduff/cleaned' u 1:4 lt 1 lw 4 pt 6, '/scratch/duffduff/cleaned' u 1:5 lt 2 lw 4 pt 6

And the little Bash-Script to cleanup the data and plot it:


rm /scratch/duffduff/cleaned
sed 's/mB,//' /scratch/duffduff/pressurelog >> /scratch/duffduff/stats
sed 's/CET 2009//' /scratch/duffduff/stats >> /scratch/duffduff/stats2
sed 's/,/ /' /scratch/duffduff/stats2 >> /scratch/duffduff/cleaned
rm /scratch/duffduff/stats
rm /scratch/duffduff/stats2
gnuplot /scratch/duffduff/plot.plot

Leave a Reply