magali.iterative_nonlinear_inversion

magali.iterative_nonlinear_inversion#

magali.iterative_nonlinear_inversion(data_up, bounding_boxes, height_difference=5.0, copy_data=True)[source]#

Perform iterative Euler and nonlinear dipole inversion over bounding boxes.

Parameters:
data_upxarray.DataArray

Upward-continued magnetic data with coordinates “x”, “y”, and “z”. This is typically obtained after upward continuation of observed magnetic data.

bounding_boxeslist of lists or arrays

Bounding boxes of detected anomalies in data coordinates. Each bounding box is defined as [x_min, x_max, y_min, y_max].

height_differencefloat, optional

Height increment (in µm) used for upward continuation after each iteration (default is 5.0). Increasing this value smooths the field more rapidly between iterations.

copy_databool, optional

If True (default), operates on a deep copy of the input data to avoid modifying the original array. If False, modifications will be applied directly to the provided data array.

Returns:
data_updatedxarray.DataArray

Magnetic data after iterative dipole removal and upward continuation.

locations_list of tuples

Estimated (x, y, z) coordinates of the dipole sources identified during the inversion.

dipole_moments_list of arrays

Estimated magnetic dipole moments (in A·m²) corresponding to each bounding box.

r2_valueslist of floats

Coefficient of determination (R²) for each nonlinear inversion fit, indicating model quality.