ess.sans.i_of_q.convert_to_q_and_merge_spectra#

ess.sans.i_of_q.convert_to_q_and_merge_spectra(data, graph, q_bins, gravity, wavelength_bands=None)#

Convert the data to momentum vector Q. This accepts both dense and event data. The final step merges all spectra:

  • In the case of event data, events in all bins are concatenated

  • In the case of dense data, counts in all spectra are summed

Parameters
  • data (DataArray) – A DataArray containing the data that is to be converted to Q.

  • graph (dict) – The coordinate conversion graph used to perform the conversion to Q.

  • q_bins (Union[int, Variable]) – The binning in Q to be used.

  • gravity (bool) – If True, include the effects of gravity when computing the scattering angle.

  • wavelength_bands (Optional[Variable], default: None) – Defines bands in wavelength that can be used to separate different wavelength ranges that contribute to different regions in Q space. Note that this needs to be defined, so if all wavelengths should be used, this should simply be a start and end edges that encompass the entire wavelength range.

Returns

DataArray – The input data converted to Q and then summed over all detector pixels.