create_strided_binning#

geodesic.tesseract.utils.create_strided_binning(start, end, stride, duration)[source]#

Creates a StridedBinning object for use in a Tesseract job given start, end, stride, and duration

This creates a StridedBinning object that can be used in any step of a Tesseract job that uses temporal binning. Strided binning is the most commonly used way to create uniformly spaced and sized time bins. This utility helps create bins between a start and end with a given stride and duration.

Bins will begin at start, the starts will be spaced in intervals of stride, be duration wide and end before or equal to end.

Parameters:
  • start (datetime | datetime64 | str) – the start datetime for the binning

  • end (datetime | datetime64 | str) – the end datetime for the binning

  • stride (timedelta | timedelta64 | str) – the time apart each of the left bin edges will be spaced

  • duration (timedelta | timedelta64 | str) – how long each bin will be

Returns:

a StridedBinning object.