fitcor : fit correlation of two parameters

tesfdmtools.methods.fitcor.fitcor(c1, c2, nangles=20, dangle=0.02, discard=0.05, fftb=2, debug=False, nolim=False)[source]

fit correlation of two parameters by rotating the correlation plot and fitting for the minimum width of the data on to the projected y-axis

Args:
  • c1 = first parameter (pulse baseline)

  • c2 = second parameter (pulse optimal filter fit)

Kwargs:
  • nangles = number of rotation angles to probe

  • dangle = delta of angle probe (default 0.01 ~ 0.5 degree )

  • discard = fraction of tail of distribution to be discarded

  • fftb = number of fft bins from lowest frequency to consider for rotation (1 or 2)

  • nolim = if True, do not limit c2

  • debug = if True, plot detailed fit results [default: False]

Returns:
  • cnew = c2 corrected for fitted correlation

  • center = center of distribution

  • ytilt = slope of correlation