invert4geom.create_data

Contents

invert4geom.create_data#

create_data(gravity, buffer_width=None, model_type='prisms')[source]#

Convert a dataset of gravity data into the format needed for the inversion. This includes adding various attributes to the dataset, and defining an inner region which will be used for plotting and statistics to avoid edge effects.

Parameters:
  • gravity (Dataset) – A dataset with coordinates easting and northing (if using prisms) or longitude and latitude (if using tesseroids), as well as variables upward defining the gravity observation height (with same vertical reference as the model, (i.e. WGS84) in meters and gravity_anomaly with the observed gravity values in mGals. If using tesseroids, the dataset must also contain a variable geocentric_radius defining the geocentric radius at each observation point in meters. This can be created using the Python package Boule.

  • buffer_width (float | None) – The width in meters or decimal degrees of a buffer zone used to zoom-in on the provided data creating an inner region. This inner region will be used for plotting and calculating statistics for processes such as cross validation, and l2-norms, this avoids skewing plots and values by edge effects, by default will use a width of the 10% of the shortest dimension length, to the nearest multiple of grid spacing.

  • model_type (str) – Choose between prisms and tesseroids, which affects whether geographic or projected coordinates are expect, by default prisms

Returns:

A dataset with new attributes model_type, dataset_type, spacing, β€œbuffer_width``, spacing, region, and inner_region.

Return type:

Dataset