scippneutron.Ltotal#

scippneutron.Ltotal(da, scatter)[source]#

Extract the length of the total flight path from a data array or dataset.

Parameters:
  • da (DataArray | Dataset) – Get or compute the total flight path length from coords and attrs of this.

  • scatter (bool) – If True, assume a beam that scattered off a sample and return the sum of L1 and L2. If False, return the straight distance between source and detector.

Returns:

Variable – The length of the total flight path.