TransferFunctions.py: some common code for light and heavy