ess.sans.i_of_q.resample_direct_beam#

ess.sans.i_of_q.resample_direct_beam(direct_beam, wavelength_bins)[source]#

If the wavelength binning of the direct beam function does not match the requested wavelength_bins, perform a 1d interpolation of the function onto the bins.

Parameters:
  • direct_beam (types.DirectBeam (types.scipp._scipp.core.DataArray | None)) – The DataArray containing the direct beam function (it should have a dimension of wavelength).

  • wavelength_bins (types.WavelengthBins (scipp.Variable)) – The binning in wavelength that the direct beam function should be resampled to.

Returns:

types.CleanDirectBeam (scipp.DataArray) – The direct beam function resampled to the requested resolution.