Update calculate_iHS.py

Cleaned up code