Frequency shift, time labals and markers, fix duration calc and argparse support for heatmap.py

Credits to pksato who did the real work, I've only included the time markers and argparse support.

I wanted to cleanup the code a little bit with functions but atm I haven't got much time so I prefer to send this patch first.