Save powder diffraction intensity data to different output types

with the context manager you dont need this line