zero

pylook.calc.zero(data, zero_idx, window=0, value=0, mode='at')

Zero an array at a given row to zero or another value.

Parameters
  • data (pint.Quantity) – Data to be operated upon.

  • zero_idx (int) – Index of value at which we wish to zero the array

  • window (int) – Number of data points either side of the zero index to be averaged to get the zero value.

  • value (pint.Quantity) – Numeric value to which we set the “zero” point.

  • mode (string) – How the zero operation should be performed. Valid modes at “at” in which only the zero value is subtracted from all data, “before” in which all data before that index are also set to the zero value, or “after” in which all data after the given index are also set to the zero value.

Returns

data (pint.Quantity) – Data with zero applied.

Examples using pylook.calc.zero