neutronpy.fileio.save_data

neutronpy.fileio.save_data(obj, filename, filetype='ascii', save_instr=False, overwrite=False, **kwargs)[source]

Saves a given object to a file in a specified format.

Parameters:
obj : Data

A Data object to be saved to disk

filename : str

Path to file where data will be saved

filetype : str, optional

Default: ‘ascii’. Data can either be saved in human-readable ‘ascii’ format, binary ‘hdf5’ format, or binary ‘pickle’ format (not recommended).

save_instr : bool, optional

Default: False.

overwrite : bool, optional

Default: False.