polyTEM.spatial.stats.exponential_decay_length

polyTEM.spatial.stats.exponential_decay_length(y, x, start_ind=0, end_ind=-1)

Fits an exponential to y by modeling log(y) = ax + b. Where the decay is given by -1/a

Useful for modeling orientation correlation length where the input y is the expected value of the 2nd-order Legendre polynomial

Parameters:
  • y – np.array

  • x – np.array

  • start_ind – int, indexes for fitting

  • end_ind – int, indexes for fitting

  • plot – boolean, if True, will plot over any existing figure! Does not create new figure.

Returns:

decay length

Return type:

Ld