scippneutron.io.xye.load_xye#
- scippneutron.io.xye.load_xye(fname, *, dim, unit, coord_unit, coord=None)[source]#
Read a data array from an XYE file.
See
scippneutron.io.xye.save_xye()for a description of the file format.Since XYE files are lossy, some metadata must be provided manually when calling this function.
- Parameters:
fname (
str|Path|TextIO) – Name or file handle of the input file.dim (
str) – Dimension of the returned data.coord_unit (
Unit|str|None) – Unit of the coordinate of the returned data array.coord (
str|None, default:None) – Coordinate name of the returned data. Defaults to the value ofdim.
- Returns:
da– Data array read from the file.
See also
scippneutron.io.xye.save_xyeFunction to write XYE files.