ess.spectroscopy.indirect.io.to_nxspe#
- ess.spectroscopy.indirect.io.to_nxspe(events, base)[source]#
Take events, which have been binned in incident wavelength and have monitor counts per bin, and output one NXspe file per setting
- Parameters:
events (
scipp.DataArray
) – The events binned in (setting, event_id, incident_wavelength) with at least ‘monitor’, ‘a3’, and ‘theta’ bin coordinates. The events and the bins must also have an ‘incident_wavelength’ coordinate.base (
str | Path
) – The filename base used to produce each NXspe filename.
- Returns:
types.NXspeFileNames
(list
) – The list of filenames containing the NXspe data. If there are N settings in the input DataArray, N filenames are returned. The names are of the form{base}_{i+1:0{ceil(log10(N+1))}d}.nxspe