Include np_to_pha function (modified) from PyFACT
Add image_to_hdu utility function from PyFACT