pyhiperta.timing.slope_intercept

pyhiperta.timing.slope_intercept(peak_times: ndarray, longitudinals: ndarray, cleaning_mask) Tuple[ndarray, ndarray][source]

Computes slope, intercept by fitting a line (LSE) on the peak_times of each pixels along the ellipsis major axis

This is essentially a less robust __batched__ numpy.linalg.lstsq

Parameters:
  • peak_times (np.ndarray) – The time of maximum signal for each pixels as computed by the integration. shape: ([N_batch,], N_pixels)

  • longitudinals (np.ndarray) – The longitudinal coordinates (coordinate along the ellipsis major axis) of each pixels. shape: ([N_batch,], N_pixels)

Returns:

Slope and intercept values for each waveform. shape of each array: ([Batch,],)

Return type:

Tuple[np.ndarray, np.ndarray]