io.save_powder_output Module

This module is for saving integrated powder x-ray diffraction intensities into different file formats. (Output into different file formats, .chi, .dat and .xye)

skbeam.io.save_powder_output.gsas_writer(tth, intensity, output_name, mode=None, err=None, dir_path=None)

Save diffraction intensities into .gsas file format

Parameters
tthndarray

twotheta values (degrees) shape (N, ) array

intensityndarray

intensity values shape (N, ) array

output_namestr

name for the saved output diffraction intensities

mode{‘STD’, ‘ESD’, ‘FXYE’}, optional

GSAS file formats, could be ‘STD’, ‘ESD’, ‘FXYE’

errndarray, optional

error value of intensity shape(N, ) array err is None then mode will be ‘STD’

dir_pathstr, optional

new directory path to save the output data files eg: /Data/experiments/data/

skbeam.io.save_powder_output.save_output(tth, intensity, output_name, q_or_2theta, ext='.chi', err=None, dir_path=None)

Save output diffraction intensities into .chi, .dat or .xye file formats. If the extension(ext) of the output file is not selected it will be saved as a .chi file

Parameters
tthndarray

twotheta values (degrees) or Q values (Angstroms) shape (N, ) array

intensityndarray

intensity values (N, ) array

output_namestr

name for the saved output diffraction intensities

q_or_2theta{‘Q’, ‘2theta’}

twotheta (degrees) or Q (Angstroms) values

ext{‘.chi’, ‘.dat’, ‘.xye’}, optional

save output diffraction intensities into .chi, .dat or .xye file formats. (If the extension of output file is not selected it will be saved as a .chi file)

errndarray, optional

error value of intensity shape(N, ) array

dir_pathstr, optional

new directory path to save the output data files eg: /Volumes/Data/experiments/data/