Save powder diffraction intensity data to different output types

but also move this to the end where you actually do `f.write`