change algos in energy.py and similarity.py to use duration (in sec) and sample interval in dt