airbornegeo.equivalent_source_levelling

airbornegeo.equivalent_source_levelling#

equivalent_source_levelling(data, data_column, max_dist, degree, lines_to_level=None, damping=None, depth='default', block_size=None, max_iterations=1, rms_tolerance=None, rms_percent_change_tolerance=10, rms_percent_increase_tolerance=20, seed=42, plot_iterations=True, progressbar=True)[source]#

_summary_

Parameters:
  • data (DataFrame) – The dataframe containing columns ‘easting’, ‘northing’, ‘height’, ‘line’, ‘distance_along_line’, and the data, specified by parameter data_column.

  • data_column (str) – The name of the column containing the data values to fit equivalent sources to and level, typically gravity or magnetics.

  • max_dist (float) – For each line to be levelled, only fit equivalent sources using data within this distance to the line, excluding the line data itself. This should be large enough to include at least 1 adjacent flight line.

  • degree (int) – The degree order of the polynomial trend to fit the misfit between the data_column and the predicted values from the equivalent sources. 0 gives a DC-shift, 1 additionally allows a tilt, 2 additional allows a curve, etc.

  • lines_to_level (list[float] | None) – Which lines to level, by default will level all lines.

  • damping (float | None) – The damping regularization to use when fitting the equivalent sources, by default None

  • depth (str | float) – The source depths for the equivalent sources, by default “default”, which uses 4.5 times the mean distance between first neighboring sources.

  • block_size (float | None) – The block size for placing the equivalent sources, by default None which place 1 source beneath each datapoint.

  • max_iterations (int) – End the iterations after this value, by default 1

  • rms_tolerance (float | None) – End the iteration once the levelling correction RMS is less than this value, by default None

  • rms_percent_change_tolerance (float) – End the iterations if the percentage change of levelling correction RMS over 2 consecutive iterations is less the than this percentage. This helps stop the iterations once improvement has plateaued, by default 10.

  • rms_percent_increase_tolerance (float) – End the iterations if the levelling correction RMS of the current iterations is more than this percent greater then the minimum RMS of past iterations. This helps stop run-away iterations which keep getting worse, by default 20

  • seed (int) – Seed supplied to the random number generator for shuffling the lines so they are iterated over in a random order, by default 42

  • plot_iterations (bool) – Plot the convergence of levelling correction RMS value, by default True

  • progressbar (bool) – Show progress bars for both iterations and levelling of lines, by default True

Returns:

The levelled data column, which can be assigned back to the original dataframe.

Return type:

Series