Fixed bug in checking type of input in xray_luminosity().
Wrote unit test for xray_luminosity().
Fixed bug in checking type of input in rad_loss_rate().
Wrote unit test for rad_loss_rate().