How to calculate LF/HF power ratio from heart rate RR-intervals
Here is a link with a bunch of stuff relating to HVR and how to calculate various features using python discrete-heart-rate-signal-using-python-part-1. Hope it helps.