New save output

Saving diffraction intensities into different file formats
I am not sure that we want to make this the job of this function, shouldn't this be the job of what ever code is calling this function?