Added function for converting PAR to SW and back.